summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorajp10304 <a.Pocklington@Gmail.com>2017-10-23 19:28:52 +0100
committerJack Humbert <jack.humb@gmail.com>2017-10-23 08:28:52 -1000
commita08287b0a0800e0add34fa9c0c4916d2bf8d5db1 (patch)
tree373c0c18b960ba3204ee05c448f372ceebdf8750
parentaf83c6a4cb76098eb5798324e9727c7d923ce046 (diff)
Added ajp10304 Planck layout (#1887)
* Added ajp10304 Planck layout * Removed Makefile from planck ajp10304 keymap
-rw-r--r--.gitignore1
-rw-r--r--keyboards/planck/keymaps/ajp10304/config.h8
-rw-r--r--keyboards/planck/keymaps/ajp10304/keymap.c206
-rw-r--r--keyboards/planck/keymaps/ajp10304/readme.md86
-rw-r--r--keyboards/planck/keymaps/ajp10304/rules.mk5
5 files changed, 306 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index fb73d7b7e9..f513ed3af3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@ build/
21quantum/version.h 21quantum/version.h
22.idea/ 22.idea/
23CMakeLists.txt 23CMakeLists.txt
24cmake-build-debug
24.DS_STORE 25.DS_STORE
25/util/wsl_downloaded 26/util/wsl_downloaded
26/util/win_downloaded 27/util/win_downloaded
diff --git a/keyboards/planck/keymaps/ajp10304/config.h b/keyboards/planck/keymaps/ajp10304/config.h
new file mode 100644
index 0000000000..11cafbefcb
--- /dev/null
+++ b/keyboards/planck/keymaps/ajp10304/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#define PREVENT_STUCK_MODIFIERS
7
8#endif
diff --git a/keyboards/planck/keymaps/ajp10304/keymap.c b/keyboards/planck/keymaps/ajp10304/keymap.c
new file mode 100644
index 0000000000..84e3a0ab96
--- /dev/null
+++ b/keyboards/planck/keymaps/ajp10304/keymap.c
@@ -0,0 +1,206 @@
1#include "planck.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#include "keymap_uk.h"
5
6extern keymap_config_t keymap_config;
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12#define _QWERTY 0
13#define _LOWER 1
14#define _RAISE 2
15#define _FUNC 3
16#define _ADJUST 16
17#define _DYN 6
18
19enum planck_keycodes {
20 QWERTY = SAFE_RANGE,
21 FUNC,
22 LOWER,
23 RAISE,
24 DYNAMIC_MACRO_RANGE
25};
26
27#include "dynamic_macro.h"
28
29// Fillers to make layering more clear
30#define _______ KC_TRNS
31#define XXXXXXX KC_NO
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34
35/* Qwerty
36 * ,-----------------------------------------------------------------------------------.
37 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
38 * |------+------+------+------+------+-------------+------+------+------+------+------|
39 * | Tab | A | S | D | F | G | H | J | K | L | ;: | Enter|
40 * |------+------+------+------+------+------|------+------+------+------+------+------|
41 * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_QWERTY] = {
47 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
48 {MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) },
49 {KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT },
50 {MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC) }
51},
52
53/* Function
54 * ,-----------------------------------------------------------------------------------.
55 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
56 * |------+------+------+------+------+-------------+------+------+------+------+------|
57 * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT|
58 * |------+------+------+------+------+------|------+------+------+------+------+------|
59 * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
60 * |------+------+------+------+------+------+------+------+------+------+------+------|
61 * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn |
62 * `-----------------------------------------------------------------------------------'
63 */
64[_FUNC] = {
65 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
66 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT },
67 {KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) },
68 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
69},
70
71/* Lower
72 * ,-----------------------------------------------------------------------------------.
73 * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp |
74 * |------+------+------+------+------+-------------+------+------+------+------+------|
75 * | ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks|
76 * |------+------+------+------+------+------|------+------+------+------+------+------|
77 * | Shift| \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
80 * `-----------------------------------------------------------------------------------'
81 */
82[_LOWER] = {
83 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC },
84 {LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) },
85 {KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) },
86 {_______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY }
87},
88
89/* Raise
90 * ,-----------------------------------------------------------------------------------.
91 * | ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC|
92 * |------+------+------+------+------+-------------+------+------+------+------+------|
93 * | ` | | | ( | ) | | | HOME | UP | END | |ZOOM +|
94 * |------+------+------+------+------+------|------+------+------+------+------+------|
95 * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
96 * |------+------+------+------+------+------|------+------+------+------+------+------|
97 * | | | | | | Alt | Enter|Raise | | | | |
98 * `-----------------------------------------------------------------------------------'
99 */
100[_RAISE] = {
101 {KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN },
102 {KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) },
103 {_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) },
104 {_______, _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ }
105},
106
107
108/* Adjust (Lower + Raise)
109 * ,-----------------------------------------------------------------------------------.
110 * | ???? | Reset|Qwerty| | | | | | | | | Del |
111 * |------+------+------+------+------+-------------+------+------+------+------+------|
112 * | CAPS | | | | | | | Mute | Vol+ | Play | | |
113 * |------+------+------+------+------+------|------+------+------+------+------+------|
114 * | | | | | | | | Prev | Vol- | Next | | |
115 * |------+------+------+------+------+------+------+------+------+------+------+------|
116 * | | | | | | | | DYN | | | |
117 * `-----------------------------------------------------------------------------------'
118 */
119[_ADJUST] = {
120 {M(0), RESET, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
121 {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ },
122 {_______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ },
123 {_______, _______, _______, _______, _______, _______, _______, _______, MO(_DYN), _______, _______, _______ }
124},
125
126/* DYN: Macro Recording and Playback
127 * ,-----------------------------------------------------------------------------------.
128 * | | | | | | REC1 | REC2 | | | | | |
129 * |------+------+------+------+------+-------------+------+------+------+------+------|
130 * | | | | | | PLAY1| PLAY2| | | | | |
131 * |------+------+------+------+------+------|------+------+------+------+------+------|
132 * | | | | | | STOP | STOP | | | | | |
133 * |------+------+------+------+------+------+------+------+------+------+------+------|
134 * | | | | | | | | | | | |
135 * `-----------------------------------------------------------------------------------'
136 */
137[_DYN]= {
138 {_______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, _______},
139 {_______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______},
140 {_______, _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, _______, _______, _______, _______, _______},
141 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
142},
143
144};
145
146
147void persistant_default_layer_set(uint16_t default_layer) {
148 eeconfig_update_default_layer(default_layer);
149 default_layer_set(default_layer);
150}
151
152bool process_record_user(uint16_t keycode, keyrecord_t *record) {
153
154 if (!process_record_dynamic_macro(keycode, record)) {
155 return false;
156 }
157
158 switch (keycode) {
159 case QWERTY:
160 if (record->event.pressed) {
161 persistant_default_layer_set(1UL<<_QWERTY);
162 }
163 return false;
164 case LOWER:
165 if (record->event.pressed) {
166 layer_on(_LOWER);
167 update_tri_layer(_LOWER, _RAISE, _ADJUST);
168 } else {
169 layer_off(_LOWER);
170 update_tri_layer(_LOWER, _RAISE, _ADJUST);
171 }
172 return false;
173 case RAISE:
174 if (record->event.pressed) {
175 layer_on(_RAISE);
176 update_tri_layer(_LOWER, _RAISE, _ADJUST);
177 } else {
178 layer_off(_RAISE);
179 update_tri_layer(_LOWER, _RAISE, _ADJUST);
180 }
181 return false;
182 }
183 return true;
184}
185
186const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
187 switch(id) {
188 // These would trigger when you hit a key mapped as M(0)
189 case 0:
190 if (record->event.pressed) {
191 return MACRO(
192 // SENSITIVE
193 END
194 );
195 }
196 break;
197 case 1: // Word Select
198 if (record->event.pressed) {
199 return MACRO(
200 DOWN(KC_LCTL), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LCTL),
201 END
202 );
203 }
204 }
205 return MACRO_NONE;
206}; \ No newline at end of file
diff --git a/keyboards/planck/keymaps/ajp10304/readme.md b/keyboards/planck/keymaps/ajp10304/readme.md
new file mode 100644
index 0000000000..6e6bde014d
--- /dev/null
+++ b/keyboards/planck/keymaps/ajp10304/readme.md
@@ -0,0 +1,86 @@
1# AJP10304 Custom Planck Layout
2
3**Note:** In the tables below where there are two characters on a key,
4the second is the output when shift is applied.
5
6**Note:** The below tables assume a UK layout.
7
8##### Main Qwerty Layer
9
10* Tab: when held, operates as shift.
11* Enter: when held, operates as shift.
12* MENU: perform right-click
13
14| | | | | | | | | | | | |
15| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:|
16| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
17| Tab | A | S | D | F | G | H | J | K | L | ;: | Enter|
18| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft |
19| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn |
20
21##### Function Layer
22Activated when `fn` held in the above `qwerty` layer.
23
24| | | | | | | | | | | | |
25| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:|
26| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
27| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT|
28| Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
29| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn |
30
31##### Lower Layer
32Activated when `Lower` is held in the above `qwerty` layer.
33
34* Numbers are along the top row, their shifted counterparts are on row 2.
35* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
36* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.
37
38| | | | | | | | | | | | |
39| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:|
40| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp |
41| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks|
42| Shift| \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift |
43| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
44
45 ##### Raise Layer
46 Activated when `Raise` is held in the above `qwerty` layer.
47
48 * Preferred layer for typing brackets.
49 * Allows for cursor navigation to be used solely with the right hand.
50 * WRDSEL: Select the word where the cursor is.
51 * |< and >|: Apply `ctrl` to `left` and `right` respectively for word
52
53| | | | | | | | | | | | |
54| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| -----:
55| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC|
56| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +|
57| | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
58| | | | | | Alt | Enter|Raise | | | | |
59
60##### Lower + Raise
61Activated when `Lower` and `Raise` are held together the above `qwerty` layer.
62
63* Audio controls in the same position as cursor keys from the `Raise` layer.
64* ????: Runs a macro for outputting sensitive information. Do not use this store passwords.
65* Reset: Enter bootloader for flashing firmware to the keyboard.
66* CAPS: Toggle caps lock.
67* DYN: Enter `DYN` layer.
68
69| | | | | | | | | | | | |
70| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| -----:
71| ???? | Reset|Qwerty| | | | | | | | | Del |
72| CAPS | | | | | | | Mute | Vol+ | Play | | |
73| | | | | | | | Prev | Vol- | Next | | |
74| | | | | | | | DYN | | | |
75
76##### DYN
77Activated when `DYN` held along with `Lower` and `Raise`
78Allows recording of macros. To start recording the macro, press either REC1 or REC2.
79To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
80
81| | | | | | | | | | | | |
82| ---- |:----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| ----:| -----:
83| | | | | | REC1 | REC2 | | | | | |
84| | | | | | PLAY1| PLAY2| | | | | |
85| | | | | | STOP | STOP | | | | | |
86| | | | | | | | | | | |
diff --git a/keyboards/planck/keymaps/ajp10304/rules.mk b/keyboards/planck/keymaps/ajp10304/rules.mk
new file mode 100644
index 0000000000..76b36845c6
--- /dev/null
+++ b/keyboards/planck/keymaps/ajp10304/rules.mk
@@ -0,0 +1,5 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
4
5AUDIO_ENABLE = no \ No newline at end of file