summaryrefslogtreecommitdiffstats
path: root/runtime/doc/map.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-24 13:27:36 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-24 13:27:36 +0000
commit47f1fdc28c6839ec8f5aede631d3a870624767b6 (patch)
tree1dd79cb5559e0218262250e0b0fd36f99f945854 /runtime/doc/map.txt
parent0b228cddc723af0c7ceb1cd73685b0b742f16713 (diff)
patch 9.0.0939: still using simplified mappings when using kitty protocolv9.0.0939
Problem: Still using simplified mappings when using the kitty keyboard protocol. Solution: Use the kitty_protocol_state value to decide whether to use simplified mappings. Improve how seenModifyOtherKeys is set and reset.
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r--runtime/doc/map.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 19797b2267..e0c7106644 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -971,13 +971,18 @@ using other applications but not when inside Vim.
Xterm and a few other terminals can be put in a mode where keys with modifiers
are sent with a special escape code. Vim recognizes these codes and can then
make a difference between CTRL-H and Backspace, even when Backspace sends the
-character 8. And many more special keys.
+character 8. And many more special keys, such as Tab and CTRL-I, which cannot
+be mapped separately otherwise.
For xterm modifyOtherKeys is enabled in the builtin termcap entry. If this is
not used you can enable modifyOtherKeys with these lines in your vimrc: >
let &t_TI = "\<Esc>[>4;2m"
let &t_TE = "\<Esc>[>4;m"
+This sets modifyOtherKeys to level 2. Note that modifyOtherKeys level 1 does
+not work. Some terminals do not support level 2 and then send key codes that
+Vim will not be able to correctly recognize.
+
In case the modifyOtherKeys mode causes problems you can disable it: >
let &t_TI = ""
let &t_TE = ""
@@ -1001,10 +1006,15 @@ spots an escape sequence that must have been created by it. To see if Vim
detected such an escape sequence use `:verbose map`, the first line will then
show "Seen modifyOtherKeys: true" (possibly translated).
+This automatic detection depends on receiving an escape code starting with
+"<1b>[27;". This is the normal way xterm sends these key codes. However, if
+the *formatOtherKeys* resource is set another form is used that is not
+recognized, therefore you must not set formatOtherKeys.
+
A known side effect is that in Insert mode the raw escape sequence is inserted
after the CTRL-V key. This can be used to check whether modifyOtherKeys is
enabled: In Insert mode type CTRL-SHIFT-V CTRL-V, if you get one byte then
-modifyOtherKeys is off, if you get <1b>27;5;118~ then it is on.
+modifyOtherKeys is off, if you get <1b>[27;5;118~ then it is on.
When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
Insert mode to avoid every key with a modifier causing Insert mode to end.