Improve key handling on x11, sharing wayland implementation (#8094)

Makes keyboard shortcuts work on x11.

Release Notes:

- N/A
This commit is contained in:
gmorenz 2024-02-20 19:04:52 -05:00 committed by GitHub
parent c97ecc7326
commit cd640a87a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 45 deletions

View file

@ -338,7 +338,9 @@ impl X11WindowState {
if let PlatformInput::KeyDown(event) = input {
let mut inner = self.inner.lock();
if let Some(ref mut input_handler) = inner.input_handler {
input_handler.replace_text_in_range(None, &event.keystroke.key);
if let Some(ime_key) = &event.keystroke.ime_key {
input_handler.replace_text_in_range(None, ime_key);
}
}
}
}