Skip to content

Commit

Permalink
f 'Update winit 0.28 -> 0.29'
Browse files Browse the repository at this point in the history
Only forward keyboard events on initial key press.
  • Loading branch information
maaku committed Jul 13, 2024
1 parent 1f03324 commit 5bd839d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/winit_event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ where
_ => None,
};

if let Some(key) = key {
if let (Some(key), true) = (key, key_event.state == ElementState::Pressed) {
self.cx.process(&self.view, &Event::Key(key))
}
}
Expand Down

0 comments on commit 5bd839d

Please sign in to comment.