keymap.c 902 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This is the canonical layout file for the Quantum project. If you want to add another keyboard,
  2. // this is the style you want to emulate.
  3. #include "sixkeyboard.h"
  4. #include "matrix.h"
  5. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  6. [0] = {
  7. {KC_A, KC_B, KC_C},
  8. {KC_D, KC_E, KC_F}
  9. }
  10. };
  11. const uint16_t PROGMEM fn_actions[] = {
  12. };
  13. const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
  14. {
  15. // MACRODOWN only works in this function
  16. switch(id) {
  17. case 0:
  18. if (record->event.pressed) {
  19. register_code(KC_RSFT);
  20. } else {
  21. unregister_code(KC_RSFT);
  22. }
  23. break;
  24. }
  25. return MACRO_NONE;
  26. };
  27. void matrix_scan_user(void) {
  28. // jump to bootloaer when all keys are pressed
  29. if (matrix_get_row(0) == 0b111 && matrix_get_row(1) == 0b111) {
  30. clear_keyboard();
  31. bootloader_jump();
  32. }
  33. };