summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorTobias Zimmermann <cu3po42@gmail.com>2024-02-28 00:21:22 +0100
committerGitHub <noreply@github.com>2024-02-27 23:21:22 +0000
commit489ac40abd7b3ae037e1681ee92bbef9d981a29c (patch)
treefba3d5bd1c2ca60837153ddac22d2312021bad56 /src/helpers
parente3373669e5544c3f18cf1edcd8fcfff9c6222f5c (diff)
config: Add option to resolve keybinds by sym instead of code (#4851)
This commit adds the new configuration option 'resolve_binds_by_sym' which can be set globally or per-device. It is off by default, which preserves the current behavior. This setting only affects the behavior of keybinds that are defined via key symbols, not those defined via keycode. Binds defined by symbols currently activate if the keycode pressed would generate the specified symbol on the first layout specified in the input section. If enabled, keys pressed on the relevant device will instead match keybinds by the symbols they produce with their current layout. Closes #1881.
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/WLClasses.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 02681f48..6cc9b5d5 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -127,15 +127,17 @@ struct SKeyboard {
bool active = false;
bool enabled = true;
- xkb_layout_index_t activeLayout = 0;
+ xkb_layout_index_t activeLayout = 0;
+ xkb_state* xkbTranslationState = nullptr;
std::string name = "";
std::string xkbFilePath = "";
SStringRuleNames currentRules;
- int repeatRate = 0;
- int repeatDelay = 0;
- int numlockOn = -1;
+ int repeatRate = 0;
+ int repeatDelay = 0;
+ int numlockOn = -1;
+ bool resolveBindsBySym = false;
// For the list lookup
bool operator==(const SKeyboard& rhs) const {