2 #include "action_layer.h"
8 extern keymap_config_t keymap_config;
15 #define ENDASH LALT(KC_MINS)
16 #define POUND LALT(KC_3)
17 #define H(X) LALT(LCTL(X))
19 enum planck_keycodes {
25 // Fillers to make layering more clear
26 #define _______ KC_TRNS
29 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 * ,-----------------------------------------------------------------------------------.
33 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
34 * |------+------+------+------+------+------+------+------+------+------+------+------|
35 * | Bksp | A | R | S | T | D | H | N | E | I | O | " |
36 * |------+------+------+------+------+------+------+------+------+------+------+------|
37 * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
38 * |------+------+------+------+------+------+------+------+------+------+------+------|
39 * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func |
40 * `-----------------------------------------------------------------------------------'
43 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS},
44 {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
45 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
46 {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, FUNC }
50 * ,-----------------------------------------------------------------------------------.
51 * | H(F7)| H(F8)| H(6) | H(5) | H(4) | H(F9)|H(F10)| Home | Up | End | H(A) | Esc |
52 * |------+------+------+------+------+------+------+------+------+------+------+------|
53 * | H(F3)| H(F4)| H(3) | H(2) | H(1) | H(F5)| H(F6)| Left | Down | Right| Caps | Del |
54 * |------+------+------+------+------+------+------+------+------+------+------+------|
55 * | | H(0) | H(9) | H(8) | H(7) | H(F1)| H(F2)| Pg Dn| Pg Up|H(F11)|H(F12)| |
56 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | | | | | | | | | | | | |
58 * `-----------------------------------------------------------------------------------'
61 {H(KC_F7),H(KC_F8),H(KC_6), H(KC_5), H(KC_4), H(KC_F9),H(KC_F10),KC_HOME,KC_UP, KC_END, H(KC_A), KC_ESC },
62 {H(KC_F3),H(KC_F4),H(KC_3), H(KC_2), H(KC_1), H(KC_F5),H(KC_F6),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
63 {_______, H(KC_0), H(KC_9), H(KC_8), H(KC_7), H(KC_F1),H(KC_F2),KC_PGDN,KC_PGUP,H(KC_F11),H(KC_F12),_______},
64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
68 * ,-----------------------------------------------------------------------------------.
69 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – |
70 * |------+------+------+------+------+------+------+------+------+------+------+------|
71 * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ |
72 * |------+------+------+------+------+------+------+------+------+------+------+------|
73 * | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
74 * |------+------+------+------+------+------+------+------+------+------+------+------|
75 * | | | | | | | | | | | | |
76 * `-----------------------------------------------------------------------------------'
79 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH },
80 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND },
81 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
82 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
86 * ,-----------------------------------------------------------------------------------.
87 * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | |
88 * |------+------+------+------+------+------+------+------+------+------+------+------|
89 * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | |
90 * |------+------+------+------+------+------+------+------+------+------+------+------|
91 * | | | | | | | | SW-D | SW-U | | | |
92 * |------+------+------+------+------+------+------+------+------+------+------+------|
93 * | | | | | | | | | | | | |
94 * `-----------------------------------------------------------------------------------'
97 {XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, XXXXXXX, XXXXXXX, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX},
98 {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX},
99 {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, _______},
100 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
104 * ,-----------------------------------------------------------------------------------.
105 * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ |
106 * |------+------+------+------+------+------+------+------+------+------+------+------|
107 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
108 * |------+------+------+------+------+------+------+------+------+------+------+------|
109 * | | F21 | F22 | F23 | F24 | | | Power| | | | |
110 * |------+------+------+------+------+------+------+------+------+------+------+------|
111 * | | | | | Prev | Mute | Play | Next | | | | |
112 * `-----------------------------------------------------------------------------------'
115 {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU},
116 {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD},
117 {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER,XXXXXXX, XXXXXXX, XXXXXXX, _______},
118 {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______}
123 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
126 if (record->event.pressed) {
128 update_tri_layer(_MOVE, _SYMB, _MOUSE);
131 update_tri_layer(_MOVE, _SYMB, _MOUSE);
136 if (record->event.pressed) {
138 update_tri_layer(_MOVE, _SYMB, _MOUSE);
141 update_tri_layer(_MOVE, _SYMB, _MOUSE);
146 if (record->event.pressed) {