mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
@@ -908,11 +908,10 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) {
|
||||
KEYMAP = xkb_keymap_new_from_names(CONTEXT, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
}
|
||||
|
||||
xkb_state_unref(pKeyboard->xkbTranslationState);
|
||||
pKeyboard->xkbTranslationState = xkb_state_new(KEYMAP);
|
||||
|
||||
wlr_keyboard_set_keymap(wlr_keyboard_from_input_device(pKeyboard->keyboard), KEYMAP);
|
||||
|
||||
pKeyboard->updateXKBTranslationState();
|
||||
|
||||
wlr_keyboard_modifiers wlrMods = {0};
|
||||
|
||||
if (NUMLOCKON == 1) {
|
||||
@@ -1246,6 +1245,8 @@ void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) {
|
||||
|
||||
const auto LAYOUT = getActiveLayoutForKeyboard(pKeyboard);
|
||||
|
||||
pKeyboard->updateXKBTranslationState();
|
||||
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," + LAYOUT});
|
||||
EMIT_HOOK_EVENT("activeLayout", (std::vector<void*>{pKeyboard, (void*)&LAYOUT}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user