4 #include "lib/global.h"
6 /*** typedefs(not structures) and defined constants **********************************************/
9 #define KEYMAP_SECTION_FILEMANAGER "filemanager"
10 #define KEYMAP_SECTION_FILEMANAGER_EXT "filemanager:xmap"
11 #define KEYMAP_SECTION_PANEL "panel"
12 #define KEYMAP_SECTION_DIALOG "dialog"
13 #define KEYMAP_SECTION_MENU "menu"
14 #define KEYMAP_SECTION_INPUT "input"
15 #define KEYMAP_SECTION_LISTBOX "listbox"
16 #define KEYMAP_SECTION_RADIO "radio"
17 #define KEYMAP_SECTION_TREE "tree"
18 #define KEYMAP_SECTION_HELP "help"
19 #define KEYMAP_SECTION_CHATTR "chattr"
20 #define KEYMAP_SECTION_EDITOR "editor"
21 #define KEYMAP_SECTION_EDITOR_EXT "editor:xmap"
22 #define KEYMAP_SECTION_VIEWER "viewer"
23 #define KEYMAP_SECTION_VIEWER_HEX "viewer:hex"
24 #define KEYMAP_SECTION_DIFFVIEWER "diffviewer"
26 #define KEYMAP_SHORTCUT_LENGTH 32 /* FIXME: is 32 bytes enough for shortcut? */
28 #define CK_PipeBlock(i) (10000+(i))
29 #define CK_Macro(i) (20000+(i))
30 #define CK_MacroLast CK_Macro(0x7FFF)
32 /*** enums ***************************************************************************************/
36 /* special commands */
88 CK_EditorViewerHistory
,
109 CK_DeleteToWordBegin
,
134 CK_EditForceInternal
= 100L,
142 CK_SetupListingFormat
,
148 CK_OptionsDisplayBits
,
149 CK_EditExtensionsFile
,
150 CK_EditFileHighlightFile
,
160 CK_OptionsAppearance
,
179 CK_LinkSymbolicRelative
,
182 CK_PutCurrentSelected
,
183 CK_PutCurrentFullSelected
,
192 CK_PanelOtherCd
= 200L,
211 CK_CycleListingFormat
,
232 CK_MarkAndDown
= 480L,
235 /* cursor movements */
272 CK_MarkParagraphDown
,
273 /* column mark commands */
275 CK_MarkColumnPageDown
,
280 CK_MarkColumnScrollUp
,
281 CK_MarkColumnScrollDown
,
282 CK_MarkColumnParagraphUp
,
283 CK_MarkColumnParagraphDown
,
287 CK_MacroStartStopRecord
,
289 CK_RepeatStartRecord
,
291 CK_RepeatStartStopRecord
,
292 /* window commands */
301 CK_SpellCheckCurrentWord
,
302 CK_SpellCheckSelectLang
,
327 CK_SearchForwardContinue
,
328 CK_SearchBackwardContinue
,
329 CK_SearchOppositeContinue
,
332 CK_ShowSymbols
= 700L,
345 /*** structures declarations (and typedefs of structures)*****************************************/
347 /* The global keymaps are of this type */
348 typedef struct global_keymap_t
352 char caption
[KEYMAP_SHORTCUT_LENGTH
];
355 /*** global variables defined in .c file *********************************************************/
357 /*** declarations of public functions ************************************************************/
359 void keybind_cmd_bind (GArray
* keymap
, const char *keybind
, long action
);
360 long keybind_lookup_action (const char *name
);
361 const char *keybind_lookup_actionname (long action
);
362 const char *keybind_lookup_keymap_shortcut (const global_keymap_t
* keymap
, long action
);
363 long keybind_lookup_keymap_command (const global_keymap_t
* keymap
, long key
);
365 /*** inline functions ****************************************************************************/
367 #endif /* MC__KEYBIND_H */