kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.11k stars 972 forks source link

Ctrl+Alt+number keys don't send anything #564

Closed mbunkus closed 6 years ago

mbunkus commented 6 years ago

I'm using e.g. Ctrl+Alt+6 in Emacs for something similar to delete-indentation (with delete-indentation on Alt+6). kitty doesn't send anything for any of the Ctrl+Alt+ combinations, whereas VTE-based programs (e.g. terminator) and konsole do send various codes.

I've tested this with kitty 0.10.0 at fe65b346c1c0ffa80828a5aa390529f2a8b64a2f.

kovidgoyal commented 6 years ago

ctrl+alt+number (and ctrl+number) is unuseable in terminals. Use showkey -a and you will see that in VTE based terminals it generates the same bytes as Alt+number. So if you want to use it in kitty, simply press Alt+number instead, which is one less chord. Or use the send_text directive in kitty.conf to manually map them to send the same bytes as alt+number.

Or convince the emacs maintiners to exit the stone age and add support for a proper terminal keyboard protocol, as documented here: https://github.com/kovidgoyal/kitty/blob/master/protocol-extensions.asciidoc

mbunkus commented 6 years ago

At least konsole differentiates between all three variants, and Emacs does recognize those as M-6, C-6 and C-M-6 respectively:

deepinscreenshot_konsole_20180522122634

terminator doesn't differentiate between Ctrl+6 and Ctrl+Alt+6, though. It does differentiate between Ctrl+6 and Alt+6, though, same way kitty does.

kovidgoyal commented 6 years ago

Try it with 1, 9 or 0 instead of 6. As I said, the only modifier you can use reliably with number keys is alt.