aboutsummaryrefslogtreecommitdiff
path: root/keyboard/planck/keymaps/keymap_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/planck/keymaps/keymap_default.c')
-rw-r--r--keyboard/planck/keymaps/keymap_default.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/keyboard/planck/keymaps/keymap_default.c b/keyboard/planck/keymaps/keymap_default.c
index 4468247b9..06db76751 100644
--- a/keyboard/planck/keymaps/keymap_default.c
+++ b/keyboard/planck/keymaps/keymap_default.c
@@ -1,6 +1,13 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3
1#include "planck.h" 4#include "planck.h"
2#include "backlight.h" 5#include "backlight.h"
3 6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
4#define _QW 0 11#define _QW 0
5#define _CM 1 12#define _CM 1
6#define _DV 2 13#define _DV 2
@@ -12,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
12 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, 19 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
13 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, 20 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
14 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, 21 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
15 {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 22 {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
16}, 23},
17[_CM] = { /* Colemak */ 24[_CM] = { /* Colemak */
18 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, 25 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
@@ -50,11 +57,11 @@ const uint16_t PROGMEM fn_actions[] = {
50 57
51}; 58};
52 59
53const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 60const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
54{ 61{
55 // MACRODOWN only works in this function 62 // MACRODOWN only works in this function
56 switch(id) { 63 switch(id) {
57 case 0: 64 case 0:
58 if (record->event.pressed) { 65 if (record->event.pressed) {
59 register_code(KC_RSFT); 66 register_code(KC_RSFT);
60 backlight_step(); 67 backlight_step();
@@ -62,6 +69,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
62 unregister_code(KC_RSFT); 69 unregister_code(KC_RSFT);
63 } 70 }
64 break; 71 break;
65 } 72 }
66 return MACRO_NONE; 73 return MACRO_NONE;
67}; 74};