wez / evremap

A keyboard input remapper for Linux/Wayland systems, written by @wez
MIT License
378 stars 30 forks source link

Hardcoded modifier keys with no configuration options #42

Open drjaska opened 9 months ago

drjaska commented 9 months ago

https://github.com/wez/evremap/blob/d0e8eb231fdeaf9c6457b36c1f04164150a82ad0/src/remapper.rs#L403-L416

wez commented 3 months ago

Please provide more context on why this is an issue and what you'd like to see handled differently

drjaska commented 3 months ago

This is an issue with more intricate keyboard layouts as there can be no custom modifier keys without source code patching. Let's say that for example an user wants to unmap their capslock and replace it with a new modifier key. They are unable to define any new modifier keys such as for example F22 or Scroll Lock. This leads to them being unable to bind for example Capslock + a as a combo to produce a keypress such as Esc.

drjaska commented 3 months ago

Actually looking deeper into this and remembering more I think that the reason I opened this issue was because of non-modifier keys being removed from the keys_minus_remapped HashSet<KeyCode> which made it impossible to bind a non-modifier key to more than one remap combination. Please disregard my earlier comment which had factually incorrect reasoning as for why.

If an user wants to bind for example capslock and wasd to the arrow keys and they happen to press two or more of the wasd keys at the same time then only a single capslock combination can be remapped. If Capslock, W and A are pressed then the output would contain Up and A instead of Up and Left.