From 9ea804788ca5b4852d7e045d7a57f8d413852ca0 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Wed, 25 Sep 2024 08:56:20 +0000 Subject: [PATCH] core: set capslock and numlock states on startup (#496) --- src/core/hyprlock.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 0e1b9de..87bbe79 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -728,6 +728,8 @@ static void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint s } xkb_state_update_mask(g_pHyprlock->m_pXKBState, mods_depressed, mods_latched, mods_locked, 0, 0, group); + g_pHyprlock->m_bCapsLock = xkb_state_mod_name_is_active(g_pHyprlock->m_pXKBState, XKB_MOD_NAME_CAPS, XKB_STATE_MODS_LOCKED); + g_pHyprlock->m_bNumLock = xkb_state_mod_name_is_active(g_pHyprlock->m_pXKBState, XKB_MOD_NAME_NUM, XKB_STATE_MODS_LOCKED); } static void handleRepeatInfo(void* data, struct wl_keyboard* wl_keyboard, int32_t rate, int32_t delay) {