git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit7a30aeea28f9f7c915e8ea0c782c042361182a41
parent5682c361c5
authorLucas Galante <[email protected]>
date2026-07-16 12:47
fix: map ISO_Left_Tab to NamedKey::Tab so Shift+Tab chords reach apps

xkb reports Shift+Tab as the ISO_Left_Tab keysym, which fell through to
the character fallback and was dropped (no key_char, no utf8), so apps
never saw Shift+Tab at all. Map it to NamedKey::Tab plus the shift
modifier, matching winit's behavior.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/backend/window_runner.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index 4c84515..ed5dd32 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -2568,7 +2568,9 @@ impl<A: Application> EngineState<A> {
             xkeysym::Keysym::Up => Key::Named(NamedKey::ArrowUp),
             xkeysym::Keysym::Left => Key::Named(NamedKey::ArrowLeft),
             xkeysym::Keysym::Right => Key::Named(NamedKey::ArrowRight),
-            xkeysym::Keysym::Tab => Key::Named(NamedKey::Tab),
+            // xkb reports Shift+Tab as ISO_Left_Tab; apps see plain Tab plus
+            // the shift modifier, matching winit.
+            xkeysym::Keysym::Tab | xkeysym::Keysym::ISO_Left_Tab => Key::Named(NamedKey::Tab),
             xkeysym::Keysym::Delete => Key::Named(NamedKey::Delete),
             xkeysym::Keysym::space => Key::Named(NamedKey::Space),
             xkeysym::Keysym::Page_Up => Key::Named(NamedKey::PageUp),