Keyboard firmwares for Atmel AVR and Cortex-M
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

bootmagic.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef BOOTMAGIC_H
  2. #define BOOTMAGIC_H
  3. #ifndef BOOTMAGIC_IS_ENABLE
  4. #define BOOTMAGIC_IS_ENABLE() true
  5. #endif
  6. /* kick up bootloader */
  7. #ifndef BOOTMAGIC_BOOTLOADER_KEY
  8. #define BOOTMAGIC_BOOTLOADER_KEY KC_B
  9. #endif
  10. /* debug enable */
  11. #ifndef BOOTMAGIC_DEBUG_ENABLE_KEY
  12. #define BOOTMAGIC_DEBUG_ENABLE_KEY KC_D
  13. #endif
  14. /* eeprom clear */
  15. #ifndef BOOTMAGIC_EEPROM_CLEAR_KEY
  16. #define BOOTMAGIC_EEPROM_CLEAR_KEY KC_BSPACE
  17. #endif
  18. /*
  19. * key configure
  20. */
  21. /* swap control and capslock */
  22. #ifndef BOOTMAGIC_SWAP_CONTROL_CPASLOCK
  23. #define BOOTMAGIC_SWAP_CONTROL_CPASLOCK KC_LCTRL
  24. #endif
  25. /* capslock to control */
  26. #ifndef BOOTMAGIC_CAPSLOCK_TO_CONTROL
  27. #define BOOTMAGIC_CAPSLOCK_TO_CONTROL KC_CAPSLOCK
  28. #endif
  29. /* swap alt and gui */
  30. #ifndef BOOTMAGIC_SWAP_LALT_LGUI
  31. #define BOOTMAGIC_SWAP_LALT_LGUI KC_LALT
  32. #endif
  33. /* swap alt and gui */
  34. #ifndef BOOTMAGIC_SWAP_RALT_RGUI
  35. #define BOOTMAGIC_SWAP_RALT_RGUI KC_RALT
  36. #endif
  37. /* no gui */
  38. #ifndef BOOTMAGIC_NO_GUI
  39. #define BOOTMAGIC_NO_GUI KC_LGUI
  40. #endif
  41. /* swap esc and grave */
  42. #ifndef BOOTMAGIC_SWAP_GRAVE_ESC
  43. #define BOOTMAGIC_SWAP_GRAVE_ESC KC_GRAVE
  44. #endif
  45. /* swap backslash and backspace */
  46. #ifndef BOOTMAGIC_SWAP_BACKSLASH_BACKSPACE
  47. #define BOOTMAGIC_SWAP_BACKSLASH_BACKSPACE KC_BSLASH
  48. #endif
  49. /*
  50. * change default layer
  51. */
  52. #ifndef BOOTMAGIC_DEFAULT_LAYER_0_KEY
  53. #define BOOTMAGIC_DEFAULT_LAYER_0_KEY KC_0
  54. #endif
  55. #ifndef BOOTMAGIC_DEFAULT_LAYER_1_KEY
  56. #define BOOTMAGIC_DEFAULT_LAYER_1_KEY KC_1
  57. #endif
  58. #ifndef BOOTMAGIC_DEFAULT_LAYER_2_KEY
  59. #define BOOTMAGIC_DEFAULT_LAYER_2_KEY KC_2
  60. #endif
  61. #ifndef BOOTMAGIC_DEFAULT_LAYER_3_KEY
  62. #define BOOTMAGIC_DEFAULT_LAYER_3_KEY KC_3
  63. #endif
  64. void bootmagic(void);
  65. bool bootmagic_scan_keycode(uint8_t keycode);
  66. #endif