Skip to content

Preserve NumLock state in set_xkb_file#3576

Open
mgabor3141 wants to merge 1 commit intoniri-wm:mainfrom
mgabor3141:fix-xkb-file-numlock
Open

Preserve NumLock state in set_xkb_file#3576
mgabor3141 wants to merge 1 commit intoniri-wm:mainfrom
mgabor3141:fix-xkb-file-numlock

Conversation

@mgabor3141
Copy link

Mirrors the NumLock save/restore pattern from set_xkb_config() in set_xkb_file().

set_keymap_from_string() creates a fresh XKB state, resetting all locked modifiers including NumLock. set_xkb_config() already handles this, but set_xkb_file() did not — so keyboard { numlock } had no effect when combined with xkb.file.

Fixes #3575

set_keymap_from_string() creates a fresh XKB state, resetting all
locked modifiers. set_xkb_config() already saves and restores NumLock
around the keymap change, but set_xkb_file() did not.

This caused keyboard { numlock } to have no effect when combined with
xkb.file, since load_xkb_file() runs after numlock initialization at
startup. It also reset NumLock on config reload when the xkb section
changed.

Fixes niri-wm#3575
@mgabor3141 mgabor3141 marked this pull request as ready for review March 8, 2026 10:07
@Sempyos Sempyos added area:input Keyboard, mouse, touchpad, tablet, gestures, pointer pr kind:fix Issue fixes, code cleanups labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:input Keyboard, mouse, touchpad, tablet, gestures, pointer pr kind:fix Issue fixes, code cleanups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set_xkb_file does not preserve NumLock state (unlike set_xkb_config)

2 participants