keymap.c 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #include "fourier.h"
  2. #include "action_layer.h"
  3. #include "eeconfig.h"
  4. extern keymap_config_t keymap_config;
  5. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  6. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  7. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  8. // entirely and just use numbers.
  9. #define _BASE 0
  10. #define _FN1 1
  11. #define _FN2 2
  12. enum custom_keycodes {
  13. QWERTY = SAFE_RANGE,
  14. };
  15. #define KC_ KC_TRNS
  16. #define _______ KC_TRNS
  17. #define XXXXXXX KC_NO
  18. #define KC_FN1 LT(_FN1, KC_NO)
  19. #define KC_FN2 LT(_FN2, KC_NO)
  20. #define KC_SPFN LT(_FN1, KC_SPACE)
  21. #define KC_RST RESET
  22. #define KC_DBUG DEBUG
  23. #define KC_RTOG RGB_TOG
  24. #define KC_RMOD RGB_MOD
  25. #define KC_RHUI RGB_HUI
  26. #define KC_RHUD RGB_HUD
  27. #define KC_RSAI RGB_SAI
  28. #define KC_RSAD RGB_SAD
  29. #define KC_RVAI RGB_VAI
  30. #define KC_RVAD RGB_VAD
  31. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  32. [_BASE] = LAYOUT_kc(
  33. //,----+----+----+----+----+----|----+----+----+----+----+----+----.
  34. TAB , Q , W , E , R , T , Y , U , I , O , P , DEL,BSPC,
  35. //|----`----`----`----`----`----|----`----`----`----`----`----`----|
  36. ESC , A , S , D , F , G , H , J , K , L ,QUOT, SCLN ,
  37. //|-----`----`----`----`----`----|----`----`----`----`----`--------|
  38. LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, PGUP ,
  39. //|-------`----`----`----`----`----|----`----`----`----`----`------|
  40. LCTL ,LALT, FN1, ,ENTER , SPACE , FN2 , HOME, END , PGDN
  41. //`-----+----+-----+-------------|--------+-----+-----+-----+------'
  42. ),
  43. [_FN1] = LAYOUT_kc(
  44. //,----+----+----+----+----+----|----+----+----+----+----+----+----.
  45. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , ,
  46. //|----`----`----`----`----`----|----`----`----`----`----`----`----|
  47. DEL , F1 ,F2 , F3 , F4 , F5 , F6 ,MINS, EQL,LBRC,RBRC, BSLS ,
  48. //|-----`----`----`----`----`----|----`----`----`----`----`--------|
  49. , F7 , F8 , F9 , F10, F11, F12, , , , UP , ,
  50. //|-------`----`----`----`----`----|----`----`----`----`----`------|
  51. , , , , , ,RGUI,LEFT ,DOWN ,RIGHT
  52. //`-----+----+-----+-------------|--------+-----+-----+-----+------'
  53. ),
  54. [_FN2] = LAYOUT_kc(
  55. //,----+----+----+----+----+----|----+----+----+----+----+----+----.
  56. TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, , ,
  57. //|----`----`----`----`----`----|----`----`----`----`----`----`----|
  58. DEL ,RHUI,RSAI,RVAI, , , ,UNDS,PLUS,LCBR,RCBR, PIPE ,
  59. //|-----`----`----`----`----`----|----`----`----`----`----`--------|
  60. ,RHUD,RSAD,RVAD, , ,VOLU,VOLD, , , UP , ,
  61. //|-------`----`----`----`----`----|----`----`----`----`----`------|
  62. ,RTOG,RMOD , , , , , LEFT, DOWN, RIGHT
  63. //`-----+----+-----+-------------|--------+-----+-----+-----+------'
  64. )
  65. };