Keyboard

Ctrl+key

It is common to have keymaps like Ctrl+s or Ctrl+q in applications of all sorts. However, keymaps like Ctrl+; or Ctrl+. mostly don’t work in terminals, which means they will not work inside tmux, vim, or emacs (in -nw) mode.

For example, in VTE-based terminals (like Terminator, or Xfce4-terminal), run cat then Ctrl+;, and it simply echoes “;” back. Try with Ctrl+/ and it prints something like ^_, meaning it did capture the combined keypresses correctly.

Therefore, if we try o map Ctrl+; in vim, for example it will not work as it will be simply interpreted as “;”.

Now try cat and Alt+;, and you’ll see it echoes ^[;, meaning it correctly captured the combined keypress.

In short, Ctrl doesn’t work with some special chars, while Alt does work mostly with any char available on the keyboard.

In Kitty, cat then Ctrl+; just prints ; (like in VTE-based terminals mentioned above), but for some reason, bkd:[Ctrl+;] still work inside vim, probably because its (advance and amazing) keyboard protocol.