keymap.c 2.8 KB

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