diff options
author | jadedpasta <86900272+jadedpasta@users.noreply.github.com> | 2024-05-23 13:36:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 18:36:14 +0000 |
commit | a89d4f50dc6ac0256d6d52371c3711107de8c7d2 (patch) | |
tree | f07599c8e1f09a593d41e8107e4991049dc66e2b /scripts/create-flamegraph.sh | |
parent | 8dc27cebce277392bda3ef27671750990e1bde4f (diff) | |
download | alacritty-a89d4f50dc6ac0256d6d52371c3711107de8c7d2.tar.gz alacritty-a89d4f50dc6ac0256d6d52371c3711107de8c7d2.zip |
Fix Kitty protocol reporting shifted keycodes
The [kitty keyboard protocol][1] explicitly requires that the
*un-shifted* version of the pressed key is used to report the primary
code point in `CSI code-point;modifiers u` sequences.
> Note that the codepoint used is always the lower-case (or more
> technically, un-shifted) version of the key. If the user presses, for
> example, ctrl+shift+a the escape code would be CSI 97;modifiers u. It
> must not be CSI 65; modifiers u.
Alacritty's current behavior is to report the shifted version when shift
is pressed, and the un-shifted version otherwise:
```console
# Note that you'll have to kill Alacritty after running this to get
# control back!
$ echo -ne '\x1b[>1u'; cat
^[[97;5u^[[65;6u
```
The above was generated by pressing `CTRL`+`a` followed by
`CTRL`+`SHIFT`+`a` after running the command. Here `97` and `65` are the
codepoints for `a` and `A` respectively.
This change makes Alacritty match the protocol (and Kitty's) behavior.
With this change applied, `97` is reported for both `CTRL`+`a` and
`CTRL`+`SHIFT`+`a`.
[1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#key-codes
Diffstat (limited to 'scripts/create-flamegraph.sh')
0 files changed, 0 insertions, 0 deletions