Add comment explaining Tab button (#2872)

This commit is contained in:
Brian Janssen 2023-08-09 11:48:54 +02:00 committed by GitHub
parent 387b075681
commit 67ba4f2811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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 {