keymap.c 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #include QMK_KEYBOARD_H
  2. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  3. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  4. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  5. // entirely and just use numbers.
  6. #define _QWERTY 0
  7. #define _SYMB 1
  8. #define _LIGHT 2
  9. // Shortcut to make keymap more readable
  10. #define SYM_L MO(_SYMB)
  11. #define KC_ALEN LALT_T(KC_ENT)
  12. #define ES_LIGH LT(_LIGHT, KC_ESC)
  13. #define CT_COPY LCTL(KC_C)
  14. #define CT_PASTE LCTL(KC_V)
  15. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  16. [_QWERTY] = LAYOUT(
  17. //┌────────┬────────┬────────┬────────┬────────┬────────┐
  18. ES_LIGH ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,
  19. //└────────┼────────┼────────┼────────┼────────┼────────┤
  20. KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,
  21. //┌────────┼────────┼────────┼────────┼────────┼────────┼────────┐
  22. CT_COPY ,CT_PASTE,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,
  23. //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐
  24. KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,
  25. //├────────┼────────┘ └────────┴────────┼────────┼────────┐
  26. KC_LCTL ,SYM_L ,KC_SPC
  27. //└────────┘ └────────┴────────┘
  28. ),
  29. [_SYMB] = LAYOUT(
  30. //┌────────┬────────┬────────┬────────┬────────┬────────┐
  31. _______ ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,
  32. //└────────┼────────┼────────┼────────┼────────┼────────┤
  33. KC_GRV ,KC_UP ,KC_PIPE ,KC_LCBR ,KC_RCBR ,
  34. //┌────────┼────────┼────────┼────────┼────────┼────────┼────────┐
  35. _______ ,_______ ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_LBRC ,KC_RBRC ,
  36. //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐
  37. _______ ,KC_BSPC ,KC_DEL ,KC_LPRN ,KC_RPRN ,
  38. //├────────┼────────┘ └────────┴────────┼────────┼────────┐
  39. _______ ,_______ ,_______
  40. //└────────┘ └────────┴────────┘
  41. ),
  42. [_LIGHT] = LAYOUT(
  43. //┌────────┬────────┬────────┬────────┬────────┬────────┐
  44. _______ ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,
  45. //└────────┼────────┼────────┼────────┼────────┼────────┤
  46. RGB_M_P ,RGB_M_SW,RGB_M_X ,RGB_M_B ,RGB_VAD ,
  47. //┌────────┼────────┼────────┼────────┼────────┼────────┼────────┐
  48. _______ ,_______ ,RGB_M_SN,RGB_M_G ,RGB_M_R ,RGB_M_K ,RGB_M_T ,
  49. //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐
  50. _______ ,RGB_M_T ,XXXXXXX ,RGB_VAI ,RGB_VAD ,
  51. //├────────┼────────┘ └────────┴────────┼────────┼────────┐
  52. _______ ,RGB_MOD ,RGB_TOG
  53. //└────────┘ └────────┴────────┘
  54. )
  55. };
  56. // Runs just one time when the keyboard initializes.
  57. #ifdef RGBLIGHT_ENABLE
  58. void eeconfig_init_user(void) {
  59. rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
  60. };
  61. #endif