2
0

keymap.c 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #include QMK_KEYBOARD_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 MO(_FN1)
  19. #define KC_FN2 MO(_FN2)
  20. #define KC_ESFN1 LT(_FN1, KC_ESC)
  21. #define KC_SPFN1 LT(_FN1, KC_SPACE)
  22. #define KC_SPFN2 LT(_FN2, KC_SPACE)
  23. #define KC_BSFN1 LT(_FN1, KC_BSPC)
  24. #define KC_BSFN2 LT(_FN2, KC_BSPC)
  25. #define KC_RST RESET
  26. #define KC_DBUG DEBUG
  27. #define KC_RTOG RGB_TOG
  28. #define KC_RMOD RGB_MOD
  29. #define KC_RHUI RGB_HUI
  30. #define KC_RHUD RGB_HUD
  31. #define KC_RSAI RGB_SAI
  32. #define KC_RSAD RGB_SAD
  33. #define KC_RVAI RGB_VAI
  34. #define KC_RVAD RGB_VAD
  35. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  36. [_BASE] = LAYOUT_kc(
  37. //,----+----+----+----+----+----|----+----+----+----+----+----+----.
  38. TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,MINS,
  39. //|----`----`----`----`----`----|----`----`----`----`----`----`----|
  40. ESC , A , O , E , U , I , D , H , T , N , S , ENTER ,
  41. //|-----`----`----`----`----`----|----`----`----`----`----`--------|
  42. LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT ,
  43. //|-------`----`----`----`----`----|----`----`----`----`----`------|
  44. LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL
  45. //`-----+----+-----+----+--------|--------+-----+-----+-----+------'
  46. ),
  47. [_FN1] = LAYOUT_kc(
  48. //,----+----+----+----+----+----|----+----+----+----+----+----+----.
  49. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,
  50. //|----`----`----`----`----`----|----`----`----`----`----`----`----|
  51. CAPS ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, , , ,SCLN, ,
  52. //|-----`----`----`----`----`----|----`----`----`----`----`--------|
  53. RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , ,
  54. //|-------`----`----`----`----`----|----`----`----`----`----`------|
  55. RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT
  56. //`-----+----+-----+----+--------|--------+-----+-----+-----+------'
  57. ),
  58. [_FN2] = LAYOUT_kc(
  59. //,----+----+----+----+----+----|----+----+----+----+----+----+----.
  60. TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS,
  61. //|----`----`----`----`----`----|----`----`----`----`----`----`----|
  62. CAPS , , ,INS ,PGUP,HOME, F1 , F2 , F3 , F4 , F5 , F6 ,
  63. //|-----`----`----`----`----`----|----`----`----`----`----`--------|
  64. , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 ,
  65. //|-------`----`----`----`----`----|----`----`----`----`----`------|
  66. , , , , DEL , INS , , , ,
  67. //`-----+----+-----+----+--------|--------+-----+-----+-----+------'
  68. )
  69. };
  70. void matrix_init_user(void) {
  71. // This will disable the red LEDs on the ProMicros
  72. DDRD &= ~(1<<5);
  73. PORTD &= ~(1<<5);
  74. DDRB &= ~(1<<0);
  75. PORTB &= ~(1<<0);
  76. };