Skip to content

Commit

Permalink
fix: ignore synthetic keyboard input (#387)
Browse files Browse the repository at this point in the history
Co-authored-by: long <[email protected]>
  • Loading branch information
Long0x0 and long authored Mar 23, 2024
1 parent 19090b6 commit 942b35a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,14 @@ impl ApplicationHandle {
WindowEvent::Focused(focused) => {
window_handle.focused(focused);
}
WindowEvent::KeyboardInput { event, .. } => {
window_handle.key_event(event);
WindowEvent::KeyboardInput {
event,
is_synthetic,
..
} => {
if !is_synthetic {
window_handle.key_event(event);
}
}
WindowEvent::ModifiersChanged(modifiers) => {
window_handle.modifiers = modifiers.state();
Expand Down

0 comments on commit 942b35a

Please sign in to comment.