new setting to ignore Javascript focus event on page load as defined by
[vimprobable2.git] / keymap.h
blob7ba5d0bf9ffc69c9f48e32bf72db29db8fb7224c
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, 0, GDK_0, scroll, {ScrollJumpTo | DirectionLeft} },
29 { 0, 0, GDK_dollar, scroll, {ScrollJumpTo | DirectionRight} },
30 { 0, GDK_g, GDK_g, scroll, {ScrollJumpTo | DirectionTop} },
31 { 0, 0, GDK_G, scroll, {ScrollJumpTo | DirectionBottom} },
32 { 0, 0, GDK_h, scroll, {ScrollMove | DirectionLeft | UnitLine} },
33 { 0, 0, GDK_j, scroll, {ScrollMove | DirectionBottom | UnitLine} },
34 { 0, 0, GDK_k, scroll, {ScrollMove | DirectionTop | UnitLine} },
35 { 0, 0, GDK_l, scroll, {ScrollMove | DirectionRight | UnitLine} },
36 { 0, 0, GDK_space, scroll, {ScrollMove | DirectionBottom | UnitPage} },
37 { GDK_SHIFT_MASK, 0, GDK_space, scroll, {ScrollMove | DirectionTop | UnitPage} },
38 { GDK_CONTROL_MASK, 0, GDK_b, scroll, {ScrollMove | DirectionTop | UnitPage} },
39 { GDK_CONTROL_MASK, 0, GDK_f, scroll, {ScrollMove | DirectionBottom | UnitPage} },
40 { GDK_CONTROL_MASK, 0, GDK_d, scroll, {ScrollMove | DirectionBottom | UnitBuffer} },
41 { GDK_CONTROL_MASK, 0, GDK_u, scroll, {ScrollMove | DirectionTop | UnitBuffer} },
42 { GDK_CONTROL_MASK, 0, GDK_e, scroll, {ScrollMove | DirectionBottom | UnitLine} },
43 { GDK_CONTROL_MASK, 0, GDK_y, scroll, {ScrollMove | DirectionTop | UnitLine} },
45 { 0, GDK_g, GDK_t, fake_key_event, { .s = "l", .i = ShiftMask + ControlMask } },
46 { 0, GDK_g, GDK_T, fake_key_event, { .s = "h", .i = ShiftMask + ControlMask } },
47 { 0, GDK_g, GDK_1, fake_key_event, { .s = "1", .i = ControlMask } },
48 { 0, GDK_g, GDK_2, fake_key_event, { .s = "2", .i = ControlMask } },
49 { 0, GDK_g, GDK_3, fake_key_event, { .s = "3", .i = ControlMask } },
50 { 0, GDK_g, GDK_4, fake_key_event, { .s = "4", .i = ControlMask } },
51 { 0, GDK_g, GDK_5, fake_key_event, { .s = "5", .i = ControlMask } },
52 { 0, GDK_g, GDK_6, fake_key_event, { .s = "6", .i = ControlMask } },
53 { 0, GDK_g, GDK_7, fake_key_event, { .s = "7", .i = ControlMask } },
54 { 0, GDK_g, GDK_8, fake_key_event, { .s = "8", .i = ControlMask } },
55 { 0, GDK_g, GDK_9, fake_key_event, { .s = "9", .i = ControlMask } },
56 { 0, GDK_g, GDK_0, fake_key_event, { .s = "0", .i = ControlMask } },
58 { GDK_CONTROL_MASK, 0, GDK_i, navigate, {NavigationBack} },
59 { GDK_CONTROL_MASK, 0, GDK_o, navigate, {NavigationForward} },
60 { 0, 0, GDK_H, navigate, {NavigationBack} },
61 { 0, 0, GDK_L, navigate, {NavigationForward} },
62 { 0, 0, GDK_r, navigate, {NavigationReload} },
63 { 0, 0, GDK_R, navigate, {NavigationForceReload} },
64 { GDK_CONTROL_MASK, 0, GDK_c, navigate, {NavigationCancel} },
66 { 0, 0, GDK_plus, zoom, {ZoomIn | ZoomText} },
67 { 0, 0, GDK_minus, zoom, {ZoomOut | ZoomText} },
68 { 0, 0, GDK_KP_Add, zoom, {ZoomIn | ZoomText} },
69 { 0, 0, GDK_KP_Subtract,zoom, {ZoomOut | ZoomText} },
70 { 0, GDK_z, GDK_i, zoom, {ZoomIn | ZoomText} },
71 { 0, GDK_z, GDK_o, zoom, {ZoomOut | ZoomText} },
72 { 0, GDK_z, GDK_z, zoom, {ZoomReset | ZoomText} },
73 { 0, GDK_z, GDK_I, zoom, {ZoomIn | ZoomFullContent} },
74 { 0, GDK_z, GDK_O, zoom, {ZoomOut | ZoomFullContent} },
75 { 0, GDK_z, GDK_Z, zoom, {ZoomReset | ZoomFullContent} },
77 { 0, 0, GDK_y, yank, {SourceURL | ClipboardPrimary | ClipboardGTK} },
78 { 0, 0, GDK_Y, yank, {SourceSelection| ClipboardPrimary | ClipboardGTK} },
80 { 0, GDK_g, GDK_u, descend, {NthSubdir} },
81 { 0, GDK_g, GDK_U, descend, {Rootdir} },
83 { 0, GDK_g, GDK_h, open_arg, {TargetCurrent, startpage} },
84 { 0, GDK_g, GDK_H, open_arg, {TargetNew, startpage} },
86 { 0, 0, GDK_p, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK} },
87 { 0, 0, GDK_P, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
89 { GDK_CONTROL_MASK, 0, GDK_a, number, {Increment} },
90 { GDK_CONTROL_MASK, 0, GDK_x, number, {Decrement} },
92 { 0, 0, GDK_n, search, {DirectionNext | CaseInsensitive | Wrapping} },
93 { 0, 0, GDK_N, search, {DirectionPrev | CaseInsensitive | Wrapping} },
95 { 0, 0, GDK_colon, input, {.s = ":" } },
96 { 0, 0, GDK_o, input, {.s = ":open "} },
97 { 0, 0, GDK_O, input, {.s = ":open ", .i = InsertCurrentURL} },
98 { 0, 0, GDK_t, input, {.s = ":tabopen "} },
99 { 0, 0, GDK_T, input, {.s = ":tabopen ", .i = InsertCurrentURL} },
100 { 0, 0, GDK_slash, input, {.s = "/"} },
101 { 0, 0, GDK_KP_Divide, input, {.s = "/"} },
102 { 0, 0, GDK_question, input, {.s = "?"} },
104 { 0, 0, GDK_period, input, {.s = "."} },
105 { 0, 0, GDK_comma, input, {.s = ","} },
106 { 0, GDK_semicolon, GDK_i, input, {.s = ";i"} },
107 { 0, GDK_semicolon, GDK_s, input, {.s = ";s"} },
108 { 0, GDK_semicolon, GDK_y, input, {.s = ";y"} },
109 { 0, GDK_semicolon, GDK_o, input, {.s = ";o"} },
110 { 0, GDK_semicolon, GDK_t, input, {.s = ";t"} },
111 { 0, GDK_semicolon, GDK_w, input, {.s = ";w"} },
112 { 0, GDK_semicolon, GDK_I, input, {.s = ";I"} },
113 { 0, GDK_semicolon, GDK_O, input, {.s = ";O"} },
114 { 0, GDK_semicolon, GDK_T, input, {.s = ";T"} },
115 { 0, GDK_semicolon, GDK_W, input, {.s = ";W"} },
117 { 0, GDK_VoidSymbol, GDK_Escape, set, {ModeNormal} },
118 { GDK_CONTROL_MASK, GDK_VoidSymbol, GDK_bracketleft,set, {ModeNormal} },
119 { GDK_CONTROL_MASK, 0, GDK_z, set, {ModePassThrough} },
120 { GDK_CONTROL_MASK, 0, GDK_v, set, {ModeSendKey} },
121 { 0, 0, GDK_f, input, {.s = "."} },
122 { 0, 0, GDK_F, input, {.s = ","} },
124 { 0, GDK_g, GDK_i, focus_input,{} },
125 { 0, 0, GDK_u, revive, {} },
127 { 0, 0, GDK_d, quit, {0} },
128 /* leave this last line as last */
129 { 0, 0, 0, 0, {0} },
132 #endif