This commit is contained in:
Piotr Osiewicz 2025-08-18 20:06:54 +02:00
parent bf577383a5
commit 33606e06e5

View file

@ -718,16 +718,15 @@ impl WaylandWindowStatePtr {
return;
}
}
if let PlatformInput::KeyDown(event) = input {
if event.keystroke.modifiers.is_subset_of(&Modifiers::shift()) {
if let Some(key_char) = &event.keystroke.key_char {
let mut state = self.state.borrow_mut();
if let Some(mut input_handler) = state.input_handler.take() {
drop(state);
input_handler.replace_text_in_range(None, key_char);
self.state.borrow_mut().input_handler = Some(input_handler);
}
}
if let PlatformInput::KeyDown(event) = input
&& event.keystroke.modifiers.is_subset_of(&Modifiers::shift())
&& let Some(key_char) = &event.keystroke.key_char
{
let mut state = self.state.borrow_mut();
if let Some(mut input_handler) = state.input_handler.take() {
drop(state);
input_handler.replace_text_in_range(None, key_char);
self.state.borrow_mut().input_handler = Some(input_handler);
}
}
}