Linux
This commit is contained in:
parent
bf577383a5
commit
33606e06e5
1 changed files with 9 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue