config.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #include "keybind.h"
  4. #define KEYBINDS_MAX_SIZE 1048
  5. #define KMS KEYBINDS_MAX_SIZE
  6. static struct keybinds keybinds[KMS] = {
  7. [SDLK_LEFT % KMS] = {
  8. .size = 1,
  9. .binds = {
  10. {KMOD_NONE, keybind_mv_cur_char, {.dir = DIR_BACKWARD}}
  11. }
  12. },
  13. [SDLK_RIGHT % KMS] = {
  14. .size = 1,
  15. .binds = {
  16. {KMOD_NONE, keybind_mv_cur_char, {.dir = DIR_FORWARD}}
  17. }
  18. },
  19. [SDLK_DELETE % KMS] = {
  20. .size = 1,
  21. .binds = {
  22. {KMOD_NONE, keybind_delete_char, {.dir = DIR_FORWARD}},
  23. }
  24. },
  25. [SDLK_RETURN % KMS] = {
  26. .size = 1,
  27. .binds = {
  28. {KMOD_NONE, keybind_insert_newline, {.ptr = NULL}}
  29. }
  30. },
  31. [SDLK_BACKSPACE % KMS] = {
  32. .size = 2,
  33. .binds = {
  34. {KMOD_NONE, keybind_delete_char, {.dir = DIR_BACKWARD}},
  35. {KMOD_CTRL, keybind_delete_word, {.dir = DIR_BACKWARD}}
  36. }
  37. },
  38. [SDLK_f % KMS] = {
  39. .size = 2,
  40. .binds = {
  41. {KMOD_ALT, keybind_mv_cur_word, {.dir = DIR_FORWARD}},
  42. {KMOD_CTRL, keybind_toggle_fps, {.ptr = NULL}}
  43. }
  44. },
  45. [SDLK_b % KMS] = {
  46. .size = 1,
  47. .binds = {
  48. {KMOD_ALT, keybind_mv_cur_word, {.dir = DIR_BACKWARD}}
  49. }
  50. },
  51. [SDLK_d % KMS] = {
  52. .size = 1,
  53. .binds = {
  54. {KMOD_ALT, keybind_delete_word, {.dir = DIR_FORWARD}}
  55. }
  56. },
  57. [SDLK_a % KMS] = {
  58. .size = 1,
  59. .binds = {
  60. {KMOD_CTRL, keybind_mv_cur_beg_line, {.ptr = NULL}}
  61. }
  62. },
  63. [SDLK_e % KMS] = {
  64. .size = 1,
  65. .binds = {
  66. {KMOD_CTRL, keybind_mv_cur_end_line, {.ptr = NULL}}
  67. }
  68. },
  69. [SDLK_s % KMS] = {
  70. .size = 1,
  71. .binds = {
  72. {KMOD_CTRL, keybind_save_buffer, {.ptr = NULL}}
  73. }
  74. },
  75. };
  76. #undef KMS
  77. #endif