Minor optimization and type accuracy of some editor functions.
[midnight-commander.git] / src / keybind-defaults.c
blobb88968956462d85942021e86d8c16116876fdafc
1 /*
2 Default values for keybinding engine
4 Copyright (C) 2009, 2010, 2011
5 The Free Software Foundation, Inc.
7 Written by:
8 Vitja Makarov, 2005
9 Ilia Maslakov <il.smind@gmail.com>, 2009, 2010
10 Andrew Borodin <aborodin@vmail.ru>, 2010, 2011
12 This file is part of the Midnight Commander.
14 The Midnight Commander is free software: you can redistribute it
15 and/or modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation, either version 3 of the License,
17 or (at your option) any later version.
19 The Midnight Commander is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
28 #include <config.h>
30 #include "lib/global.h"
31 #include "lib/widget.h" /* dialog_map, input_map, listbox_map */
33 #include "keybind-defaults.h"
35 /*** global variables ****************************************************************************/
37 GArray *main_keymap = NULL;
38 GArray *main_x_keymap = NULL;
39 GArray *panel_keymap = NULL;
40 GArray *dialog_keymap = NULL;
41 GArray *input_keymap = NULL;
42 GArray *listbox_keymap = NULL;
43 GArray *tree_keymap = NULL;
44 GArray *help_keymap = NULL;
45 #ifdef USE_INTERNAL_EDIT
46 GArray *editor_keymap = NULL;
47 GArray *editor_x_keymap = NULL;
48 #endif
49 GArray *viewer_keymap = NULL;
50 GArray *viewer_hex_keymap = NULL;
51 #ifdef USE_DIFF_VIEW
52 GArray *diff_keymap = NULL;
53 #endif
55 const global_keymap_t *main_map = NULL;
56 const global_keymap_t *main_x_map = NULL;
57 const global_keymap_t *panel_map = NULL;
58 const global_keymap_t *tree_map = NULL;
59 const global_keymap_t *help_map = NULL;
61 #ifdef USE_INTERNAL_EDIT
62 const global_keymap_t *editor_map = NULL;
63 const global_keymap_t *editor_x_map = NULL;
64 #endif
65 const global_keymap_t *viewer_map = NULL;
66 const global_keymap_t *viewer_hex_map = NULL;
67 #ifdef USE_DIFF_VIEW
68 const global_keymap_t *diff_map = NULL;
69 #endif
71 /*** file scope macro definitions ****************************************************************/
73 /*** file scope type declarations ****************************************************************/
75 /* default keymaps in ini (key=value) format */
76 typedef struct global_keymap_ini_t
78 const char *key;
79 const char *value;
80 } global_keymap_ini_t;
82 /*** file scope variables ************************************************************************/
84 /* midnight */
85 static const global_keymap_ini_t default_main_keymap[] = {
86 {"Help", "f1"},
87 {"UserMenu", "f2"},
88 {"View", "f3"},
89 {"Edit", "f4"},
90 {"Copy", "f5"},
91 {"Move", "f6"},
92 {"MakeDir", "f7"},
93 {"Delete", "f8"},
94 {"Menu", "f9"},
95 {"Quit", "f10"},
96 {"ViewFile", "f13"},
97 {"MenuLastSelected", "f19"},
98 {"QuitQuiet", "f20"},
99 {"History", "alt-h"},
100 {"DirSize", "ctrl-space"},
101 /* Copy useful information to the command line */
102 {"PutCurrentPath", "alt-a"},
103 {"PutOtherPath", "alt-shift-a"},
104 {"CdQuick", "alt-c"},
105 /* To access the directory hotlist */
106 {"HotList", "ctrl-backspace"},
107 /* Suspend */
108 {"Suspend", "ctrl-z"},
109 /* The filtered view command */
110 {"ViewFiltered", "alt-exclamation"},
111 /* Find file */
112 {"Find", "alt-question"},
113 /* Panel refresh */
114 {"Reread", "ctrl-r"},
115 /* Switch listing between long, user defined and full formats */
116 {"PanelListingSwitch", "alt-t"},
117 /* Swap panels */
118 {"Swap", "ctrl-u"},
119 /* Resize panels */
120 {"SplitEqual", "alt-equal"},
121 {"SplitMore", "alt-shift-right"},
122 {"SplitLess", "alt-shift-left"},
123 /* View output */
124 {"Shell", "ctrl-o"},
125 {"ShowHidden", "alt-dot"},
126 {"SplitVertHoriz", "alt-comma"},
127 {"ExtendedKeyMap", "ctrl-x"},
128 /* Select/unselect group */
129 {"Select", "kpplus"},
130 {"Unselect", "kpminus"},
131 {"SelectInvert", "kpasterisk"},
132 /* List of screens */
133 {"ScreenList", "alt-prime"},
134 {NULL, NULL}
137 static const global_keymap_ini_t default_main_x_keymap[] = {
138 {"CompareDirs", "d"},
139 #ifdef USE_DIFF_VIEW
140 {"CompareFiles", "ctrl-d"},
141 #endif /* USE_DIFF_VIEW */
142 #ifdef ENABLE_VFS
143 {"VfsList", "a"},
144 #endif /* ENABLE_VFS */
145 {"PutCurrentPath", "p"},
146 {"PutOtherPath", "ctrl-p"},
147 {"PutCurrentTagged", "t"},
148 {"PutOtherTagged", "ctrl-t"},
149 {"ChangeMode", "c"},
150 {"ChangeOwn", "o"},
151 {"PutCurrentLink", "r"},
152 {"PutOtherLink", "ctrl-r"},
153 {"Link", "l"},
154 {"LinkSymbolic", "s"},
155 {"LinkSymbolicRelative", "v"},
156 {"LinkSymbolicEdit", "ctrl-s"},
157 {"PanelInfo", "i"},
158 {"PanelQuickView", "q"},
159 {"HotListAdd", "h"},
160 #ifdef ENABLE_BACKGROUND
161 {"Jobs", "j"},
162 #endif /* ENABLE_BACKGROUND */
163 {"ExternalPanelize", "!"},
164 {NULL, NULL}
167 /* panel */
168 static const global_keymap_ini_t default_panel_keymap[] = {
169 {"PanelOtherCd", "alt-o"},
170 {"PanelOtherCdLink", "alt-l"},
171 {"CopySingle", "f15"},
172 {"DeleteSingle", "f18"},
173 {"Enter", "enter"},
174 {"EditNew", "f14"},
175 {"MoveSingle", "f16"},
176 {"SelectInvert", "alt-asterisk"},
177 {"Select", "alt-plus"},
178 {"Unselect", "alt-minus"},
179 {"ViewRaw", "f13"},
180 {"CdChild", "ctrl-pgdn"},
181 {"CdParent", "ctrl-pgup"},
182 {"History", "alt-shift-h"},
183 {"HistoryNext", "alt-u"},
184 {"HistoryPrev", "alt-y"},
185 {"BottomOnScreen", "alt-j"},
186 {"MiddleOnScreen", "alt-r"},
187 {"TopOnScreen", "alt-g"},
188 {"Mark", "insert; ctrl-t"},
189 {"MarkDown", "shift-down"},
190 {"MarkUp", "shift-up"},
191 {"Up", "up; ctrl-p"},
192 {"Down", "down; ctrl-n"},
193 {"Left", "left"},
194 {"Right", "right"},
195 {"Top", "alt-lt; home; a1"},
196 {"Bottom", "alt-gt; end; c1"},
197 {"PageDown", "pgdn; ctrl-v"},
198 {"PageUp", "pgup; alt-v"},
199 #ifdef HAVE_CHARSET
200 {"SelectCodepage", "alt-e"},
201 #endif
202 {"Search", "ctrl-s; alt-s"},
203 {"PanelOtherSync", "alt-i"},
204 {NULL, NULL}
207 /* dialog */
208 static const global_keymap_ini_t default_dialog_keymap[] = {
209 {"Ok", "enter"},
210 {"Cancel", "f10; esc; ctrl-g"},
211 {"Up", "up; left"},
212 {"Down", "down; right"},
213 #if 0
214 {"Left", "up; left"},
215 {"Right", "down; right"},
216 #endif
217 {"Help", "f1"},
218 {"Suspend", "ctrl-z"},
219 {"Refresh", "ctrl-l"},
220 {"ScreenList", "alt-prime"},
221 {"ScreenNext", "alt-rbrace"},
222 {"ScreenPrev", "alt-lbrace"},
223 {NULL, NULL}
226 /* input line */
227 static const global_keymap_ini_t default_input_keymap[] = {
228 /* Motion */
229 {"Home", "ctrl-a; alt-lt; home; a1"},
230 {"End", "ctrl-e; alt-gt; end; c1"},
231 {"Left", "left; alt-left; ctrl-b"},
232 {"Right", "right; alt-right; ctrl-f"},
233 {"WordLeft", "ctrl-left; alt-b"},
234 {"WordRight", "ctrl-right; alt-f"},
235 /* Mark */
236 {"MarkLeft", "shift-left"},
237 {"MarkRight", "shift-right"},
238 {"MarkToWordBegin", "ctrl-shift-left"},
239 {"MarkToWordEnd", "ctrl-shift-right"},
240 {"MarkToHome", "shift-home"},
241 {"MarkToEnd", "shift-end"},
242 /* Editing */
243 {"Backspace", "backspace; ctrl-h"},
244 {"Delete", "delete; ctrl-d"},
245 {"DeleteToWordEnd", "alt-d"},
246 {"DeleteToWordBegin", "alt-backspace"},
247 /* Region manipulation */
248 {"Remove", "ctrl-w"},
249 {"Store", "alt-w"},
250 {"Yank", "ctrl-y"},
251 {"DeleteToEnd", "ctrl-k"},
252 /* History */
253 {"History", "alt-h"},
254 {"HistoryPrev", "alt-p; ctrl-down"},
255 {"HistoryNext", "alt-n; ctrl-up"},
256 /* Completion */
257 {"Complete", "alt-tab"},
258 {NULL, NULL}
261 /* listbox */
262 static const global_keymap_ini_t default_listbox_keymap[] = {
263 {"Up", "up; ctrl-p"},
264 {"Down", "down; ctrl-n"},
265 {"Top", "home; alt-lt; a1"},
266 {"Bottom", "end; alt-gt; c1"},
267 {"PageUp", "pgup; alt-v"},
268 {"PageDown", "pgdn; ctrl-v"},
269 {"Delete", "delete; d"},
270 {"Clear", "shift-delete; shift-d"},
271 {NULL, NULL}
274 /* tree */
275 static const global_keymap_ini_t default_tree_keymap[] = {
276 {"Help = f1"},
277 {"Rescan = f2; ctrl-r"},
278 {"Forget = f3"},
279 {"ToggleNavigation = f4"},
280 {"Copy = f5"},
281 {"Move = f6"},
282 #if 0
283 {"MakeDir", "f7"},
284 #endif
285 {"Delete", "f8; delete"},
286 {"Up", "up; ctrl-p"},
287 {"Down", "down; ctrl-n"},
288 {"Left", "left"},
289 {"Right", "right"},
290 {"Top", "home; alt-lt; a1"},
291 {"Bottom", "end; alt-gt; c1"},
292 {"PageUp", "pgup; alt-v"},
293 {"PageDown", "pgdn; ctrl-v"},
294 {"Enter", "enter"},
295 {"Search", "ctrl-s; alt-s"},
296 {NULL, NULL}
299 /* help */
300 static const global_keymap_ini_t default_help_keymap[] = {
301 {"Help", "f1"},
302 {"Index", "f2; c"},
303 {"Back", "f3; left; l"},
304 {"Quit", "f10; esc"},
305 {"Up", "up; ctrl-p"},
306 {"Down", "down; ctrl-n"},
307 {"PageDown", "f; space; pgdn; ctrl-v"},
308 {"PageUp", "b; pgup; alt-v; backspace"},
309 {"HalfPageDown", "d"},
310 {"HalfPageUp", "u"},
311 {"Top", "home; ctrl-home; ctrl-pgup; a1; alt-lt; g"},
312 {"Bottom", "end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g"},
313 {"Enter", "right; enter"},
314 {"LinkNext", "tab"},
315 {"LinkPrev", "alt-tab"},
316 {"NodeNext", "n"},
317 {"NodePrev", "p"},
318 {NULL, NULL}
321 #ifdef USE_INTERNAL_EDIT
322 static const global_keymap_ini_t default_editor_keymap[] = {
323 {"Enter", "enter"},
324 {"Return", "shift-enter"}, /* useful for pasting multiline text */
325 {"Tab", "tab"},
326 {"BackSpace", "backspace; ctrl-h"},
327 {"Delete", "delete; ctrl-d"},
328 {"Left", "left"},
329 {"Right", "right"},
330 {"Up", "up"},
331 {"Down", "down"},
332 {"Home", "home"},
333 {"End", "end"},
334 {"PageUp", "pgup"},
335 {"PageDown", "pgdn"},
336 {"WordLeft", "ctrl-left; ctrl-z"},
337 {"WordRight", "ctrl-right; ctrl-x"},
338 {"InsertOverwrite", "insert"},
339 {"Help", "f1"},
340 {"Save", "f2"},
341 {"Mark", "f3"},
342 {"Replace", "f4"},
343 {"Copy", "f5"},
344 {"Move", "f6"},
345 {"Search", "f7"},
346 {"Remove", "f8; ctrl-delete"},
347 {"Menu", "f9"},
348 {"Quit", "f10; esc"},
349 {"UserMenu", "f11"},
350 {"SaveAs", "f12; ctrl-f2"},
351 {"MarkColumn", "f13"},
352 {"ReplaceContinue", "f14; ctrl-f4"},
353 {"InsertFile", "f15"},
354 {"SearchContinue", "f17; ctrl-f7"},
355 {"EditNew", "ctrl-n"},
356 {"DeleteToWordBegin", "alt-backspace"},
357 {"DeleteToWordEnd", "alt-d"},
358 {"DeleteLine", "ctrl-y"},
359 {"DeleteToEnd", "ctrl-k"},
360 {"Undo", "ctrl-u; ctrl-backspace"},
361 {"Redo", "alt-r"},
362 #ifdef HAVE_CHARSET
363 {"SelectCodepage", "alt-e"},
364 #endif
365 {"Goto", "alt-l; alt-shift-l"},
366 {"Refresh", "ctrl-l"},
367 {"Shell", "ctrl-o"},
368 {"Top", "ctrl-home; ctrl-pgup; alt-lt"},
369 {"Bottom", "ctrl-end; ctrl-pgdn; alt-gt"},
370 {"TopOnScreen", "ctrl-pgup"},
371 {"BottomOnScreen", "ctrl-pgdn"},
372 {"ScrollUp", "ctrl-up"},
373 {"ScrollDown", "ctrl-down"},
374 {"Store", "ctrl-insert"},
375 {"Paste", "shift-insert"},
376 {"Cut", "shift-delete"},
377 {"BlockSave", "ctrl-f"},
378 {"MarkLeft", "shift-left"},
379 {"MarkRight", "shift-right"},
380 {"MarkUp", "shift-up"},
381 {"MarkDown", "shift-down"},
382 {"MarkPageUp", "shift-pgup"},
383 {"MarkPageDown", "shift-pgdn"},
384 {"MarkToWordBegin", "ctrl-shift-left"},
385 {"MarkToWordEnd", "ctrl-shift-right"},
386 {"MarkToHome", "shift-home"},
387 {"MarkToEnd", "shift-end"},
388 {"MarkToFileBegin", "ctrl-shift-home"},
389 {"MarkToFileEnd", "ctrl-shift-end"},
390 {"MarkToPageBegin", "ctrl-shift-pgup"},
391 {"MarkToPageEnd", "ctrl-shift-pgdn"},
392 {"MarkScrollUp", "ctrl-shift-up"},
393 {"MarkScrollDown", "ctrl-shift-down"},
394 {"MarkColumnLeft", "alt-left"},
395 {"MarkColumnRight", "alt-right"},
396 {"MarkColumnUp", "alt-up"},
397 {"MarkColumnDown", "alt-down"},
398 {"MarkColumnPageUp", "alt-pgup"},
399 {"MarkColumnPageDown", "alt-pgdn"},
400 {"InsertLiteral", "ctrl-q"},
401 {"Complete", "alt-tab"},
402 {"MatchBracket", "alt-b"},
403 {"ParagraphFormat", "alt-p"},
404 {"Bookmark", "alt-k"},
405 {"BookmarkFlush", "alt-o"},
406 {"BookmarkNext", "alt-j"},
407 {"BookmarkPrev", "alt-i"},
408 {"MacroStartStopRecord", "ctrl-r"},
409 {"MacroExecute", "ctrl-a"},
410 {"ShowNumbers", "alt-n"},
411 {"ShowTabTws", "alt-underline"},
412 {"SyntaxOnOff", "ctrl-s"},
413 {"Find", "alt-enter"},
414 {"FilePrev", "alt-minus"},
415 {"FileNext", "alt-plus"},
416 {"Sort", "alt-t"},
417 {"Mail", "alt-m"},
418 {"ExternalCommand", "alt-u"},
419 {"ExtendedKeyMap", "ctrl-x"},
420 {NULL, NULL}
423 /* emacs keyboard layout emulation */
424 static const global_keymap_ini_t default_editor_x_keymap[] = {
425 {NULL, NULL}
427 #endif /* USE_INTERNAL_EDIT */
429 /* viewer */
430 static const global_keymap_ini_t default_viewer_keymap[] = {
431 {"Help", "f1"},
432 {"WrapMode", "f2"},
433 {"Quit", "f3; f10; q; esc"},
434 {"HexMode", "f4"},
435 {"Goto", "f5"},
436 {"Search", "f7"},
437 {"SearchContinue", "f17; n"},
438 {"MagicMode", "f8"},
439 {"NroffMode", "f9"},
440 {"Home", "ctrl-a"},
441 {"End", "ctrl-e"},
442 {"Left", "h; left"},
443 {"Right", "l; right"},
444 {"LeftQuick", "ctrl-left"},
445 {"RightQuick", "ctrl-right"},
446 {"Up", "k; y; insert; up; ctrl-p"},
447 {"Down", "j; e; delete; down; enter; ctrl-n"},
448 {"PageDown", "f; space; pgdn; ctrl-v"},
449 {"PageUp", "b; pgup; alt-v; backspace"},
450 {"HalfPageDown", "d"},
451 {"HalfPageUp", "u"},
452 {"Top", "home; ctrl-home; ctrl-pgup; a1; alt-lt; g"},
453 {"Bottom", "end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g"},
454 {"BookmarkGoto", "m"},
455 {"Bookmark", "r"},
456 {"FileNext", "ctrl-f"},
457 {"FilePrev", "ctrl-b"},
458 #ifdef HAVE_CHARSET
459 {"SelectCodepage", "alt-e"},
460 #endif
461 {"Shell", "ctrl-o"},
462 {"Ruler", "alt-r"},
463 {"SearchForward", "slash"},
464 {"SearchBackward", "question"},
465 {"SearchForwardContinue", "ctrl-s"},
466 {"SearchBackwardContinue", "ctrl-r"},
467 {NULL, NULL}
470 /* hex viewer */
471 static const global_keymap_ini_t default_viewer_hex_keymap[] = {
472 {"Help", "f1"},
473 {"HexEditMode", "f2"},
474 {"Quit", "f3; f10; q; esc"},
475 {"HexMode", "f4"},
476 {"Goto", "f5"},
477 {"Save", "f6"},
478 {"Search", "f7"},
479 {"SearchContinue", "f17; n"},
480 {"MagicMode", "f8"},
481 {"NroffMode", "f9"},
482 {"ToggleNavigation", "tab"},
483 {"Home", "ctrl-a; home"},
484 {"End", "ctrl-e; end"},
485 {"Left", "b; left"},
486 {"Right", "f; right"},
487 {"Up", "k; y; up"},
488 {"Down", "j; delete; down"},
489 {"PageDown", "pgdn; ctrl-v"},
490 {"PageUp", "pgup; alt-v"},
491 {"Top", "ctrl-home; ctrl-pgup; a1; alt-lt; g"},
492 {"Bottom", "ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g"},
493 #ifdef HAVE_CHARSET
494 {"SelectCodepage", "alt-e"},
495 #endif
496 {"Shell", "ctrl-o"},
497 {"SearchForward", "slash"},
498 {"SearchBackward", "question"},
499 {"SearchForwardContinue", "ctrl-s"},
500 {"SearchBackwardContinue", "ctrl-r"},
501 {NULL, NULL}
504 #ifdef USE_DIFF_VIEW
505 /* diff viewer */
506 static const global_keymap_ini_t default_diff_keymap[] = {
507 {"ShowSymbols", "alt-s; s"},
508 {"ShowNumbers", "alt-n; l"},
509 {"SplitFull", "f"},
510 {"SplitEqual", "equal"},
511 {"SplitMore", "gt"},
512 {"SplitLess", "lt"},
513 {"Tab2", "2"},
514 {"Tab3", "3"},
515 {"Tab4", "4"},
516 {"Tab8", "8"},
517 {"Swap", "ctrl-u"},
518 {"Redo", "ctrl-r"},
519 {"HunkNext", "n; enter; space"},
520 {"HunkPrev", "p; backspace"},
521 {"Goto", "g; shift-g"},
522 {"Save", "f2"},
523 {"Edit", "f4"},
524 {"EditOther", "f14"},
525 {"Merge", "f5"},
526 {"Search", "f7"},
527 {"SearchContinue", "f17"},
528 {"Options", "f9"},
529 {"Top", "ctrl-home"},
530 {"Bottom", "ctrl-end"},
531 {"Down", "down"},
532 {"Up", "up"},
533 {"LeftQuick", "ctrl-left"},
534 {"RightQuick", "ctrl-right"},
535 {"Left", "left"},
536 {"Right", "right"},
537 {"PageDown", "pgdn"},
538 {"PageUp", "pgup"},
539 {"Home", "home"},
540 {"End", "end"},
541 {"Help", "f1"},
542 {"Quit", "f10; q; shift-q; esc"},
543 #ifdef HAVE_CHARSET
544 {"SelectCodepage", "alt-e"},
545 #endif
546 {"Shell", "ctrl-o"},
547 {NULL, NULL}
549 #endif
551 /*** file scope macro definitions ****************************************************************/
553 /*** file scope type declarations ****************************************************************/
555 /*** file scope variables ************************************************************************/
557 /*** file scope functions ************************************************************************/
558 /* --------------------------------------------------------------------------------------------- */
560 static void
561 create_default_keymap_section (mc_config_t * keymap, const char *section,
562 const global_keymap_ini_t * k)
564 size_t i;
566 for (i = 0; k[i].key != NULL; i++)
567 mc_config_set_string_raw (keymap, section, k[i].key, k[i].value);
570 /* --------------------------------------------------------------------------------------------- */
571 /*** public functions ****************************************************************************/
572 /* --------------------------------------------------------------------------------------------- */
574 mc_config_t *
575 create_default_keymap (void)
577 mc_config_t *keymap;
579 keymap = mc_config_init (NULL);
581 create_default_keymap_section (keymap, KEYMAP_SECTION_MAIN, default_main_keymap);
582 create_default_keymap_section (keymap, KEYMAP_SECTION_MAIN_EXT, default_main_x_keymap);
583 create_default_keymap_section (keymap, KEYMAP_SECTION_PANEL, default_panel_keymap);
584 create_default_keymap_section (keymap, KEYMAP_SECTION_DIALOG, default_dialog_keymap);
585 create_default_keymap_section (keymap, KEYMAP_SECTION_INPUT, default_input_keymap);
586 create_default_keymap_section (keymap, KEYMAP_SECTION_LISTBOX, default_listbox_keymap);
587 create_default_keymap_section (keymap, KEYMAP_SECTION_TREE, default_tree_keymap);
588 create_default_keymap_section (keymap, KEYMAP_SECTION_HELP, default_help_keymap);
589 #ifdef USE_INTERNAL_EDIT
590 create_default_keymap_section (keymap, KEYMAP_SECTION_EDITOR, default_editor_keymap);
591 create_default_keymap_section (keymap, KEYMAP_SECTION_EDITOR_EXT, default_editor_x_keymap);
592 #endif
593 create_default_keymap_section (keymap, KEYMAP_SECTION_VIEWER, default_viewer_keymap);
594 create_default_keymap_section (keymap, KEYMAP_SECTION_VIEWER_HEX, default_viewer_hex_keymap);
595 #ifdef USE_DIFF_VIEW
596 create_default_keymap_section (keymap, KEYMAP_SECTION_DIFFVIEWER, default_diff_keymap);
597 #endif
599 return keymap;