aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum Oakley <c.oakley108@gmail.com>2017-01-20 21:22:18 +0000
committerCallum Oakley <c.oakley108@gmail.com>2017-01-20 21:22:18 +0000
commitdc3937d485bf2325d1ed26c3456475b1b09617f1 (patch)
tree648384af314a145a36aea2cd05e3506ea2403a93
parent10ff9623214ee62935a17b3f68d5180756b7a27b (diff)
downloadqmk_firmware-dc3937d485bf2325d1ed26c3456475b1b09617f1.tar.gz
qmk_firmware-dc3937d485bf2325d1ed26c3456475b1b09617f1.zip
simplify
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c51
-rw-r--r--keyboards/planck/keymaps/callum/readme.md12
2 files changed, 19 insertions, 44 deletions
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index 4d0151710..a1254d975 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -7,22 +7,21 @@
7 7
8extern keymap_config_t keymap_config; 8extern keymap_config_t keymap_config;
9 9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14#define _BASE 0 10#define _BASE 0
15#define _MOVE 1 11#define _MOVE 1
16#define _SYMB 2 12#define _SYMB 2
17#define _MOUSE 3 13#define _MOUSE 3
18#define _FUNC 4 14#define _FUNC 4
15#define CMDLEFT LGUI(KC_LEFT)
16#define CMDRGHT LGUI(KC_RGHT)
17#define ENDASH LALT(KC_MINS)
18#define POUND LALT(KC_3)
19
19 20
20enum planck_keycodes { 21enum planck_keycodes {
21 MOVE = SAFE_RANGE, 22 MOVE = SAFE_RANGE,
22 SYMB, 23 SYMB,
23 FUNC, 24 FUNC
24 BELOW,
25 ABOVE
26}; 25};
27 26
28// Fillers to make layering more clear 27// Fillers to make layering more clear
@@ -55,16 +54,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 * |------+------+------+------+------+------+------+------+------+------+------+------| 54 * |------+------+------+------+------+------+------+------+------+------+------+------|
56 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 55 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
57 * |------+------+------+------+------+------+------+------+------+------+------+------| 56 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | 57 * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | |
59 * |------+------+------+------+------+------+------+------+------+------+------+------| 58 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | | | | | | Below| | | | | | | 59 * | | | | | | | | | | | | |
61 * `-----------------------------------------------------------------------------------' 60 * `-----------------------------------------------------------------------------------'
62 */ 61 */
63[_MOVE] = { 62[_MOVE] = {
64 {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, 63 {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC },
65 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, 64 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
66 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, 65 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
67 {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} 66 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
68}, 67},
69 68
70/* SYMB 69/* SYMB
@@ -79,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
79 * `-----------------------------------------------------------------------------------' 78 * `-----------------------------------------------------------------------------------'
80 */ 79 */
81[_SYMB] = { 80[_SYMB] = {
82 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, 81 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH },
83 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, 82 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND },
84 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, 83 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
85 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 84 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
86}, 85},
@@ -153,30 +152,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
153 } 152 }
154 return false; 153 return false;
155 break; 154 break;
156 case BELOW:
157 if (record->event.pressed) {
158 register_code(KC_LGUI);
159 register_code(KC_RGHT);
160 unregister_code(KC_RGHT);
161 unregister_code(KC_LGUI);
162 register_code(KC_ENT);
163 unregister_code(KC_ENT);
164 }
165 return false;
166 break;
167 case ABOVE:
168 if (record->event.pressed) {
169 register_code(KC_LGUI);
170 register_code(KC_LEFT);
171 unregister_code(KC_LEFT);
172 unregister_code(KC_LGUI);
173 register_code(KC_ENT);
174 unregister_code(KC_ENT);
175 register_code(KC_UP);
176 unregister_code(KC_UP);
177 }
178 return false;
179 break;
180 } 155 }
181 return true; 156 return true;
182} 157}
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index 0baeba46d..f970cd974 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -2,11 +2,11 @@
2 2
3This is a layout for the grid planck, built with a few ideals in mind: 3This is a layout for the grid planck, built with a few ideals in mind:
4 4
5- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. 5- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key.
6- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. 6- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible.
7- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. 7- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make.
8 8
9We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. 9We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously.
10 10
11``` 11```
12/* BASE 12/* BASE
@@ -27,9 +27,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
27 * |------+------+------+------+------+------+------+------+------+------+------+------| 27 * |------+------+------+------+------+------+------+------+------+------+------+------|
28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
29 * |------+------+------+------+------+------+------+------+------+------+------+------| 29 * |------+------+------+------+------+------+------+------+------+------+------+------|
30 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | 30 * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | |
31 * |------+------+------+------+------+------+------+------+------+------+------+------| 31 * |------+------+------+------+------+------+------+------+------+------+------+------|
32 * | | | | | | Below| | | | | | | 32 * | | | | | | | | | | | | |
33 * `-----------------------------------------------------------------------------------' 33 * `-----------------------------------------------------------------------------------'
34 */ 34 */
35 35
@@ -63,9 +63,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
63 * |------+------+------+------+------+------+------+------+------+------+------+------| 63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | 64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
65 * |------+------+------+------+------+------+------+------+------+------+------+------| 65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | | F21 | F22 | F23 | F24 | | | Lock | | | | | 66 * | | F21 | F22 | F23 | F24 | | | Power| | | | |
67 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | | | | | Prev | Mute | Play | Next | | | | | 68 * | | | | | Prev | Mute | Play | Next | | | | |
69 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
70 */ 70 */
71``` 71 ```