From 618a05aac1c4baf5bef524da84f4117a35972613 Mon Sep 17 00:00:00 2001 From: Tobias Zimmermann Date: Wed, 28 Feb 2024 00:21:25 +0100 Subject: [PATCH] Document behavior of new resolve_binds_by_sym option (#493) --- pages/Configuring/Keywords.md | 5 ++++- pages/Configuring/Uncommon-tips-&-tricks.md | 9 ++++++++- pages/Configuring/Variables.md | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pages/Configuring/Keywords.md b/pages/Configuring/Keywords.md index 28b1dc5..0a65ce8 100644 --- a/pages/Configuring/Keywords.md +++ b/pages/Configuring/Keywords.md @@ -133,8 +133,11 @@ device { _remember about the space after the end of the device's name (before the `{`)!_ {{< hint type=info >}} -Per-device layouts will not alter the keybind keymap, so for example with a global keymap of `us` +Per-device layouts will by default not alter the keybind keymap, so for example with a global keymap of `us` and a per-device one of `fr`, the keybinds will still act as if you were on `us`. + +You can change this behavior by setting `resolve_binds_by_sym = 1`. +In that case you'll need to type the symbol specified in the bind to activate it. {{< /hint >}} # Wallpapers diff --git a/pages/Configuring/Uncommon-tips-&-tricks.md b/pages/Configuring/Uncommon-tips-&-tricks.md index 4234fb6..ad68696 100644 --- a/pages/Configuring/Uncommon-tips-&-tricks.md +++ b/pages/Configuring/Uncommon-tips-&-tricks.md @@ -11,10 +11,17 @@ input { {{< hint type=important >}} -The first layout defined in the input section will be the one used for binds. +The first layout defined in the input section will be the one used for binds by default. For example: `us,ua` -> config binds would be e.g. `SUPER, A`, while on `ua,us` -> `SUPER, Cyrillic_ef` +You can change this behavior globally or per-device by setting `resolve_binds_by_sym = 1`. +In that case, binds will activate when the symbol typed matches the symbol specified in the bind. + +For example: if your layouts are `us,fr` and have a bind for `SUPER, A` you'd need to press the +first letter on the second row while the `us` layout is active and the first letter on the first row +while the `fr` layout is active. + {{< /hint >}} You can also bind a key to execute `hyprctl switchxkblayout` for more keybind freedom. diff --git a/pages/Configuring/Variables.md b/pages/Configuring/Variables.md index 2f2641d..4ec52a1 100644 --- a/pages/Configuring/Variables.md +++ b/pages/Configuring/Variables.md @@ -166,6 +166,7 @@ _[More about Animations](../Animations)._ | kb_rules | Appropriate XKB keymap parameter | str | \[\[Empty\]\] | | kb_file | If you prefer, you can use a path to your custom .xkb file. | str | \[\[Empty\]\] | | numlock_by_default | Engage numlock by default. | bool | false | +| resolve_binds_by_sym | Determines how keybinds act when multiple layouts are used. If false, keybinds will always act as if the first specified layout were active. If true, keybinds specified by symbols activate if you type the respective symbol with the current layout. | bool | false | | repeat_rate | The repeat rate for held-down keys, in repeats per second. | int | 25 | | repeat_delay | Delay before a held-down key is repeated, in milliseconds. | int | 600 | | sensitivity | Sets the mouse input sensitivity. Value will be clamped to the range -1.0 to 1.0. [libinput#pointer-acceleration](https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#pointer-acceleration) | float | 0.0 |