Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 1601 #2247

Merged
merged 2 commits into from
Apr 1, 2024
Merged

fix 1601 #2247

merged 2 commits into from
Apr 1, 2024

Conversation

ammen99
Copy link
Member

@ammen99 ammen99 commented Mar 23, 2024

This PR is an attempt at fixing #1601.

The solution is a bit more generic than that, though: we allow generic activators in the config file. Then, a plugin needs to parse them and activate them instead of core.

Fixes #1601

@ammen99
Copy link
Member Author

ammen99 commented Mar 23, 2024

Example config:

[core]
plugins = xkb-bindings expo ...

[expo]
toggle = Mod4+e | <super> KEY_J | ...

In other words, the xkb-bindings plugin extends the available activator types with a new syntax which resembles Sway's and other compositor's a bit more closely. It also uses xkb to resolve keycodes to keysyms first, i.e the e in the example is not equivalent to KEY_E, but depends on how it is mapped exactly by the current layout. If you for example switch to a cyrillic layout (or anything else) then the binding stops working, because then KEY_E is mapped to a cyrillic letter which has a different keysym.

I'm open to feedback from the people who requested this feature, let me know whether this is what you had in mind.

@ammen99 ammen99 merged commit 11c8cd9 into master Apr 1, 2024
6 of 8 checks passed
@ammen99 ammen99 deleted the fix-1601 branch April 1, 2024 06:52
This was referenced Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting keyboard layout to colemak does not remap keybindings
1 participant