5 ms·
I am also using a custom keyboard layout (basically the movement layer from the NEO layout + left alt → left ctrl, right alt → left alt, caps lock → esc). Initi
by renke1 6y ago
I am also using a custom keyboard layout (basically the movement layer from the NEO layout + left alt → left ctrl, right alt → left alt, caps lock → esc). Initially it was implemented as xmodmap, then as xkb layout and finally as C program using Interception Tools [0]. I had problems with both xmodmap and xkb where it wouldn't work in certain applications; Interception tools works everywhere (even in VMs and outside of X/Wayland).
[0]: https://gitlab.com/interception/linux/tools/blob/master/README.md https://gitlab.com/interception/linux/tools/blob/master/READ...
- codethief 6y agoI came here to mention Interception Tools and you beat me to it! They really do work incredibly well! Currently I'm only using them to map my space bar to Ctrl upon holding using this[0] plugin. [0] https://gitlab.com/interception/linux/plugins/dual-function-keys https://gitlab.com/interception/linux/plugins/dual-function-...
- lejboua 6y agoThanks for this! I wanted to have a space that doubles as a layer key if kept pressed, and I wasn't having great success trying to do it with a custom program using the X bindings. This seems way simpler, while also more powerful.
- Fnoord 6y agoI'm looking for a way to have a key press becoming a repeated key press (for example 'a' producing 'a' every 150 ms). Is that possible with this software? I'm able to do it with AutoHotKey, but I'm unable to get it to work in Wine.
- renke1 6y agoI am pretty sure this is possible. The program called by Interception Tools can basically do anything (including being stateful), it just reads input events, rewrites it, ignores it, or raises entirely different input events etc. You could probably move your mouse with arrow keys if you wanted to.
- Fnoord 6y agoWhat it would need is some kind of way to define delay. Is that possible? I've tried this with multiple programs, including one where you could script in Python. Never got it to work, sadly.
- Fnoord 6y agoI've been able to get AutoHotKey working with almost the same script I use on Windows (had to make a few adjustments because keys were not recognized even though they're exactly the same). The way I got it working is by running it in the same Wine container. I still prefer a native tool, to be fair, but I haven't been able to Interception to work. It seems a bit too complicated to my liking. Not that AHK is not complicated (it is) but the documentation is superb.
- renke1 6y agoHere is my layout for people who wonder how it is implemented. https://gist.github.com/renke/e08a6822df0e26b314288378db9d770a https://gist.github.com/renke/e08a6822df0e26b314288378db9d77...
- fock 6y agoDoes it need root/sudo? Or only plugdev or some other "sit-in-front"-privileged group and there you go?
- renke1 6y agoI don't think the program itself needs elevated privileges, because it only reads from stdin and writes to stdout. I am running the interception tools as systemd service, though. I think the Intercepton Tools themselves need elevated privileges; I mean, it's kind of key logger if you think about it.