mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
InputManager: add config option to disable keybinds per device (#10064)
This commit is contained in:
@@ -1022,10 +1022,12 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
|
||||
const auto VARIANT = g_pConfigManager->getDeviceString(devname, "kb_variant", "input:kb_variant");
|
||||
const auto OPTIONS = g_pConfigManager->getDeviceString(devname, "kb_options", "input:kb_options");
|
||||
|
||||
const auto ENABLED = HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "enabled") : true;
|
||||
const auto ENABLED = HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "enabled") : true;
|
||||
const auto ALLOWBINDS = HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "keybinds") : true;
|
||||
|
||||
pKeyboard->enabled = ENABLED;
|
||||
pKeyboard->resolveBindsBySym = RESOLVEBINDSBYSYM;
|
||||
pKeyboard->allowBinds = ALLOWBINDS;
|
||||
|
||||
try {
|
||||
if (NUMLOCKON == pKeyboard->numlockOn && REPEATDELAY == pKeyboard->repeatDelay && REPEATRATE == pKeyboard->repeatRate && RULES != "" &&
|
||||
@@ -1538,6 +1540,9 @@ uint32_t CInputManager::accumulateModsFromAllKBs() {
|
||||
if (!kb->enabled)
|
||||
continue;
|
||||
|
||||
if (!kb->allowBinds)
|
||||
continue;
|
||||
|
||||
finalMask |= kb->getModifiers();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user