quickmarks extension to letters as well
[vimprobable.git] / keymap.h
blob395a92dd7c15be217b4e2b0b585057d1f1acd5e8
1 /*
2 (c) 2009 by Leon Winter
3 (c) 2009-2011 by Hannes Schueller
4 (c) 2009-2010 by Matto Fransen
5 (c) 2010-2011 by Hans-Peter Deifel
6 (c) 2010-2011 by Thomas Adam
7 (c) 2011 by Albert Kim
8 see LICENSE file
9 */
10 #ifndef _KEYMAP
12 #define _KEYMAP
14 /* key bindings for normal mode
15 Note: GDK_VoidSymbol is a wildcard so it matches on every modkey
17 Key keys[] = {
18 /* modmask, modkey, key, function, argument */
19 { 0, GDK_q, GDK_1, quickmark, { .s = "1" } },
20 { 0, GDK_q, GDK_2, quickmark, { .s = "2" } },
21 { 0, GDK_q, GDK_3, quickmark, { .s = "3" } },
22 { 0, GDK_q, GDK_4, quickmark, { .s = "4" } },
23 { 0, GDK_q, GDK_5, quickmark, { .s = "5" } },
24 { 0, GDK_q, GDK_6, quickmark, { .s = "6" } },
25 { 0, GDK_q, GDK_7, quickmark, { .s = "7" } },
26 { 0, GDK_q, GDK_8, quickmark, { .s = "8" } },
27 { 0, GDK_q, GDK_9, quickmark, { .s = "9" } },
28 { 0, GDK_q, GDK_0, quickmark, { .s = "0" } },
29 { 0, GDK_q, GDK_a, quickmark, { .s = "a" } },
30 { 0, GDK_q, GDK_b, quickmark, { .s = "b" } },
31 { 0, GDK_q, GDK_c, quickmark, { .s = "c" } },
32 { 0, GDK_q, GDK_d, quickmark, { .s = "d" } },
33 { 0, GDK_q, GDK_e, quickmark, { .s = "e" } },
34 { 0, GDK_q, GDK_f, quickmark, { .s = "f" } },
35 { 0, GDK_q, GDK_g, quickmark, { .s = "g" } },
36 { 0, GDK_q, GDK_h, quickmark, { .s = "h" } },
37 { 0, GDK_q, GDK_i, quickmark, { .s = "i" } },
38 { 0, GDK_q, GDK_j, quickmark, { .s = "j" } },
39 { 0, GDK_q, GDK_k, quickmark, { .s = "k" } },
40 { 0, GDK_q, GDK_l, quickmark, { .s = "l" } },
41 { 0, GDK_q, GDK_m, quickmark, { .s = "m" } },
42 { 0, GDK_q, GDK_n, quickmark, { .s = "n" } },
43 { 0, GDK_q, GDK_o, quickmark, { .s = "o" } },
44 { 0, GDK_q, GDK_p, quickmark, { .s = "p" } },
45 { 0, GDK_q, GDK_q, quickmark, { .s = "q" } },
46 { 0, GDK_q, GDK_r, quickmark, { .s = "r" } },
47 { 0, GDK_q, GDK_s, quickmark, { .s = "s" } },
48 { 0, GDK_q, GDK_t, quickmark, { .s = "t" } },
49 { 0, GDK_q, GDK_u, quickmark, { .s = "u" } },
50 { 0, GDK_q, GDK_v, quickmark, { .s = "v" } },
51 { 0, GDK_q, GDK_w, quickmark, { .s = "w" } },
52 { 0, GDK_q, GDK_x, quickmark, { .s = "x" } },
53 { 0, GDK_q, GDK_y, quickmark, { .s = "y" } },
54 { 0, GDK_q, GDK_z, quickmark, { .s = "z" } },
55 { 0, GDK_q, GDK_A, quickmark, { .s = "A" } },
56 { 0, GDK_q, GDK_B, quickmark, { .s = "B" } },
57 { 0, GDK_q, GDK_C, quickmark, { .s = "C" } },
58 { 0, GDK_q, GDK_D, quickmark, { .s = "D" } },
59 { 0, GDK_q, GDK_E, quickmark, { .s = "E" } },
60 { 0, GDK_q, GDK_F, quickmark, { .s = "F" } },
61 { 0, GDK_q, GDK_G, quickmark, { .s = "G" } },
62 { 0, GDK_q, GDK_H, quickmark, { .s = "H" } },
63 { 0, GDK_q, GDK_I, quickmark, { .s = "I" } },
64 { 0, GDK_q, GDK_J, quickmark, { .s = "J" } },
65 { 0, GDK_q, GDK_K, quickmark, { .s = "K" } },
66 { 0, GDK_q, GDK_L, quickmark, { .s = "L" } },
67 { 0, GDK_q, GDK_M, quickmark, { .s = "M" } },
68 { 0, GDK_q, GDK_N, quickmark, { .s = "N" } },
69 { 0, GDK_q, GDK_O, quickmark, { .s = "O" } },
70 { 0, GDK_q, GDK_P, quickmark, { .s = "P" } },
71 { 0, GDK_q, GDK_Q, quickmark, { .s = "Q" } },
72 { 0, GDK_q, GDK_R, quickmark, { .s = "R" } },
73 { 0, GDK_q, GDK_S, quickmark, { .s = "S" } },
74 { 0, GDK_q, GDK_T, quickmark, { .s = "T" } },
75 { 0, GDK_q, GDK_U, quickmark, { .s = "U" } },
76 { 0, GDK_q, GDK_V, quickmark, { .s = "V" } },
77 { 0, GDK_q, GDK_W, quickmark, { .s = "W" } },
78 { 0, GDK_q, GDK_X, quickmark, { .s = "X" } },
79 { 0, GDK_q, GDK_Y, quickmark, { .s = "Y" } },
80 { 0, GDK_q, GDK_Z, quickmark, { .s = "Z" } },
81 { 0, GDK_Q, GDK_1, quickmark, { .s = "1", .i = 1 } },
82 { 0, GDK_Q, GDK_2, quickmark, { .s = "2", .i = 1 } },
83 { 0, GDK_Q, GDK_3, quickmark, { .s = "3", .i = 1 } },
84 { 0, GDK_Q, GDK_4, quickmark, { .s = "4", .i = 1 } },
85 { 0, GDK_Q, GDK_5, quickmark, { .s = "5", .i = 1 } },
86 { 0, GDK_Q, GDK_6, quickmark, { .s = "6", .i = 1 } },
87 { 0, GDK_Q, GDK_7, quickmark, { .s = "7", .i = 1 } },
88 { 0, GDK_Q, GDK_8, quickmark, { .s = "8", .i = 1 } },
89 { 0, GDK_Q, GDK_9, quickmark, { .s = "9", .i = 1 } },
90 { 0, GDK_Q, GDK_0, quickmark, { .s = "0", .i = 1 } },
91 { 0, GDK_Q, GDK_a, quickmark, { .s = "a", .i = 1 } },
92 { 0, GDK_Q, GDK_b, quickmark, { .s = "b", .i = 1 } },
93 { 0, GDK_Q, GDK_c, quickmark, { .s = "c", .i = 1 } },
94 { 0, GDK_Q, GDK_d, quickmark, { .s = "d", .i = 1 } },
95 { 0, GDK_Q, GDK_e, quickmark, { .s = "e", .i = 1 } },
96 { 0, GDK_Q, GDK_f, quickmark, { .s = "f", .i = 1 } },
97 { 0, GDK_Q, GDK_g, quickmark, { .s = "g", .i = 1 } },
98 { 0, GDK_Q, GDK_h, quickmark, { .s = "h", .i = 1 } },
99 { 0, GDK_Q, GDK_i, quickmark, { .s = "i", .i = 1 } },
100 { 0, GDK_Q, GDK_j, quickmark, { .s = "j", .i = 1 } },
101 { 0, GDK_Q, GDK_k, quickmark, { .s = "k", .i = 1 } },
102 { 0, GDK_Q, GDK_l, quickmark, { .s = "l", .i = 1 } },
103 { 0, GDK_Q, GDK_m, quickmark, { .s = "m", .i = 1 } },
104 { 0, GDK_Q, GDK_n, quickmark, { .s = "n", .i = 1 } },
105 { 0, GDK_Q, GDK_o, quickmark, { .s = "o", .i = 1 } },
106 { 0, GDK_Q, GDK_p, quickmark, { .s = "p", .i = 1 } },
107 { 0, GDK_Q, GDK_q, quickmark, { .s = "q", .i = 1 } },
108 { 0, GDK_Q, GDK_r, quickmark, { .s = "r", .i = 1 } },
109 { 0, GDK_Q, GDK_s, quickmark, { .s = "s", .i = 1 } },
110 { 0, GDK_Q, GDK_t, quickmark, { .s = "t", .i = 1 } },
111 { 0, GDK_Q, GDK_u, quickmark, { .s = "u", .i = 1 } },
112 { 0, GDK_Q, GDK_v, quickmark, { .s = "v", .i = 1 } },
113 { 0, GDK_Q, GDK_w, quickmark, { .s = "w", .i = 1 } },
114 { 0, GDK_Q, GDK_x, quickmark, { .s = "x", .i = 1 } },
115 { 0, GDK_Q, GDK_y, quickmark, { .s = "y", .i = 1 } },
116 { 0, GDK_Q, GDK_z, quickmark, { .s = "z", .i = 1 } },
117 { 0, GDK_Q, GDK_A, quickmark, { .s = "A", .i = 1 } },
118 { 0, GDK_Q, GDK_B, quickmark, { .s = "B", .i = 1 } },
119 { 0, GDK_Q, GDK_C, quickmark, { .s = "C", .i = 1 } },
120 { 0, GDK_Q, GDK_D, quickmark, { .s = "D", .i = 1 } },
121 { 0, GDK_Q, GDK_E, quickmark, { .s = "E", .i = 1 } },
122 { 0, GDK_Q, GDK_F, quickmark, { .s = "F", .i = 1 } },
123 { 0, GDK_Q, GDK_G, quickmark, { .s = "G", .i = 1 } },
124 { 0, GDK_Q, GDK_H, quickmark, { .s = "H", .i = 1 } },
125 { 0, GDK_Q, GDK_I, quickmark, { .s = "I", .i = 1 } },
126 { 0, GDK_Q, GDK_J, quickmark, { .s = "J", .i = 1 } },
127 { 0, GDK_Q, GDK_K, quickmark, { .s = "K", .i = 1 } },
128 { 0, GDK_Q, GDK_L, quickmark, { .s = "L", .i = 1 } },
129 { 0, GDK_Q, GDK_M, quickmark, { .s = "M", .i = 1 } },
130 { 0, GDK_Q, GDK_N, quickmark, { .s = "N", .i = 1 } },
131 { 0, GDK_Q, GDK_O, quickmark, { .s = "O", .i = 1 } },
132 { 0, GDK_Q, GDK_P, quickmark, { .s = "P", .i = 1 } },
133 { 0, GDK_Q, GDK_Q, quickmark, { .s = "Q", .i = 1 } },
134 { 0, GDK_Q, GDK_R, quickmark, { .s = "R", .i = 1 } },
135 { 0, GDK_Q, GDK_S, quickmark, { .s = "S", .i = 1 } },
136 { 0, GDK_Q, GDK_T, quickmark, { .s = "T", .i = 1 } },
137 { 0, GDK_Q, GDK_U, quickmark, { .s = "U", .i = 1 } },
138 { 0, GDK_Q, GDK_V, quickmark, { .s = "V", .i = 1 } },
139 { 0, GDK_Q, GDK_W, quickmark, { .s = "W", .i = 1 } },
140 { 0, GDK_Q, GDK_X, quickmark, { .s = "X", .i = 1 } },
141 { 0, GDK_Q, GDK_Y, quickmark, { .s = "Y", .i = 1 } },
142 { 0, GDK_Q, GDK_Z, quickmark, { .s = "Z", .i = 1 } },
144 { 0, 0, GDK_0, scroll, {ScrollJumpTo | DirectionLeft} },
145 { 0, 0, GDK_dollar, scroll, {ScrollJumpTo | DirectionRight} },
146 { 0, GDK_g, GDK_g, scroll, {ScrollJumpTo | DirectionTop} },
147 { 0, 0, GDK_G, scroll, {ScrollJumpTo | DirectionBottom} },
148 { 0, 0, GDK_h, scroll, {ScrollMove | DirectionLeft | UnitLine} },
149 { 0, 0, GDK_j, scroll, {ScrollMove | DirectionBottom | UnitLine} },
150 { 0, 0, GDK_k, scroll, {ScrollMove | DirectionTop | UnitLine} },
151 { 0, 0, GDK_l, scroll, {ScrollMove | DirectionRight | UnitLine} },
152 { 0, 0, GDK_space, scroll, {ScrollMove | DirectionBottom | UnitPage} },
153 { GDK_SHIFT_MASK, 0, GDK_space, scroll, {ScrollMove | DirectionTop | UnitPage} },
154 { GDK_CONTROL_MASK, 0, GDK_b, scroll, {ScrollMove | DirectionTop | UnitPage} },
155 { GDK_CONTROL_MASK, 0, GDK_f, scroll, {ScrollMove | DirectionBottom | UnitPage} },
156 { GDK_CONTROL_MASK, 0, GDK_d, scroll, {ScrollMove | DirectionBottom | UnitBuffer} },
157 { GDK_CONTROL_MASK, 0, GDK_u, scroll, {ScrollMove | DirectionTop | UnitBuffer} },
158 { GDK_CONTROL_MASK, 0, GDK_e, scroll, {ScrollMove | DirectionBottom | UnitLine} },
159 { GDK_CONTROL_MASK, 0, GDK_y, scroll, {ScrollMove | DirectionTop | UnitLine} },
161 { 0, GDK_g, GDK_t, fake_key_event, { .s = "l", .i = ShiftMask + ControlMask } },
162 { 0, GDK_g, GDK_T, fake_key_event, { .s = "h", .i = ShiftMask + ControlMask } },
163 { 0, GDK_g, GDK_1, fake_key_event, { .s = "1", .i = ControlMask } },
164 { 0, GDK_g, GDK_2, fake_key_event, { .s = "2", .i = ControlMask } },
165 { 0, GDK_g, GDK_3, fake_key_event, { .s = "3", .i = ControlMask } },
166 { 0, GDK_g, GDK_4, fake_key_event, { .s = "4", .i = ControlMask } },
167 { 0, GDK_g, GDK_5, fake_key_event, { .s = "5", .i = ControlMask } },
168 { 0, GDK_g, GDK_6, fake_key_event, { .s = "6", .i = ControlMask } },
169 { 0, GDK_g, GDK_7, fake_key_event, { .s = "7", .i = ControlMask } },
170 { 0, GDK_g, GDK_8, fake_key_event, { .s = "8", .i = ControlMask } },
171 { 0, GDK_g, GDK_9, fake_key_event, { .s = "9", .i = ControlMask } },
172 { 0, GDK_g, GDK_0, fake_key_event, { .s = "0", .i = ControlMask } },
174 { GDK_CONTROL_MASK, 0, GDK_i, navigate, {NavigationBack} },
175 { GDK_CONTROL_MASK, 0, GDK_o, navigate, {NavigationForward} },
176 { 0, 0, GDK_H, navigate, {NavigationBack} },
177 { 0, 0, GDK_L, navigate, {NavigationForward} },
178 { 0, 0, GDK_r, navigate, {NavigationReload} },
179 { 0, 0, GDK_R, navigate, {NavigationForceReload} },
180 { GDK_CONTROL_MASK, 0, GDK_c, navigate, {NavigationCancel} },
182 { 0, 0, GDK_plus, zoom, {ZoomIn | ZoomText} },
183 { 0, 0, GDK_minus, zoom, {ZoomOut | ZoomText} },
184 { 0, 0, GDK_KP_Add, zoom, {ZoomIn | ZoomText} },
185 { 0, 0, GDK_KP_Subtract,zoom, {ZoomOut | ZoomText} },
186 { 0, GDK_z, GDK_i, zoom, {ZoomIn | ZoomText} },
187 { 0, GDK_z, GDK_o, zoom, {ZoomOut | ZoomText} },
188 { 0, GDK_z, GDK_z, zoom, {ZoomReset | ZoomText} },
189 { 0, GDK_z, GDK_I, zoom, {ZoomIn | ZoomFullContent} },
190 { 0, GDK_z, GDK_O, zoom, {ZoomOut | ZoomFullContent} },
191 { 0, GDK_z, GDK_Z, zoom, {ZoomReset | ZoomFullContent} },
193 { 0, 0, GDK_y, yank, {SourceURL | ClipboardPrimary | ClipboardGTK} },
194 { 0, 0, GDK_Y, yank, {SourceSelection| ClipboardPrimary | ClipboardGTK} },
196 { 0, GDK_g, GDK_u, descend, {NthSubdir} },
197 { 0, GDK_g, GDK_U, descend, {Rootdir} },
199 { 0, GDK_g, GDK_h, open_arg, {TargetCurrent, startpage} },
200 { 0, GDK_g, GDK_H, open_arg, {TargetNew, startpage} },
202 { 0, 0, GDK_p, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK} },
203 { 0, 0, GDK_P, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
205 { GDK_CONTROL_MASK, 0, GDK_a, number, {Increment} },
206 { GDK_CONTROL_MASK, 0, GDK_x, number, {Decrement} },
208 { 0, 0, GDK_n, search, {DirectionNext | CaseInsensitive | Wrapping} },
209 { 0, 0, GDK_N, search, {DirectionPrev | CaseInsensitive | Wrapping} },
211 { 0, 0, GDK_colon, input, {.s = ":" } },
212 { 0, 0, GDK_o, input, {.s = ":open "} },
213 { 0, 0, GDK_O, input, {.s = ":open ", .i = InsertCurrentURL} },
214 { 0, 0, GDK_t, input, {.s = ":tabopen "} },
215 { 0, 0, GDK_T, input, {.s = ":tabopen ", .i = InsertCurrentURL} },
216 { 0, 0, GDK_slash, input, {.s = "/"} },
217 { 0, 0, GDK_KP_Divide, input, {.s = "/"} },
218 { 0, 0, GDK_question, input, {.s = "?"} },
220 { 0, 0, GDK_period, input, {.s = "."} },
221 { 0, 0, GDK_comma, input, {.s = ","} },
222 { 0, GDK_semicolon, GDK_i, input, {.s = ";i"} },
223 { 0, GDK_semicolon, GDK_l, input, {.s = ";l"} },
224 { 0, GDK_semicolon, GDK_s, input, {.s = ";s"} },
225 { 0, GDK_semicolon, GDK_y, input, {.s = ";y"} },
226 { 0, GDK_semicolon, GDK_o, input, {.s = ";o"} },
227 { 0, GDK_semicolon, GDK_t, input, {.s = ";t"} },
228 { 0, GDK_semicolon, GDK_w, input, {.s = ";w"} },
229 { 0, GDK_semicolon, GDK_I, input, {.s = ";I"} },
230 { 0, GDK_semicolon, GDK_O, input, {.s = ";O"} },
231 { 0, GDK_semicolon, GDK_T, input, {.s = ";T"} },
232 { 0, GDK_semicolon, GDK_W, input, {.s = ";W"} },
234 /* this needs to be a binding using CTRL for obvious reasons */
235 { GDK_CONTROL_MASK, 0, GDK_t, open_editor,{} },
237 { 0, GDK_VoidSymbol, GDK_Escape, set, {ModeNormal} },
238 { GDK_CONTROL_MASK, GDK_VoidSymbol, GDK_bracketleft,set, {ModeNormal} },
239 { GDK_CONTROL_MASK, 0, GDK_z, set, {ModePassThrough} },
240 { GDK_CONTROL_MASK, 0, GDK_v, set, {ModeSendKey} },
241 { 0, 0, GDK_f, input, {.s = "."} },
242 { 0, 0, GDK_F, input, {.s = ","} },
244 { 0, GDK_g, GDK_i, focus_input,{} },
245 { 0, 0, GDK_u, revive, {} },
247 { 0, 0, GDK_d, quit, {0} },
248 /* leave this last line as last */
249 { 0, 0, 0, 0, {0} },
252 #endif