mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Clarify the behavior of functional keys with no legacy encoding
See https://github.com/kovidgoyal/kitty/discussions/7037
This commit is contained in:
@@ -105,9 +105,7 @@ do not. When a key event produces text, the text is sent directly as UTF-8
|
|||||||
encoded bytes. This is safe as UTF-8 contains no C0 control codes.
|
encoded bytes. This is safe as UTF-8 contains no C0 control codes.
|
||||||
When the key event does not have text, the key event is encoded as an escape code. In
|
When the key event does not have text, the key event is encoded as an escape code. In
|
||||||
legacy compatibility mode (the default) this uses legacy escape codes, so old terminal
|
legacy compatibility mode (the default) this uses legacy escape codes, so old terminal
|
||||||
applications continue to work. Key events that could not be represented in
|
applications continue to work. For more advanced features, such as release/repeat
|
||||||
legacy mode are encoded using a ``CSI u`` escape code, that most terminal
|
|
||||||
programs should just ignore. For more advanced features, such as release/repeat
|
|
||||||
reporting etc., applications can tell the terminal they want this information by
|
reporting etc., applications can tell the terminal they want this information by
|
||||||
sending an escape code to :ref:`progressively enhance <progressive_enhancement>` the data reported for
|
sending an escape code to :ref:`progressively enhance <progressive_enhancement>` the data reported for
|
||||||
key events.
|
key events.
|
||||||
@@ -482,6 +480,12 @@ must correspond to the :kbd:`Backspace` key.
|
|||||||
All keypad keys are reported as their equivalent non-keypad keys. To
|
All keypad keys are reported as their equivalent non-keypad keys. To
|
||||||
distinguish these, use the :ref:`disambiguate <disambiguate>` flag.
|
distinguish these, use the :ref:`disambiguate <disambiguate>` flag.
|
||||||
|
|
||||||
|
Terminals may choose what they want to do about functional keys that have no
|
||||||
|
legacy encoding. kitty chooses to encode these using ``CSI u`` encoding even in
|
||||||
|
legacy mode, so that they become usable even in programs that do not
|
||||||
|
understand the full kitty keyboard protocol. However, terminals may instead choose to
|
||||||
|
ignore such keys in legacy mode instead, or have an option to control this behavior.
|
||||||
|
|
||||||
.. _legacy_text:
|
.. _legacy_text:
|
||||||
|
|
||||||
Legacy text keys
|
Legacy text keys
|
||||||
|
|||||||
Reference in New Issue
Block a user