Description
After the Smithay dependency update in PR #2058 (commit 0f7e53b6, merged Feb 5, 2026), virtual keyboard tools like wtype output raw keycodes instead of the characters defined in their custom XKB keymap. For example, typing "Hello World" via wtype produces strings like 2345678390 or 123456731234568.
Root Cause
This is caused by Smithay PR #1803 (commit 2e00119), which introduced the VirtualKeyboardHandler trait. The current cosmic-comp implementation in src/wayland/handlers/virtual_keyboard.rs forwards events through keyboard.input(), which interprets keycodes using the seat's keymap rather than the virtual keyboard's custom keymap:
fn on_keyboard_event(&mut self, keycode: Keycode, state: KeyState, time: u32, keyboard: KeyboardHandle<Self>) {
let serial = SERIAL_COUNTER.next_serial();
keyboard.input(self, keycode, state, serial, time, |_, _, _| {
FilterResult::Forward::<bool>
});
}
This is the same pattern identified in Smithay issue #1926 as broken across all compositor implementations (cosmic-comp, niri, catacomb, anvil).
Upstream Fix
Smithay PR #1903 (Smithay/smithay#1903) properly handles set_keymap/get_keymap for virtual keyboards and has been tested successfully by niri's maintainer. It is currently awaiting review/merge.
Tracking:
Environment
- cosmic-comp:
0.1~1770304347~24.04~0e97ddb (includes the Smithay update)
- Previous working build:
0.1~1769425738~24.04~1dfc948
- wayland-protocols: 1.45
- wtype: 0.4-3
- Kernel: 6.18.7-76061807-generic
- Pop!_OS 24.04
Request
Once Smithay PR #1903 is merged, please bump the Smithay dependency to pick up the virtual keyboard keymap fix. This regression affects all tools using the wlr-virtual-keyboard-unstable-v1 protocol (wtype, wvkbd, squeekboard, etc.).
Description
After the Smithay dependency update in PR #2058 (commit
0f7e53b6, merged Feb 5, 2026), virtual keyboard tools likewtypeoutput raw keycodes instead of the characters defined in their custom XKB keymap. For example, typing "Hello World" via wtype produces strings like2345678390or123456731234568.Root Cause
This is caused by Smithay PR #1803 (commit
2e00119), which introduced theVirtualKeyboardHandlertrait. The current cosmic-comp implementation insrc/wayland/handlers/virtual_keyboard.rsforwards events throughkeyboard.input(), which interprets keycodes using the seat's keymap rather than the virtual keyboard's custom keymap:This is the same pattern identified in Smithay issue #1926 as broken across all compositor implementations (cosmic-comp, niri, catacomb, anvil).
Upstream Fix
Smithay PR #1903 (Smithay/smithay#1903) properly handles
set_keymap/get_keymapfor virtual keyboards and has been tested successfully by niri's maintainer. It is currently awaiting review/merge.Tracking:
Environment
0.1~1770304347~24.04~0e97ddb(includes the Smithay update)0.1~1769425738~24.04~1dfc948Request
Once Smithay PR #1903 is merged, please bump the Smithay dependency to pick up the virtual keyboard keymap fix. This regression affects all tools using the
wlr-virtual-keyboard-unstable-v1protocol (wtype, wvkbd, squeekboard, etc.).