Skip to content

Comments

Fix metakey mapped to Control modifier instead of Meta/Super#19

Merged
ptazithos merged 2 commits intomainfrom
copilot/fix-metakey-handling-issue
Feb 16, 2026
Merged

Fix metakey mapped to Control modifier instead of Meta/Super#19
ptazithos merged 2 commits intomainfrom
copilot/fix-metakey-handling-issue

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

The metakey (Super/Windows key) was incorrectly mapped to modifier value 4, causing it to behave as Control. Should be 64 (Mod4 mask).

Changes

  • Updated map_mod_key() in virtual_keyboard.rs to return 64 for KEY_LEFTMETA and KEY_RIGHTMETA
fn map_mod_key(key: evdev::KeyCode) -> u32 {
    match key {
        evdev::KeyCode::KEY_LEFTCTRL | evdev::KeyCode::KEY_RIGHTCTRL => 4,
-       evdev::KeyCode::KEY_LEFTMETA | evdev::KeyCode::KEY_RIGHTMETA => 4,
+       evdev::KeyCode::KEY_LEFTMETA | evdev::KeyCode::KEY_RIGHTMETA => 64,
        evdev::KeyCode::KEY_LEFTSHIFT | evdev::KeyCode::KEY_RIGHTSHIFT => 1,
        evdev::KeyCode::KEY_LEFTALT | evdev::KeyCode::KEY_RIGHTALT => 8,
        _ => 0,
    }
}

Standard X11/Wayland modifier masks: Shift=1, Control=4, Alt=8, Meta/Super=64.

No Cargo.lock changes, so cargoHash in flake.nix remains unchanged.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: ptazithos <93177021+ptazithos@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix metakey handling as control and update value to 64 Fix metakey mapped to Control modifier instead of Meta/Super Feb 16, 2026
Copilot AI requested a review from ptazithos February 16, 2026 11:22
@ptazithos ptazithos marked this pull request as ready for review February 16, 2026 13:06
@ptazithos ptazithos merged commit 13ceae7 into main Feb 16, 2026
1 check passed
@ptazithos ptazithos deleted the copilot/fix-metakey-handling-issue branch February 16, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants