Numpad aktiv

This commit is contained in:
2026-11-18 21:10:32 +01:00
parent 9a625bb675
commit 1f1a9ce05b
3 changed files with 15 additions and 0 deletions
+3
View File
@@ -65,6 +65,9 @@ static const struct xkb_rule_names xkb_rules = {
.options = NULL, .options = NULL,
}; };
/* NumLock on at startup */
static const int numlock = 1;
static const int repeat_rate = 25; static const int repeat_rate = 25;
static const int repeat_delay = 600; static const int repeat_delay = 600;
+3
View File
@@ -69,6 +69,9 @@ static const struct xkb_rule_names xkb_rules = {
.options = "grp:alt_shift_toggle", .options = "grp:alt_shift_toggle",
}; };
/* NumLock on at startup */
static const int numlock = 1;
static const int repeat_rate = 25; static const int repeat_rate = 25;
static const int repeat_delay = 600; static const int repeat_delay = 600;
+9
View File
@@ -1232,6 +1232,15 @@ createkeyboardgroup(void)
die("failed to compile keymap"); die("failed to compile keymap");
wlr_keyboard_set_keymap(&group->wlr_group->keyboard, keymap); wlr_keyboard_set_keymap(&group->wlr_group->keyboard, keymap);
/* Start with NumLock on: lock the keymap's NumLock modifier (Mod2) */
if (numlock) {
xkb_mod_index_t mod = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_NUM);
if (mod != XKB_MOD_INVALID)
wlr_keyboard_notify_modifiers(&group->wlr_group->keyboard,
0, 0, 1u << mod, 0);
}
xkb_keymap_unref(keymap); xkb_keymap_unref(keymap);
xkb_context_unref(context); xkb_context_unref(context);