Closed tpanum closed 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…
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.
@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.
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)