diff --git a/runtime/doc/tui.txt b/runtime/doc/tui.txt index 7d6a8d098c..38c20ee0a5 100644 --- a/runtime/doc/tui.txt +++ b/runtime/doc/tui.txt @@ -189,11 +189,17 @@ If your terminal emulator responds with > CSI ? u this means your terminal supports the "CSI u" encoding and Nvim will tell your terminal to enable it by writing the sequence > - CSI > 1 u + CSI > 3 u If your terminal does not support "CSI u" then Nvim will instead enable the "modifyOtherKeys" encoding by writing the sequence > CSI > 4 ; 2 m +The "3" requests the kitty keyboard protocol "progressive enhancement" flags +1 (disambiguate escape codes) and 2 (report event types). Nvim does not +request 8 (report all keys as escape codes) nor 16 (report associated text), +which are needed to distinguish keys that produce the same text as their +unmodified counterpart, such as and . + When Nvim exits cleanly it will send the corresponding sequence to disable the special key encoding. If Nvim does not exit cleanly then your terminal emulator could be in a bad state. If this happens, simply run "reset".