aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/keyboard.c
diff options
context:
space:
mode:
authorLibravatar Geoff Greer <geoff@greer.fm>2018-07-27 22:42:50 -0700
committerLibravatar Geoff Greer <geoff@greer.fm>2018-07-28 16:22:20 -0700
commit30fee94354b61c2604431a53f4d1a1daf6c0a67a (patch)
tree6339f11af66a7f6f42c899f10bc1add221f194ee /sway/input/keyboard.c
parentMerge pull request #2360 from RyanDwyer/floating-containers (diff)
downloadsway-30fee94354b61c2604431a53f4d1a1daf6c0a67a.tar.gz
sway-30fee94354b61c2604431a53f4d1a1daf6c0a67a.tar.zst
sway-30fee94354b61c2604431a53f4d1a1daf6c0a67a.zip
Don't enable numlock by default. This fixes an annoying issue where laptop keyboards would have 'numlock mode' enabled, remapping parts of the alphabet to numbers.
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r--sway/input/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 643ff510..8dc8239c 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -387,7 +387,7 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) {
387 wlr_keyboard_set_keymap(wlr_device->keyboard, keyboard->keymap); 387 wlr_keyboard_set_keymap(wlr_device->keyboard, keyboard->keymap);
388 388
389 xkb_mod_mask_t locked_mods = 0; 389 xkb_mod_mask_t locked_mods = 0;
390 if (!input_config || input_config->xkb_numlock != 0) { 390 if (input_config && input_config->xkb_numlock > 0) {
391 xkb_mod_index_t mod_index = xkb_map_mod_get_index(keymap, XKB_MOD_NAME_NUM); 391 xkb_mod_index_t mod_index = xkb_map_mod_get_index(keymap, XKB_MOD_NAME_NUM);
392 if (mod_index != XKB_MOD_INVALID) { 392 if (mod_index != XKB_MOD_INVALID) {
393 locked_mods |= (uint32_t)1 << mod_index; 393 locked_mods |= (uint32_t)1 << mod_index;