windows: Only call TranslateMessage
when we can't handle the event (#32166)
This PR improves key handling on Windows by moving the `TranslateMessage` call from the message loop to after we handled `WM_KEYDOWN`. This brings Windows behavior more in line with macOS and gives us finer control over key events. As a result, Vim keybindings now work properly even when an IME is active. The trade-off is that it might introduce a slight delay in text input. Release Notes: - N/A
This commit is contained in:
parent
738cfdff84
commit
5b9d3ea097
3 changed files with 48 additions and 34 deletions
|
@ -231,9 +231,6 @@ impl WindowsPlatform {
|
|||
}
|
||||
}
|
||||
_ => {
|
||||
// todo(windows)
|
||||
// crate `windows 0.56` reports true as Err
|
||||
TranslateMessage(&msg).as_bool();
|
||||
DispatchMessageW(&msg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue