According to the documentation (':he keycodes'), in insert mode a
key combination '<ctrl-k>[key]' (where '[key]' is a key combination
described in 'equivalent' column) should insert the string described
in 'notation' column. 

On my machine though those key combinations either don't do anything 
or insert wrong strings. For example, a key labeled 'Backspace' on 
the keyboard emits (according to 'showkey -a') ascii code 127, and a 
key labeled 'Delete' emits a sequence of ascii codes: 27,91,51,126. 
I expected that '<ctrl-k>[key labeled "Backspace"]' will insert a 
string '<Del>' (since it emits ascii code of delete key) and
'<ctrl-k>[key labeled "Delete"]' won't insert any string representing
a key name (since ascii codes emitted by this key don't correspond to
any special key). Instead, I get '<BS>' and '<Del>', respectively.

On the other hand, most other key combinations which emit ascii codes
corresponding to special keys don't insert the expected strings.
For example, '<ctrl-k><ctrl-h>' don't insert '<Tab>' (or anything else).

Is it a bug or am I missing something?

                            

Below is a summery of key combinations representing '[key]', ascii
codes those combinations emit on my machine, expected inserted string
and actually inserted string.

+-------------+--------------+------------+----------+
|     key     |     ascii    | expected   |  actual  |
+-------------+--------------+------------+----------+
| 'Backspace' | 127          | '<Del>'    | '<BS>'   |
| 'Delete'    | 27,91,51,126 | -          | '<Del>'  |
| ctrl-h      | 8            | '<BS>'     | '?'      |
| ctrl-i      | 9            | '<Tab>'    | '?'      |
| ctrl-j      | 10           | '<NL>'     | '?'      |
| ctrl-l      | 12           | '<FF>'     | '?'      |
| ctrl-m      | 13           | '<CR>'     | '?'      |
| ctrl-[      | 27           | '<Esc>'    | ''       |
| <           | 60           | '<lt>'     | '<'      |
| \           | 92           | '<Bslash>' | '\'      |
| |           | 124          | '<Bar>'    | 'Ś'      |
+-------------+--------------+------------+----------+


-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui