Mercurial > vim
annotate src/keymap.h @ 32228:ac2f07ae1957 v9.0.1445
patch 9.0.1445: openSUSE: configure doesn't find the Motif library
Commit: https://github.com/vim/vim/commit/01967f5b1042b375b38098eceaf31671902c8dbb
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 12 16:24:03 2023 +0100
patch 9.0.1445: openSUSE: configure doesn't find the Motif library
Problem: openSUSE: configure doesn't find the Motif library. (Tony
Mechelynck)
Solution: Also search in /usr/lib64.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Apr 2023 17:30:06 +0200 |
parents | cab7d8accab7 |
children | a0a4a774117b |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
8281
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 */ | |
8 | |
9 /* | |
595 | 10 * Keycode definitions for special keys. |
11 * | |
12 * Any special key code sequences are replaced by these codes. | |
13 */ | |
14 | |
15 /* | |
7 | 16 * For MSDOS some keys produce codes larger than 0xff. They are split into two |
17 * chars, the first one is K_NUL (same value used in term.h). | |
18 */ | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
19 #define K_NUL (0xce) // for MSDOS: special key follows |
7 | 20 |
21 /* | |
22 * K_SPECIAL is the first byte of a special key code and is always followed by | |
23 * two bytes. | |
24 * The second byte can have any value. ASCII is used for normal termcap | |
25 * entries, 0x80 and higher for special keys, see below. | |
26 * The third byte is guaranteed to be between 0x02 and 0x7f. | |
27 */ | |
28 | |
29 #define K_SPECIAL (0x80) | |
30 | |
31 /* | |
32 * Positive characters are "normal" characters. | |
33 * Negative characters are special key codes. Only characters below -0x200 | |
34 * are used to so that the absolute value can't be mistaken for a single-byte | |
35 * character. | |
36 */ | |
37 #define IS_SPECIAL(c) ((c) < 0) | |
38 | |
39 /* | |
40 * Characters 0x0100 - 0x01ff have a special meaning for abbreviations. | |
41 * Multi-byte characters also have ABBR_OFF added, thus are above 0x0200. | |
42 */ | |
43 #define ABBR_OFF 0x100 | |
44 | |
45 /* | |
46 * NUL cannot be in the input string, therefore it is replaced by | |
47 * K_SPECIAL KS_ZERO KE_FILLER | |
48 */ | |
49 #define KS_ZERO 255 | |
50 | |
51 /* | |
52 * K_SPECIAL cannot be in the input string, therefore it is replaced by | |
53 * K_SPECIAL KS_SPECIAL KE_FILLER | |
54 */ | |
55 #define KS_SPECIAL 254 | |
56 | |
57 /* | |
58 * KS_EXTRA is used for keys that have no termcap name | |
59 * K_SPECIAL KS_EXTRA KE_xxx | |
60 */ | |
61 #define KS_EXTRA 253 | |
62 | |
63 /* | |
64 * KS_MODIFIER is used when a modifier is given for a (special) key | |
65 * K_SPECIAL KS_MODIFIER bitmask | |
66 */ | |
67 #define KS_MODIFIER 252 | |
68 | |
69 /* | |
70 * These are used for the GUI | |
71 * K_SPECIAL KS_xxx KE_FILLER | |
72 */ | |
73 #define KS_MOUSE 251 | |
74 #define KS_MENU 250 | |
75 #define KS_VER_SCROLLBAR 249 | |
76 #define KS_HOR_SCROLLBAR 248 | |
77 | |
78 /* | |
79 * These are used for DEC mouse | |
80 */ | |
81 #define KS_NETTERM_MOUSE 247 | |
82 #define KS_DEC_MOUSE 246 | |
83 | |
84 /* | |
85 * Used for switching Select mode back on after a mapping or menu. | |
86 */ | |
87 #define KS_SELECT 245 | |
88 #define K_SELECT_STRING (char_u *)"\200\365X" | |
89 | |
90 /* | |
91 * Used for tearing off a menu. | |
92 */ | |
93 #define KS_TEAROFF 244 | |
94 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
95 // Used for JSB term mouse. |
7 | 96 #define KS_JSBTERM_MOUSE 243 |
97 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
98 // Used a termcap entry that produces a normal character. |
7 | 99 #define KS_KEY 242 |
100 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
101 // Used for the qnx pterm mouse. |
7 | 102 #define KS_PTERM_MOUSE 241 |
103 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
104 // Used for click in a tab pages label. |
685 | 105 #define KS_TABLINE 240 |
106 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
107 // Used for menu in a tab pages line. |
687 | 108 #define KS_TABMENU 239 |
109 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
110 // Used for the urxvt mouse. |
3145 | 111 #define KS_URXVT_MOUSE 238 |
112 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
113 // Used for the sgr mouse. |
3746 | 114 #define KS_SGR_MOUSE 237 |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
115 #define KS_SGR_MOUSE_RELEASE 236 |
3746 | 116 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
117 // Used for the GPM mouse. |
16523
a72ad8a8b249
patch 8.1.1265: when GPM mouse support is enabled double clicks do not work
Bram Moolenaar <Bram@vim.org>
parents:
13829
diff
changeset
|
118 #define KS_GPM_MOUSE 235 |
a72ad8a8b249
patch 8.1.1265: when GPM mouse support is enabled double clicks do not work
Bram Moolenaar <Bram@vim.org>
parents:
13829
diff
changeset
|
119 |
7 | 120 /* |
121 * Filler used after KS_SPECIAL and others | |
122 */ | |
123 #define KE_FILLER ('X') | |
124 | |
125 /* | |
126 * translation of three byte code "K_SPECIAL a b" into int "K_xxx" and back | |
127 */ | |
128 #define TERMCAP2KEY(a, b) (-((a) + ((int)(b) << 8))) | |
129 #define KEY2TERMCAP0(x) ((-(x)) & 0xff) | |
130 #define KEY2TERMCAP1(x) (((unsigned)(-(x)) >> 8) & 0xff) | |
131 | |
132 /* | |
133 * get second or third byte when translating special key code into three bytes | |
134 */ | |
135 #define K_SECOND(c) ((c) == K_SPECIAL ? KS_SPECIAL : (c) == NUL ? KS_ZERO : KEY2TERMCAP0(c)) | |
136 | |
137 #define K_THIRD(c) (((c) == K_SPECIAL || (c) == NUL) ? KE_FILLER : KEY2TERMCAP1(c)) | |
138 | |
139 /* | |
140 * get single int code from second byte after K_SPECIAL | |
141 */ | |
142 #define TO_SPECIAL(a, b) ((a) == KS_SPECIAL ? K_SPECIAL : (a) == KS_ZERO ? K_ZERO : TERMCAP2KEY(a, b)) | |
143 | |
144 /* | |
145 * Codes for keys that do not have a termcap name. | |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
146 * The numbers are fixed to make sure that recorded key sequences remain valid. |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
147 * Add new entries at the end, not halfway. |
7 | 148 * |
149 * K_SPECIAL KS_EXTRA KE_xxx | |
150 */ | |
151 enum key_extra | |
152 { | |
27478
ce352871b382
patch 8.2.4267: unused entry in keymap enum
Bram Moolenaar <Bram@vim.org>
parents:
27140
diff
changeset
|
153 KE_S_UP = 4 // shift-up |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
154 , KE_S_DOWN = 5 // shift-down |
7 | 155 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
156 , KE_S_F1 = 6 // shifted function keys |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
157 , KE_S_F2 = 7 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
158 , KE_S_F3 = 8 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
159 , KE_S_F4 = 9 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
160 , KE_S_F5 = 10 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
161 , KE_S_F6 = 11 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
162 , KE_S_F7 = 12 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
163 , KE_S_F8 = 13 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
164 , KE_S_F9 = 14 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
165 , KE_S_F10 = 15 |
7 | 166 |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
167 , KE_S_F11 = 16 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
168 , KE_S_F12 = 17 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
169 , KE_S_F13 = 18 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
170 , KE_S_F14 = 19 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
171 , KE_S_F15 = 20 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
172 , KE_S_F16 = 21 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
173 , KE_S_F17 = 22 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
174 , KE_S_F18 = 23 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
175 , KE_S_F19 = 24 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
176 , KE_S_F20 = 25 |
7 | 177 |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
178 , KE_S_F21 = 26 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
179 , KE_S_F22 = 27 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
180 , KE_S_F23 = 28 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
181 , KE_S_F24 = 29 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
182 , KE_S_F25 = 30 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
183 , KE_S_F26 = 31 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
184 , KE_S_F27 = 32 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
185 , KE_S_F28 = 33 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
186 , KE_S_F29 = 34 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
187 , KE_S_F30 = 35 |
7 | 188 |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
189 , KE_S_F31 = 36 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
190 , KE_S_F32 = 37 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
191 , KE_S_F33 = 38 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
192 , KE_S_F34 = 39 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
193 , KE_S_F35 = 40 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
194 , KE_S_F36 = 41 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
195 , KE_S_F37 = 42 |
7 | 196 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
197 , KE_MOUSE = 43 // mouse event start |
7 | 198 |
199 /* | |
200 * Symbols for pseudo keys which are translated from the real key symbols | |
201 * above. | |
202 */ | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
203 , KE_LEFTMOUSE = 44 // Left mouse button click |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
204 , KE_LEFTDRAG = 45 // Drag with left mouse button down |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
205 , KE_LEFTRELEASE = 46 // Left mouse button release |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
206 , KE_MIDDLEMOUSE = 47 // Middle mouse button click |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
207 , KE_MIDDLEDRAG = 48 // Drag with middle mouse button down |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
208 , KE_MIDDLERELEASE = 49 // Middle mouse button release |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
209 , KE_RIGHTMOUSE = 50 // Right mouse button click |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
210 , KE_RIGHTDRAG = 51 // Drag with right mouse button down |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
211 , KE_RIGHTRELEASE = 52 // Right mouse button release |
7 | 212 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
213 , KE_IGNORE = 53 // Ignored mouse drag/release |
7 | 214 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
215 , KE_TAB = 54 // unshifted TAB key |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
216 , KE_S_TAB_OLD = 55 // shifted TAB key (no longer used) |
7 | 217 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
218 , KE_SNIFF_UNUSED = 56 // obsolete |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
219 , KE_XF1 = 57 // extra vt100 function keys for xterm |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
220 , KE_XF2 = 58 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
221 , KE_XF3 = 59 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
222 , KE_XF4 = 60 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
223 , KE_XEND = 61 // extra (vt100) end key for xterm |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
224 , KE_ZEND = 62 // extra (vt100) end key for xterm |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
225 , KE_XHOME = 63 // extra (vt100) home key for xterm |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
226 , KE_ZHOME = 64 // extra (vt100) home key for xterm |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
227 , KE_XUP = 65 // extra vt100 cursor keys for xterm |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
228 , KE_XDOWN = 66 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
229 , KE_XLEFT = 67 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
230 , KE_XRIGHT = 68 |
7 | 231 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
232 , KE_LEFTMOUSE_NM = 69 // non-mappable Left mouse button click |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
233 , KE_LEFTRELEASE_NM = 70 // non-mappable left mouse button release |
7 | 234 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
235 , KE_S_XF1 = 71 // vt100 shifted function keys for xterm |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
236 , KE_S_XF2 = 72 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
237 , KE_S_XF3 = 73 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
238 , KE_S_XF4 = 74 |
7 | 239 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
240 // NOTE: The scroll wheel events are inverted: i.e. UP is the same as |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
241 // moving the actual scroll wheel down, LEFT is the same as moving the |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
242 // scroll wheel right. |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
243 , KE_MOUSEDOWN = 75 // scroll wheel pseudo-button Down |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
244 , KE_MOUSEUP = 76 // scroll wheel pseudo-button Up |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
245 , KE_MOUSELEFT = 77 // scroll wheel pseudo-button Left |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
246 , KE_MOUSERIGHT = 78 // scroll wheel pseudo-button Right |
7 | 247 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
248 , KE_KINS = 79 // keypad Insert key |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
249 , KE_KDEL = 80 // keypad Delete key |
7 | 250 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
251 , KE_CSI = 81 // CSI typed directly |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
252 , KE_SNR = 82 // <SNR> |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
253 , KE_PLUG = 83 // <Plug> |
27478
ce352871b382
patch 8.2.4267: unused entry in keymap enum
Bram Moolenaar <Bram@vim.org>
parents:
27140
diff
changeset
|
254 , KE_CMDWIN = 84 // open command-line window from Command-line |
ce352871b382
patch 8.2.4267: unused entry in keymap enum
Bram Moolenaar <Bram@vim.org>
parents:
27140
diff
changeset
|
255 // Mode |
7 | 256 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
257 , KE_C_LEFT = 85 // control-left |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
258 , KE_C_RIGHT = 86 // control-right |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
259 , KE_C_HOME = 87 // control-home |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
260 , KE_C_END = 88 // control-end |
7 | 261 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
262 , KE_X1MOUSE = 89 // X1/X2 mouse-buttons |
11629
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
263 , KE_X1DRAG = 90 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
264 , KE_X1RELEASE = 91 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
265 , KE_X2MOUSE = 92 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
266 , KE_X2DRAG = 93 |
1a6daa73590a
patch 8.0.0697: recorded key sequences may become invalid
Christian Brabandt <cb@256bit.org>
parents:
11557
diff
changeset
|
267 , KE_X2RELEASE = 94 |
7 | 268 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
269 , KE_DROP = 95 // DnD data is available |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
270 , KE_CURSORHOLD = 96 // CursorHold event |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
271 , KE_NOP = 97 // doesn't do something |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
272 , KE_FOCUSGAINED = 98 // focus gained |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
273 , KE_FOCUSLOST = 99 // focus lost |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
274 , KE_MOUSEMOVE = 100 // mouse moved with no button down |
24850
f8906bd5b277
patch 8.2.2963: GUI: mouse move may start Visual mode with a popup visible
Bram Moolenaar <Bram@vim.org>
parents:
22862
diff
changeset
|
275 , KE_MOUSEMOVE_XY = 101 // KE_MOUSEMOVE with coordinates |
f8906bd5b277
patch 8.2.2963: GUI: mouse move may start Visual mode with a popup visible
Bram Moolenaar <Bram@vim.org>
parents:
22862
diff
changeset
|
276 , KE_CANCEL = 102 // return from vgetc() |
f8906bd5b277
patch 8.2.2963: GUI: mouse move may start Visual mode with a popup visible
Bram Moolenaar <Bram@vim.org>
parents:
22862
diff
changeset
|
277 , KE_COMMAND = 103 // <Cmd> special key |
27140
a9eeb18e749c
patch 8.2.4099: Vim9: cannot use Vim9 syntax in mapping
Bram Moolenaar <Bram@vim.org>
parents:
24850
diff
changeset
|
278 , KE_SCRIPT_COMMAND = 104 // <ScriptCmd> special key |
28809
d0241e74bfdb
patch 8.2.4928: various white space and cosmetic mistakes
Bram Moolenaar <Bram@vim.org>
parents:
28704
diff
changeset
|
279 , KE_S_BS = 105 // shift + <BS> |
30102
539fb427124d
patch 9.0.0387: repeat <ScriptCmd> mapping doesn't use right script context
Bram Moolenaar <Bram@vim.org>
parents:
28809
diff
changeset
|
280 , KE_SID = 106 // <SID> special key, followed by {nr}; |
31281
cab7d8accab7
patch 9.0.0974: even when Esc is encoded a timeout is used
Bram Moolenaar <Bram@vim.org>
parents:
30102
diff
changeset
|
281 , KE_ESC = 107 // used for K_ESC |
7 | 282 }; |
283 | |
284 /* | |
31281
cab7d8accab7
patch 9.0.0974: even when Esc is encoded a timeout is used
Bram Moolenaar <Bram@vim.org>
parents:
30102
diff
changeset
|
285 * The three-byte codes are replaced with a negative number when using vgetc(). |
7 | 286 */ |
287 #define K_ZERO TERMCAP2KEY(KS_ZERO, KE_FILLER) | |
288 | |
31281
cab7d8accab7
patch 9.0.0974: even when Esc is encoded a timeout is used
Bram Moolenaar <Bram@vim.org>
parents:
30102
diff
changeset
|
289 #define K_ESC TERMCAP2KEY(KS_EXTRA, KE_ESC) |
cab7d8accab7
patch 9.0.0974: even when Esc is encoded a timeout is used
Bram Moolenaar <Bram@vim.org>
parents:
30102
diff
changeset
|
290 |
7 | 291 #define K_UP TERMCAP2KEY('k', 'u') |
292 #define K_DOWN TERMCAP2KEY('k', 'd') | |
293 #define K_LEFT TERMCAP2KEY('k', 'l') | |
294 #define K_RIGHT TERMCAP2KEY('k', 'r') | |
295 #define K_S_UP TERMCAP2KEY(KS_EXTRA, KE_S_UP) | |
296 #define K_S_DOWN TERMCAP2KEY(KS_EXTRA, KE_S_DOWN) | |
297 #define K_S_LEFT TERMCAP2KEY('#', '4') | |
298 #define K_C_LEFT TERMCAP2KEY(KS_EXTRA, KE_C_LEFT) | |
299 #define K_S_RIGHT TERMCAP2KEY('%', 'i') | |
300 #define K_C_RIGHT TERMCAP2KEY(KS_EXTRA, KE_C_RIGHT) | |
31281
cab7d8accab7
patch 9.0.0974: even when Esc is encoded a timeout is used
Bram Moolenaar <Bram@vim.org>
parents:
30102
diff
changeset
|
301 |
7 | 302 #define K_S_HOME TERMCAP2KEY('#', '2') |
303 #define K_C_HOME TERMCAP2KEY(KS_EXTRA, KE_C_HOME) | |
304 #define K_S_END TERMCAP2KEY('*', '7') | |
305 #define K_C_END TERMCAP2KEY(KS_EXTRA, KE_C_END) | |
31281
cab7d8accab7
patch 9.0.0974: even when Esc is encoded a timeout is used
Bram Moolenaar <Bram@vim.org>
parents:
30102
diff
changeset
|
306 |
7 | 307 #define K_TAB TERMCAP2KEY(KS_EXTRA, KE_TAB) |
308 #define K_S_TAB TERMCAP2KEY('k', 'B') | |
28704
e1aff2f300be
patch 8.2.4876: MS-Windows: Shift-BS results in strange char in powershell
Bram Moolenaar <Bram@vim.org>
parents:
27478
diff
changeset
|
309 #define K_S_BS TERMCAP2KEY(KS_EXTRA, KE_S_BS) |
7 | 310 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
311 // extra set of function keys F1-F4, for vt100 compatible xterm |
7 | 312 #define K_XF1 TERMCAP2KEY(KS_EXTRA, KE_XF1) |
313 #define K_XF2 TERMCAP2KEY(KS_EXTRA, KE_XF2) | |
314 #define K_XF3 TERMCAP2KEY(KS_EXTRA, KE_XF3) | |
315 #define K_XF4 TERMCAP2KEY(KS_EXTRA, KE_XF4) | |
316 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
317 // extra set of cursor keys for vt100 compatible xterm |
180 | 318 #define K_XUP TERMCAP2KEY(KS_EXTRA, KE_XUP) |
319 #define K_XDOWN TERMCAP2KEY(KS_EXTRA, KE_XDOWN) | |
320 #define K_XLEFT TERMCAP2KEY(KS_EXTRA, KE_XLEFT) | |
321 #define K_XRIGHT TERMCAP2KEY(KS_EXTRA, KE_XRIGHT) | |
322 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
323 #define K_F1 TERMCAP2KEY('k', '1') // function keys |
7 | 324 #define K_F2 TERMCAP2KEY('k', '2') |
325 #define K_F3 TERMCAP2KEY('k', '3') | |
326 #define K_F4 TERMCAP2KEY('k', '4') | |
327 #define K_F5 TERMCAP2KEY('k', '5') | |
328 #define K_F6 TERMCAP2KEY('k', '6') | |
329 #define K_F7 TERMCAP2KEY('k', '7') | |
330 #define K_F8 TERMCAP2KEY('k', '8') | |
331 #define K_F9 TERMCAP2KEY('k', '9') | |
332 #define K_F10 TERMCAP2KEY('k', ';') | |
333 | |
334 #define K_F11 TERMCAP2KEY('F', '1') | |
335 #define K_F12 TERMCAP2KEY('F', '2') | |
336 #define K_F13 TERMCAP2KEY('F', '3') | |
337 #define K_F14 TERMCAP2KEY('F', '4') | |
338 #define K_F15 TERMCAP2KEY('F', '5') | |
339 #define K_F16 TERMCAP2KEY('F', '6') | |
340 #define K_F17 TERMCAP2KEY('F', '7') | |
341 #define K_F18 TERMCAP2KEY('F', '8') | |
342 #define K_F19 TERMCAP2KEY('F', '9') | |
343 #define K_F20 TERMCAP2KEY('F', 'A') | |
344 | |
345 #define K_F21 TERMCAP2KEY('F', 'B') | |
346 #define K_F22 TERMCAP2KEY('F', 'C') | |
347 #define K_F23 TERMCAP2KEY('F', 'D') | |
348 #define K_F24 TERMCAP2KEY('F', 'E') | |
349 #define K_F25 TERMCAP2KEY('F', 'F') | |
350 #define K_F26 TERMCAP2KEY('F', 'G') | |
351 #define K_F27 TERMCAP2KEY('F', 'H') | |
352 #define K_F28 TERMCAP2KEY('F', 'I') | |
353 #define K_F29 TERMCAP2KEY('F', 'J') | |
354 #define K_F30 TERMCAP2KEY('F', 'K') | |
355 | |
356 #define K_F31 TERMCAP2KEY('F', 'L') | |
357 #define K_F32 TERMCAP2KEY('F', 'M') | |
358 #define K_F33 TERMCAP2KEY('F', 'N') | |
359 #define K_F34 TERMCAP2KEY('F', 'O') | |
360 #define K_F35 TERMCAP2KEY('F', 'P') | |
361 #define K_F36 TERMCAP2KEY('F', 'Q') | |
362 #define K_F37 TERMCAP2KEY('F', 'R') | |
363 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
364 // extra set of shifted function keys F1-F4, for vt100 compatible xterm |
7 | 365 #define K_S_XF1 TERMCAP2KEY(KS_EXTRA, KE_S_XF1) |
366 #define K_S_XF2 TERMCAP2KEY(KS_EXTRA, KE_S_XF2) | |
367 #define K_S_XF3 TERMCAP2KEY(KS_EXTRA, KE_S_XF3) | |
368 #define K_S_XF4 TERMCAP2KEY(KS_EXTRA, KE_S_XF4) | |
369 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
370 #define K_S_F1 TERMCAP2KEY(KS_EXTRA, KE_S_F1) // shifted func. keys |
7 | 371 #define K_S_F2 TERMCAP2KEY(KS_EXTRA, KE_S_F2) |
372 #define K_S_F3 TERMCAP2KEY(KS_EXTRA, KE_S_F3) | |
373 #define K_S_F4 TERMCAP2KEY(KS_EXTRA, KE_S_F4) | |
374 #define K_S_F5 TERMCAP2KEY(KS_EXTRA, KE_S_F5) | |
375 #define K_S_F6 TERMCAP2KEY(KS_EXTRA, KE_S_F6) | |
376 #define K_S_F7 TERMCAP2KEY(KS_EXTRA, KE_S_F7) | |
377 #define K_S_F8 TERMCAP2KEY(KS_EXTRA, KE_S_F8) | |
378 #define K_S_F9 TERMCAP2KEY(KS_EXTRA, KE_S_F9) | |
379 #define K_S_F10 TERMCAP2KEY(KS_EXTRA, KE_S_F10) | |
380 | |
381 #define K_S_F11 TERMCAP2KEY(KS_EXTRA, KE_S_F11) | |
382 #define K_S_F12 TERMCAP2KEY(KS_EXTRA, KE_S_F12) | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
383 // K_S_F13 to K_S_F37 are currently not used |
7 | 384 |
385 #define K_HELP TERMCAP2KEY('%', '1') | |
386 #define K_UNDO TERMCAP2KEY('&', '8') | |
387 | |
388 #define K_BS TERMCAP2KEY('k', 'b') | |
389 | |
390 #define K_INS TERMCAP2KEY('k', 'I') | |
391 #define K_KINS TERMCAP2KEY(KS_EXTRA, KE_KINS) | |
392 #define K_DEL TERMCAP2KEY('k', 'D') | |
393 #define K_KDEL TERMCAP2KEY(KS_EXTRA, KE_KDEL) | |
394 #define K_HOME TERMCAP2KEY('k', 'h') | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
395 #define K_KHOME TERMCAP2KEY('K', '1') // keypad home (upper left) |
7 | 396 #define K_XHOME TERMCAP2KEY(KS_EXTRA, KE_XHOME) |
230 | 397 #define K_ZHOME TERMCAP2KEY(KS_EXTRA, KE_ZHOME) |
7 | 398 #define K_END TERMCAP2KEY('@', '7') |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
399 #define K_KEND TERMCAP2KEY('K', '4') // keypad end (lower left) |
7 | 400 #define K_XEND TERMCAP2KEY(KS_EXTRA, KE_XEND) |
230 | 401 #define K_ZEND TERMCAP2KEY(KS_EXTRA, KE_ZEND) |
7 | 402 #define K_PAGEUP TERMCAP2KEY('k', 'P') |
403 #define K_PAGEDOWN TERMCAP2KEY('k', 'N') | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
404 #define K_KPAGEUP TERMCAP2KEY('K', '3') // keypad pageup (upper R.) |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
405 #define K_KPAGEDOWN TERMCAP2KEY('K', '5') // keypad pagedown (lower R.) |
7 | 406 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
407 #define K_KPLUS TERMCAP2KEY('K', '6') // keypad plus |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
408 #define K_KMINUS TERMCAP2KEY('K', '7') // keypad minus |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
409 #define K_KDIVIDE TERMCAP2KEY('K', '8') // keypad / |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
410 #define K_KMULTIPLY TERMCAP2KEY('K', '9') // keypad * |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
411 #define K_KENTER TERMCAP2KEY('K', 'A') // keypad Enter |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
412 #define K_KPOINT TERMCAP2KEY('K', 'B') // keypad . or , |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
413 #define K_PS TERMCAP2KEY('P', 'S') // paste start |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
414 #define K_PE TERMCAP2KEY('P', 'E') // paste end |
7 | 415 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
416 #define K_K0 TERMCAP2KEY('K', 'C') // keypad 0 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
417 #define K_K1 TERMCAP2KEY('K', 'D') // keypad 1 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
418 #define K_K2 TERMCAP2KEY('K', 'E') // keypad 2 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
419 #define K_K3 TERMCAP2KEY('K', 'F') // keypad 3 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
420 #define K_K4 TERMCAP2KEY('K', 'G') // keypad 4 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
421 #define K_K5 TERMCAP2KEY('K', 'H') // keypad 5 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
422 #define K_K6 TERMCAP2KEY('K', 'I') // keypad 6 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
423 #define K_K7 TERMCAP2KEY('K', 'J') // keypad 7 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
424 #define K_K8 TERMCAP2KEY('K', 'K') // keypad 8 |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
425 #define K_K9 TERMCAP2KEY('K', 'L') // keypad 9 |
7 | 426 |
427 #define K_MOUSE TERMCAP2KEY(KS_MOUSE, KE_FILLER) | |
428 #define K_MENU TERMCAP2KEY(KS_MENU, KE_FILLER) | |
429 #define K_VER_SCROLLBAR TERMCAP2KEY(KS_VER_SCROLLBAR, KE_FILLER) | |
430 #define K_HOR_SCROLLBAR TERMCAP2KEY(KS_HOR_SCROLLBAR, KE_FILLER) | |
431 | |
432 #define K_NETTERM_MOUSE TERMCAP2KEY(KS_NETTERM_MOUSE, KE_FILLER) | |
433 #define K_DEC_MOUSE TERMCAP2KEY(KS_DEC_MOUSE, KE_FILLER) | |
434 #define K_JSBTERM_MOUSE TERMCAP2KEY(KS_JSBTERM_MOUSE, KE_FILLER) | |
435 #define K_PTERM_MOUSE TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER) | |
3273 | 436 #define K_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER) |
3746 | 437 #define K_SGR_MOUSE TERMCAP2KEY(KS_SGR_MOUSE, KE_FILLER) |
11557
7e5e76d8d451
patch 8.0.0661: recognizing urxvt mouse codes does not work well
Christian Brabandt <cb@256bit.org>
parents:
10644
diff
changeset
|
438 #define K_SGR_MOUSERELEASE TERMCAP2KEY(KS_SGR_MOUSE_RELEASE, KE_FILLER) |
7 | 439 |
440 #define K_SELECT TERMCAP2KEY(KS_SELECT, KE_FILLER) | |
441 #define K_TEAROFF TERMCAP2KEY(KS_TEAROFF, KE_FILLER) | |
442 | |
685 | 443 #define K_TABLINE TERMCAP2KEY(KS_TABLINE, KE_FILLER) |
687 | 444 #define K_TABMENU TERMCAP2KEY(KS_TABMENU, KE_FILLER) |
685 | 445 |
7 | 446 /* |
447 * Symbols for pseudo keys which are translated from the real key symbols | |
448 * above. | |
449 */ | |
450 #define K_LEFTMOUSE TERMCAP2KEY(KS_EXTRA, KE_LEFTMOUSE) | |
451 #define K_LEFTMOUSE_NM TERMCAP2KEY(KS_EXTRA, KE_LEFTMOUSE_NM) | |
452 #define K_LEFTDRAG TERMCAP2KEY(KS_EXTRA, KE_LEFTDRAG) | |
453 #define K_LEFTRELEASE TERMCAP2KEY(KS_EXTRA, KE_LEFTRELEASE) | |
454 #define K_LEFTRELEASE_NM TERMCAP2KEY(KS_EXTRA, KE_LEFTRELEASE_NM) | |
12865
ebb4f6c93598
patch 8.0.1309: cannot use 'balloonexpr' in a terminal
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
455 #define K_MOUSEMOVE TERMCAP2KEY(KS_EXTRA, KE_MOUSEMOVE) |
7 | 456 #define K_MIDDLEMOUSE TERMCAP2KEY(KS_EXTRA, KE_MIDDLEMOUSE) |
457 #define K_MIDDLEDRAG TERMCAP2KEY(KS_EXTRA, KE_MIDDLEDRAG) | |
458 #define K_MIDDLERELEASE TERMCAP2KEY(KS_EXTRA, KE_MIDDLERELEASE) | |
459 #define K_RIGHTMOUSE TERMCAP2KEY(KS_EXTRA, KE_RIGHTMOUSE) | |
460 #define K_RIGHTDRAG TERMCAP2KEY(KS_EXTRA, KE_RIGHTDRAG) | |
461 #define K_RIGHTRELEASE TERMCAP2KEY(KS_EXTRA, KE_RIGHTRELEASE) | |
22862
6d50182e7e24
patch 8.2.1978: making a mapping work in all modes is complicated
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
462 #define K_X1MOUSE TERMCAP2KEY(KS_EXTRA, KE_X1MOUSE) |
6d50182e7e24
patch 8.2.1978: making a mapping work in all modes is complicated
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
463 #define K_X1MOUSE TERMCAP2KEY(KS_EXTRA, KE_X1MOUSE) |
7 | 464 #define K_X1DRAG TERMCAP2KEY(KS_EXTRA, KE_X1DRAG) |
465 #define K_X1RELEASE TERMCAP2KEY(KS_EXTRA, KE_X1RELEASE) | |
22862
6d50182e7e24
patch 8.2.1978: making a mapping work in all modes is complicated
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
466 #define K_X2MOUSE TERMCAP2KEY(KS_EXTRA, KE_X2MOUSE) |
7 | 467 #define K_X2DRAG TERMCAP2KEY(KS_EXTRA, KE_X2DRAG) |
468 #define K_X2RELEASE TERMCAP2KEY(KS_EXTRA, KE_X2RELEASE) | |
469 | |
470 #define K_IGNORE TERMCAP2KEY(KS_EXTRA, KE_IGNORE) | |
620 | 471 #define K_NOP TERMCAP2KEY(KS_EXTRA, KE_NOP) |
13829
044337cbf854
patch 8.0.1786: no test for 'termwinkey'
Christian Brabandt <cb@256bit.org>
parents:
12865
diff
changeset
|
472 #define K_CANCEL TERMCAP2KEY(KS_EXTRA, KE_CANCEL) |
7 | 473 |
474 #define K_MOUSEDOWN TERMCAP2KEY(KS_EXTRA, KE_MOUSEDOWN) | |
475 #define K_MOUSEUP TERMCAP2KEY(KS_EXTRA, KE_MOUSEUP) | |
2409
0ca06a92adfb
Add support for horizontal scroll wheel. (Bjorn Winckler)
Bram Moolenaar <bram@vim.org>
parents:
1380
diff
changeset
|
476 #define K_MOUSELEFT TERMCAP2KEY(KS_EXTRA, KE_MOUSELEFT) |
0ca06a92adfb
Add support for horizontal scroll wheel. (Bjorn Winckler)
Bram Moolenaar <bram@vim.org>
parents:
1380
diff
changeset
|
477 #define K_MOUSERIGHT TERMCAP2KEY(KS_EXTRA, KE_MOUSERIGHT) |
7 | 478 |
479 #define K_CSI TERMCAP2KEY(KS_EXTRA, KE_CSI) | |
480 #define K_SNR TERMCAP2KEY(KS_EXTRA, KE_SNR) | |
481 #define K_PLUG TERMCAP2KEY(KS_EXTRA, KE_PLUG) | |
482 #define K_CMDWIN TERMCAP2KEY(KS_EXTRA, KE_CMDWIN) | |
483 | |
484 #define K_DROP TERMCAP2KEY(KS_EXTRA, KE_DROP) | |
1380 | 485 #define K_FOCUSGAINED TERMCAP2KEY(KS_EXTRA, KE_FOCUSGAINED) |
486 #define K_FOCUSLOST TERMCAP2KEY(KS_EXTRA, KE_FOCUSLOST) | |
7 | 487 |
203 | 488 #define K_CURSORHOLD TERMCAP2KEY(KS_EXTRA, KE_CURSORHOLD) |
489 | |
22862
6d50182e7e24
patch 8.2.1978: making a mapping work in all modes is complicated
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
490 #define K_COMMAND TERMCAP2KEY(KS_EXTRA, KE_COMMAND) |
27140
a9eeb18e749c
patch 8.2.4099: Vim9: cannot use Vim9 syntax in mapping
Bram Moolenaar <Bram@vim.org>
parents:
24850
diff
changeset
|
491 #define K_SCRIPT_COMMAND TERMCAP2KEY(KS_EXTRA, KE_SCRIPT_COMMAND) |
30102
539fb427124d
patch 9.0.0387: repeat <ScriptCmd> mapping doesn't use right script context
Bram Moolenaar <Bram@vim.org>
parents:
28809
diff
changeset
|
492 #define K_SID TERMCAP2KEY(KS_EXTRA, KE_SID) |
22862
6d50182e7e24
patch 8.2.1978: making a mapping work in all modes is complicated
Bram Moolenaar <Bram@vim.org>
parents:
18753
diff
changeset
|
493 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
494 // Bits for modifier mask |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
495 // 0x01 cannot be used, because the modifier must be 0x02 or higher |
7 | 496 #define MOD_MASK_SHIFT 0x02 |
497 #define MOD_MASK_CTRL 0x04 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
498 #define MOD_MASK_ALT 0x08 // aka META |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
499 #define MOD_MASK_META 0x10 // META when it's different from ALT |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
500 #define MOD_MASK_2CLICK 0x20 // use MOD_MASK_MULTI_CLICK |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
501 #define MOD_MASK_3CLICK 0x40 // use MOD_MASK_MULTI_CLICK |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
502 #define MOD_MASK_4CLICK 0x60 // use MOD_MASK_MULTI_CLICK |
12716
351cf7c67bbe
patch 8.0.1236: Mac features are confusing
Christian Brabandt <cb@256bit.org>
parents:
11629
diff
changeset
|
503 #ifdef MACOS_X |
179 | 504 # define MOD_MASK_CMD 0x80 |
7 | 505 #endif |
506 | |
507 #define MOD_MASK_MULTI_CLICK (MOD_MASK_2CLICK|MOD_MASK_3CLICK|MOD_MASK_4CLICK) | |
508 | |
509 /* | |
510 * The length of the longest special key name, including modifiers. | |
10644
2025bec9175f
patch 8.0.0212: buffer for key name may be too small
Christian Brabandt <cb@256bit.org>
parents:
10640
diff
changeset
|
511 * Current longest is <M-C-S-T-D-A-4-ScrollWheelRight> (length includes '<' and |
2025bec9175f
patch 8.0.0212: buffer for key name may be too small
Christian Brabandt <cb@256bit.org>
parents:
10640
diff
changeset
|
512 * '>'). |
7 | 513 */ |
10644
2025bec9175f
patch 8.0.0212: buffer for key name may be too small
Christian Brabandt <cb@256bit.org>
parents:
10640
diff
changeset
|
514 #define MAX_KEY_NAME_LEN 32 |
7 | 515 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
516 /* |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
16523
diff
changeset
|
517 * Maximum length of a special key event as tokens. This includes modifiers. |
179 | 518 * The longest event is something like <M-C-S-T-4-LeftDrag> which would be the |
7 | 519 * following string of tokens: |
520 * | |
521 * <K_SPECIAL> <KS_MODIFIER> bitmask <K_SPECIAL> <KS_EXTRA> <KT_LEFTDRAG>. | |
522 * | |
523 * This is a total of 6 tokens, and is currently the longest one possible. | |
524 */ | |
525 #define MAX_KEY_CODE_LEN 6 |