kitty.conf:map ctrl+space c new_window
map ctrl+space space next_layout
ctrl+shift+key for the common case.p.s. Thanks for introducing the combine keyword for mapped functions.
No, it's not possible, but it should not be hard to add, it would basically work like combine, except that it would put the keyboard handler into an "operator pending" mode where it soaks up the next keypress and dispatches the action based on it. Something like:
map ctrl+space prefixed_cmd <key> <function>
Just FYI, there were two reasons I chose ctrl+shift as kitty's base modifier:
1) It cannot be used for most terminal programs
2) At least on my keyboard, you can press both ctrl and shift together using only a single thumb. This is why I did not add a prefix mode in the first place. To me, pressing ctrl+shift+
- At least on my keyboard, you can press both ctrl and shift together using only a single thumb. This is why I did not add a prefix mode in the first place. To me, pressing ctrl+shift+ is easier than pressing ctrl+ followed by [...]
I see. I've just tried getting used to my left thumb on ctrl+shift. I can definitely see how it could be easier and more efficient in many cases. But I find myself having to take my hands off the home row: usually my left pinky hits capslock (swapcaps) and my right hand finger hits whichever prefix key is configured.
Also, perhaps the 'operator pending' mode you described could make it possibly for an entirely mouseless use of kitty when selecting regions to copy?
Thanks again.
You can already do completely mouse free selecting of regions to copy, just press ctrl+shift+h and configure the pager used for it in kitty.conf (defaults to less) to be something that supports keyboard selection, such as vimpager. You can even (if you are running kitty from master) click urls using only the keyboard (ctrl+shift+e).
I looked into this, and while it is trivial to implement in kitty itself, it cannot be made robust because of limitations in glfw. Basically, the glfw keyboard API is too limited to make this work. See https://github.com/glfw/glfw/issues/1140 until I get around to implementing the new keybaord API for glfw, this is not possibel to implement.
Okay. Thanks again @kovidgoyal. (Incidentally, I'm also getting faster and more comfortable using left-small-finger-on-shift + left-index-on-capslock.)
This is implemented in the xkb branch.
Thank you, sir!
Most helpful comment
This is implemented in the xkb branch.