mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 05:09:49 +01:00
configure keyboards one by one
This commit is contained in:
parent
a2f718059b
commit
7b568d7ad8
1 changed files with 18 additions and 11 deletions
|
@ -285,10 +285,14 @@ void CInputManager::setKeyboardLayout() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto PLASTKEEB = wlr_seat_get_keyboard(g_pCompositor->m_sSeat.seat);
|
||||||
|
|
||||||
// TODO: configure devices one by one
|
// TODO: configure devices one by one
|
||||||
for (auto& k : m_lKeyboards)
|
for (auto& k : m_lKeyboards) {
|
||||||
wlr_keyboard_set_keymap(k.keyboard->keyboard, KEYMAP);
|
wlr_keyboard_set_keymap(k.keyboard->keyboard, KEYMAP);
|
||||||
|
|
||||||
|
wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, k.keyboard->keyboard);
|
||||||
|
|
||||||
wlr_keyboard_modifiers wlrMods = {0};
|
wlr_keyboard_modifiers wlrMods = {0};
|
||||||
|
|
||||||
if (g_pConfigManager->getInt("input:numlock_by_default") == 1) {
|
if (g_pConfigManager->getInt("input:numlock_by_default") == 1) {
|
||||||
|
@ -302,6 +306,9 @@ void CInputManager::setKeyboardLayout() {
|
||||||
if (wlrMods.locked != 0) {
|
if (wlrMods.locked != 0) {
|
||||||
wlr_seat_keyboard_notify_modifiers(g_pCompositor->m_sSeat.seat, &wlrMods);
|
wlr_seat_keyboard_notify_modifiers(g_pCompositor->m_sSeat.seat, &wlrMods);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, PLASTKEEB);
|
||||||
|
|
||||||
xkb_keymap_unref(KEYMAP);
|
xkb_keymap_unref(KEYMAP);
|
||||||
xkb_context_unref(CONTEXT);
|
xkb_context_unref(CONTEXT);
|
||||||
|
|
Loading…
Reference in a new issue