summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-28 20:49:13 -0400
committerLibravatar GitHub <noreply@github.com>2018-07-28 20:49:13 -0400
commitcded0ff7e80b81f26f98e55956a4c5a08552e5d5 (patch)
tree6339f11af66a7f6f42c899f10bc1add221f194ee
parentMerge pull request #2360 from RyanDwyer/floating-containers (diff)
parentDon't enable numlock by default. This fixes an annoying issue where laptop ke... (diff)
downloadsway-cded0ff7e80b81f26f98e55956a4c5a08552e5d5.tar.gz
sway-cded0ff7e80b81f26f98e55956a4c5a08552e5d5.tar.zst
sway-cded0ff7e80b81f26f98e55956a4c5a08552e5d5.zip
Merge pull request #2371 from ggreer/numlock
Don't enable numlock by default.
-rw-r--r--sway/input/keyboard.c2
-rw-r--r--sway/sway-input.5.scd2
2 files changed, 2 insertions, 2 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;
diff --git a/sway/sway-input.5.scd b/sway/sway-input.5.scd
index fa311971..b2395273 100644
--- a/sway/sway-input.5.scd
+++ b/sway/sway-input.5.scd
@@ -39,7 +39,7 @@ The following commands may only be used in the configuration file.
39 Initially enables or disables CapsLock, the default is disabled. 39 Initially enables or disables CapsLock, the default is disabled.
40 40
41*input* <identifier> xkb\_numlock enabled|disabled 41*input* <identifier> xkb\_numlock enabled|disabled
42 Initially enables or disables NumLock, the default is enabled. 42 Initially enables or disables NumLock, the default is disabled.
43 43
44## MAPPING CONFIGURATION 44## MAPPING CONFIGURATION
45 45