I want to hook into linux desktop key event handling.
Pressing CapsLock should enter some sort of command line.
Some of the commands I want to implement:
- d/x: Delete from current cursor position until character
x
. (inspired by vi) - a: Goto to beginning of line, like pos1. (inspired by emacs).
- k: Delete until end of line. (inspired by emacs).
- ...
The commands should work in any text field: Browser, Mail Client, gnome terminal, ...
AFAIK low level xmodmap won't help me here.
Is something like this possible?
Where do I need to place the hook?
Current target platform is Ubuntu >= 14.04
Background: I want to keep my pointing fingers on F and J, and use the computer without looking at the keyboard. Works for A-Z since several years, but keys like Pos1/End are not easy to access.
Please leave a comment if you don't understand a part of this question. Thank you.
Update
This question is only about how to hook into the key event handling. The other stuff (command line) is a different topic. How can you catch for example CapsLock x
?
Update2 I see there is no easy and straight forward solution. If you have no answer, but you know where I can find more help (like ask on mailing list FOO), please tell me.
Update3 Since some people do not understand what I want, I try to explain it: If I use emacs or bash I feel like being in control if the computer: it is like flying, with only very few movements I can tell the computer to do what I want. Editing text in webbrowser textarea, LibreOffice or using thunderbird makes this feeling go away. Cursor movements are cumbersome, it does not feel like flying. I want to control the desktop, not just a single application, and keep my pointing fingers on the F and J keys.
Update 4: Solution: input-remapper
I found a great solution to it: input-remapper. See my small article Ten Flying Fingers (more comfortable touch typing)