From 67ba4f2811d49c1b2446d114e5a7e7f31ce50368 Mon Sep 17 00:00:00 2001 From: Brian Janssen Date: Wed, 9 Aug 2023 11:48:54 +0200 Subject: [PATCH] Add comment explaining Tab button (#2872) --- crates/egui-winit/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/egui-winit/src/lib.rs b/crates/egui-winit/src/lib.rs index 75c9028c..ae82f6e4 100644 --- a/crates/egui-winit/src/lib.rs +++ b/crates/egui-winit/src/lib.rs @@ -307,6 +307,7 @@ impl State { } WindowEvent::KeyboardInput { input, .. } => { self.on_keyboard_input(input); + // When pressing the Tab key, egui focuses the first focusable element, hence Tab always consumes. let consumed = egui_ctx.wants_keyboard_input() || input.virtual_keycode == Some(winit::event::VirtualKeyCode::Tab); EventResponse {