via_keycodes.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* Copyright 2017 Jason Williams (Wilba)
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. // Can't use SAFE_RANGE here, it might change if someone adds
  18. // new values to enum quantum_keycodes.
  19. // Need to keep checking 0x5F10 is still in the safe range.
  20. // TODO: merge this into quantum_keycodes
  21. // Backlight keycodes are in range 0x5F00-0x5F0F
  22. enum via_keycodes {
  23. FN_MO13 = 0x5F10,
  24. FN_MO23,
  25. MACRO00,
  26. MACRO01,
  27. MACRO02,
  28. MACRO03,
  29. MACRO04,
  30. MACRO05,
  31. MACRO06,
  32. MACRO07,
  33. MACRO08,
  34. MACRO09,
  35. MACRO10,
  36. MACRO11,
  37. MACRO12,
  38. MACRO13,
  39. MACRO14,
  40. MACRO15,
  41. };
  42. enum user_keycodes {
  43. USER00 = 0x5F80,
  44. USER01,
  45. USER02,
  46. USER03,
  47. USER04,
  48. USER05,
  49. USER06,
  50. USER07,
  51. USER08,
  52. USER09,
  53. USER10,
  54. USER11,
  55. USER12,
  56. USER13,
  57. USER14,
  58. USER15,
  59. };
  60. // VIA specific "action functions", introduced with Zeal60
  61. // These are only valid IDs in action_function()
  62. // Use FN_TT13, FN_TT23, etc. in keymaps
  63. enum via_action_functions {
  64. TRIPLE_TAP_1_3 = 0x31,
  65. TRIPLE_TAP_2_3 = 0x32
  66. };
  67. // Bitwise OR the above with 0x0F00 to use in F(x) macro
  68. // This reserves the top 256 of the 4096 range of F(x) keycodes,
  69. // leaving the rest for use in fn_actions[] or actions in EEPROM.
  70. #define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3))
  71. #define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3))
  72. #define TG_NKRO MAGIC_TOGGLE_NKRO