wez / evremap

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

Inability to use remapped keys to remap more keys #41

Open drjaska opened 10 months ago

drjaska commented 10 months ago

I was considering switching away from keyszer which is an xkeysnail fork to everemap but found issues while migrating my configuration over.

Keys which have been remapped are unable to be remapped again. I found this by trying to remap capslock to F20 and then have other remaps depend on F20 with another key.

Configurations like this would be ideal:

[[remap]]
input = ["KEY_CAPSLOCK"]
output = ["KEY_F20"]

[[remap]]
input = ["KEY_F20", "KEY_W"]
output = ["KEY_HOME"]

[[remap]]
# this "deadnaming" could work for me but would probably be unintuitive for others
input = ["KEY_CAPSLOCK", "KEY_R"]
output = ["KEY_END"]

This would effectively disable capslock while still providing it as a modifier key for other remaps.

I also tried this remap but it sends w and q separately instead of remapping them to numlock.

[[remap]]
input = ["KEY_CAPSLOCK"]
output = ["KEY_W", "KEY_Q"]

[[remap]]
input = ["KEY_W", "KEY_Q"]
output = ["KEY_NUMLOCK"]
[[remap]]
input = ["KEY_CAPSLOCK"]
output = ["KEY_LEFTSHIFT", "KEY_Q"]

[[remap]]
input = ["KEY_LEFTSHIFT", "KEY_Q"]
output = ["KEY_NUMLOCK"]

This last one only types Q (capitalized) into a notepad.

drjaska commented 10 months ago

https://github.com/wez/evremap/blob/d0e8eb231fdeaf9c6457b36c1f04164150a82ad0/src/remapper.rs#L173-L174

This was an intended design decision? Why??

wez commented 4 months ago

The thinking was that it was the simplest and least-surprising outcome for most people