Skip to content

[BUG] Virtual keyboard keymap regression breaks wtype after Smithay update (PR #2058) #2081

@arimxyer

Description

@arimxyer

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.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions