valpackett / evscript

A tiny sandboxed Dyon scripting environment for evdev input devices that lets you do e.g. xcape in Wayland | now on https://codeberg.org/valpackett/evscript
https://codeberg.org/valpackett/evscript
The Unlicense
121 stars 7 forks source link

Remap helper(?) #7

Closed tpanum closed 5 years ago

tpanum commented 5 years ago

Thanks for your solution, the xcape functionality works like a charm.

I am generally not too much into uinput in general, but would it be completely infeasible to implement an ability to remap keys?

Despite not being a rust nor dyon expert, I can kinda get a sense for conditionally emiting key presses and release. But is it infeasible to intercept uinput and modify it? (required for remapping)

valpackett commented 5 years ago

No, you can't intercept anything, i.e. you can't prevent any other device from sending their events, in evscript. You could disable other devices in your display server (compositor), and use evscript to emit all the events, but why not just remap in the display server? libxkbcommon already supports lots of remapping and I'm sure there's a way to add new things to that…

tpanum commented 5 years ago

Thanks for the suggestion. I am new in the Wayland scope, so generally everything is a bit unexplored territory for me. Thanks for the libxkbcommon suggetion, I'll look into it.

sandangel commented 4 years ago

@myfreeweb there is some key remapping that is impossible under Wayland like super+c to ctrl+c (xkb_compat RedirectKeys is not supported by libxkbcommon). I think it would be super useful to bring the ability to map 1 keys sequence to another one.