EDIT: it uses libtermkey which is now deprecated and doesn't offer nearly the level of control we can have nowadays.
I made my own simple solution, it supersedes libtermkey by better handling numpad + more modifiers. But multiclick is based on cursor coord identicity, not time difference.
NOTE: kitty's keyboard protocol is now also implemented in wezterm and foot, neovim uses only the bare minimum. My solution can handle key event types and makes good use of alternate keys to give users finer control over their keybind behaviour between layouts.
Here are the key sequences to get more input:
- to get all modifier keys, correct utf8 and proper keypad distinction, use kitty's extended keyboard protocol - enabled by
\033[<u to disable) - supported by many terminals
- to distinguish
Tab ... in other terminals, xterm says to set
modifyOtherKeys resource to
- to distinguish mouse events more easily, we can prefix them with
< by enabling
\033[?1006l to disable or
1016 for pixel precission tracking)
- to enable different levels of mouse tracking, we can add movement tracking with
I also tried to count for the differences and misses in neovim, aside of it ignoring
shift modifier and having its own unchangeable format of some escape sequences (broken horizontal scroll), their builtin terminal it is pretty good.
This all applys probbably only to xterm-like terminals, which nowadays is the vast majority, so for future reference I've put up my parser here.