Skip to content

Commit

Permalink
Don't unconditionally consume some keyboard shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Jan 12, 2024
1 parent 301c72b commit 9875015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ impl State {
}
WindowEvent::KeyboardInput { event, .. } => {
// When pressing the Tab key, egui focuses the first focusable element, hence Tab always consumes.
let consumed = self.on_keyboard_input(event)
|| self.egui_ctx.wants_keyboard_input()
let consumed = (self.egui_ctx.wants_keyboard_input()
&& self.on_keyboard_input(event))
|| event.logical_key
== winit::keyboard::Key::Named(winit::keyboard::NamedKey::Tab);
EventResponse {
Expand Down

0 comments on commit 9875015

Please sign in to comment.