Add comment explaining Tab button (#2872)
This commit is contained in:
parent
387b075681
commit
67ba4f2811
|
|
@ -307,6 +307,7 @@ impl State {
|
||||||
}
|
}
|
||||||
WindowEvent::KeyboardInput { input, .. } => {
|
WindowEvent::KeyboardInput { input, .. } => {
|
||||||
self.on_keyboard_input(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()
|
let consumed = egui_ctx.wants_keyboard_input()
|
||||||
|| input.virtual_keycode == Some(winit::event::VirtualKeyCode::Tab);
|
|| input.virtual_keycode == Some(winit::event::VirtualKeyCode::Tab);
|
||||||
EventResponse {
|
EventResponse {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue