keymap.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #include QMK_KEYBOARD_H
  2. #include <print.h>
  3. #include <string.h>
  4. // HID has not yet been implemented for this keyboard
  5. // #include "raw_hid.h"
  6. #define MILLISECONDS_IN_SECOND 1000
  7. // These are just to make it neater to use builtin HSV values in the keymap
  8. #define RED {HSV_RED}
  9. #define CORAL {HSV_CORAL}
  10. #define ORANGE {HSV_ORANGE}
  11. #define GOLDEN {HSV_GOLDENROD}
  12. #define GOLD {HSV_GOLD}
  13. #define YELLOW {HSV_YELLOW}
  14. #define CHART {HSV_CHARTREUSE}
  15. #define GREEN {HSV_GREEN}
  16. #define SPRING {HSV_SPRINGGREEN}
  17. #define TURQ {HSV_TURQUOISE}
  18. #define TEAL {HSV_TEAL}
  19. #define CYAN {HSV_CYAN}
  20. #define AZURE {HSV_AZURE}
  21. #define BLUE {HSV_BLUE}
  22. #define PURPLE {HSV_PURPLE}
  23. #define MAGENT {HSV_MAGENTA}
  24. #define PINK {HSV_PINK}
  25. //========================================================== CONFIGURABLE DEFAULTS ==========================================================
  26. #define RGB_DEFAULT_TIME_OUT 30
  27. #define RGB_FAST_MODE_TIME_OUT 3
  28. #define RGB_TIME_OUT_MAX 600
  29. #define RGB_TIME_OUT_MIN 10
  30. #define RGB_TIME_OUT_STEP 10
  31. extern bool g_suspend_state;
  32. extern rgb_config_t rgb_matrix_config;
  33. bool disable_layer_color;
  34. bool rgb_enabled_flag; // Current LED state flag. If false then LED is off.
  35. bool rgb_time_out_enable; // Idle LED toggle enable. If false then LED will not turn off after idle timeout.
  36. bool rgb_time_out_fast_mode_enabled; // Enable flag for RGB timeout fast mode
  37. bool rgb_time_out_user_value; // This holds the toggle value set by user with ROUT_TG. It's necessary as RGB_TOG changes timeout enable.
  38. uint16_t rgb_time_out_seconds; // Idle LED timeout value, in seconds not milliseconds
  39. uint16_t rgb_time_out_saved_seconds; // The saved user config for RGB timeout period
  40. led_flags_t rgb_time_out_saved_flag; // Store LED flag before timeout so it can be restored when LED is turned on again.
  41. enum layout_names {
  42. _KL=0, // Keys Layout: The main keyboard layout that has all the characters
  43. _FL, // Function Layout: The function key activated layout with default functions and some added ones
  44. _ML, // Mouse Layout: Mouse Keys and mouse movement
  45. _GL, // GIT Layout: GIT shortcuts and macros
  46. _VL, // VIM Layout: VIM shorcuts and macros
  47. _YL, // Yakuake Layout: Yakuake drop-down terminal shortcuts and macros
  48. _EL, // KDE Layout: Shortcuts for KDE desktop using default KDE shortcuts settings
  49. };
  50. enum tapdance_keycodes {
  51. TD_LGUI_ML = 0, // Tap dance key to switch to mouse layer _ML
  52. TD_APP_YL,
  53. TD_CTRL_TERM, // Tap dance key to open terminal on LCTRL double press
  54. };
  55. enum ctrl_keycodes {
  56. U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect / Always Active
  57. U_T_AGCR, // USB Toggle Automatic GCR control
  58. DBG_TOG, // DEBUG Toggle On / Off
  59. DBG_MTRX, // DEBUG Toggle Matrix Prints
  60. DBG_KBD, // DEBUG Toggle Keyboard Prints
  61. DBG_MOU, // DEBUG Toggle Mouse Prints
  62. MD_BOOT, // Restart into bootloader after hold timeout
  63. SEL_CPY, // Select Copy. Select the word cursor is pointed at and copy, using double mouse click and ctrl+c
  64. ROUT_TG, // Timeout Toggle. Toggle idle LED time out on or off
  65. ROUT_VI, // Timeout Value Increase. Increase idle time out before LED disabled
  66. ROUT_VD, // Timeout Value Decrease. Decrease idle time out before LED disabled
  67. ROUT_FM, // RGB timeout fast mode toggle
  68. COPY_ALL, // Copy all text using ctrl(a+c)
  69. TERMINAL, // CTRL+ALT+T
  70. };
  71. enum string_macro_keycodes {
  72. // The start of this enum should always be equal to end of ctrl_keycodes + 1
  73. G_INIT = TERMINAL + 1, // git init
  74. G_CLONE, // git clone
  75. G_CONF, // git config --global
  76. G_ADD, // git add
  77. G_DIFF, // git diff
  78. G_RESET, // git reset
  79. G_REBAS, // git rebase
  80. G_BRANH, // git branch
  81. G_CHECK, // git checkout
  82. G_MERGE, // git merge
  83. G_REMTE, // git remote add
  84. G_FETCH, // git fetch
  85. G_PULL, // git pull
  86. G_PUSH, // git push
  87. G_COMM, // git commit
  88. G_STAT, // git status
  89. G_LOG, // git log
  90. };