keybind.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef MC_KEYBIND_H
  2. #define MC_KEYBIND_H
  3. #include "global.h"
  4. #define GLOBAL_KEYMAP_FILE "mc.keymap"
  5. typedef struct name_key_map_t {
  6. const char *name;
  7. int val;
  8. } name_key_map_t;
  9. typedef struct key_config_t {
  10. time_t mtime; /* mtime at the moment we read config file */
  11. GArray *keymap;
  12. GArray *ext_keymap;
  13. gchar *labels[10];
  14. } key_config_t;
  15. /* The global keymaps are of this type */
  16. typedef struct global_key_map_t {
  17. long key;
  18. long command;
  19. } global_key_map_t;
  20. int lookup_action (char *keyname);
  21. void keybind_cmd_bind(GArray *keymap, char *keybind, int action);
  22. #endif /* MC_KEYBIND_H */
  23. /* viewer/actions_cmd.c */
  24. extern const global_key_map_t default_viewer_keymap[];
  25. extern const global_key_map_t default_viewer_hex_keymap[];
  26. /* ../edit/editkey.c */
  27. extern const global_key_map_t default_editor_keymap[];
  28. extern const global_key_map_t default_editor_x_keymap[];
  29. /* screen.c */
  30. extern const global_key_map_t default_panel_keymap[];
  31. /* widget.c */
  32. extern const global_key_map_t default_input_keymap[];
  33. /* main.c */
  34. extern const global_key_map_t default_main_map[];
  35. extern const global_key_map_t default_main_x_map[];
  36. extern const global_key_map_t default_input_keymap[];