summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Greer <[email protected]>2018-07-27 22:42:50 -0700
committerGeoff Greer <[email protected]>2018-07-28 16:22:20 -0700
commit30fee94354b61c2604431a53f4d1a1daf6c0a67a (patch)
tree6339f11af66a7f6f42c899f10bc1add221f194ee
parent53069f1403587d230e8f2c6adb61daa7c5e022b7 (diff)
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.
-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) {
wlr_keyboard_set_keymap(wlr_device->keyboard, keyboard->keymap);
xkb_mod_mask_t locked_mods = 0;
- if (!input_config || input_config->xkb_numlock != 0) {
+ if (input_config && input_config->xkb_numlock > 0) {
xkb_mod_index_t mod_index = xkb_map_mod_get_index(keymap, XKB_MOD_NAME_NUM);
if (mod_index != XKB_MOD_INVALID) {
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.
Initially enables or disables CapsLock, the default is disabled.
*input* <identifier> xkb\_numlock enabled|disabled
- Initially enables or disables NumLock, the default is enabled.
+ Initially enables or disables NumLock, the default is disabled.
## MAPPING CONFIGURATION