summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorajp10304 <a.Pocklington@Gmail.com>2018-04-15 17:48:19 +0100
committerDrashna Jaelre <drashna@live.com>2018-04-15 09:48:19 -0700
commited62c6e146e685e41e434e3335065b1205f41925 (patch)
tree5872b5136646aa82c4856805f3ff674598bb9cc9
parent32fd5e4f61d50df6a5828b258d995a5da242600b (diff)
Ajp10304 (#2719)
* AJP10304 layouts for Planck and JJ40 now have mouse support. Moved macros onto Adjust layer * .gitignore for intellij iml files. * Updated Macros to use send string
-rw-r--r--.gitignore1
-rw-r--r--keyboards/jj40/keymaps/ajp10304/keymap.c102
-rw-r--r--keyboards/jj40/keymaps/ajp10304/readme.md37
-rw-r--r--keyboards/jj40/keymaps/ajp10304/rules.mk3
-rw-r--r--keyboards/planck/keymaps/ajp10304/keymap.c103
-rw-r--r--keyboards/planck/keymaps/ajp10304/readme.md65
-rw-r--r--keyboards/planck/keymaps/ajp10304/rules.mk3
7 files changed, 148 insertions, 166 deletions
diff --git a/.gitignore b/.gitignore
index 971e90453b..799fb54def 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,7 @@ doxygen/
43.project 43.project
44.settings/ 44.settings/
45.idea 45.idea
46*.iml
46.browse.VC.db* 47.browse.VC.db*
47*.stackdump 48*.stackdump
48util/Win_Check_Output.txt 49util/Win_Check_Output.txt
diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c
index be5ee9e368..1da57c444f 100644
--- a/keyboards/jj40/keymaps/ajp10304/keymap.c
+++ b/keyboards/jj40/keymaps/ajp10304/keymap.c
@@ -15,7 +15,7 @@ enum jj40_layers {
15 _FUNC, 15 _FUNC,
16 _MFNC, 16 _MFNC,
17 _ADJUST, 17 _ADJUST,
18 _DYN 18 _MOUSE
19}; 19};
20 20
21enum jj40_keycodes { 21enum jj40_keycodes {
@@ -27,6 +27,7 @@ enum jj40_keycodes {
27 MLWR, 27 MLWR,
28 RAISE, 28 RAISE,
29 MRSE, 29 MRSE,
30 MOUSE,
30 DYNAMIC_MACRO_RANGE 31 DYNAMIC_MACRO_RANGE
31}; 32};
32 33
@@ -64,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
64 * |------+------+------+------+------+------|------+------+------+------+------+------| 65 * |------+------+------+------+------+------|------+------+------+------+------+------|
65 * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | 66 * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
66 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
67 * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn | 68 * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
68 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
69 */ 70 */
70[_FUNC] = KEYMAP(\ 71[_FUNC] = KEYMAP(\
71 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,\ 72 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,\
72 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,\ 73 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,\
73 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) ,\ 74 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) ,\
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ 75 _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ \
75), 76),
76 77
77/* Lower 78/* Lower
@@ -100,51 +101,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
100 * |------+------+------+------+------+------|------+------+------+------+------+------| 101 * |------+------+------+------+------+------|------+------+------+------+------+------|
101 * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| 102 * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
102 * |------+------+------+------+------+------|------+------+------+------+------+------| 103 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | | | | | Alt | Enter|Raise | | | | | 104 * | Mouse| | | | | Alt | Enter|Raise | | | | |
104 * `-----------------------------------------------------------------------------------' 105 * `-----------------------------------------------------------------------------------'
105 */ 106 */
106[_RAISE] = KEYMAP(\ 107[_RAISE] = KEYMAP(\
107 KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,\ 108 KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,\
108 KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,\ 109 KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,\
109 _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,\ 110 _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,\
110 _______, _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ \ 111 MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ \
111), 112),
112 113
113
114/* Adjust (Lower + Raise) 114/* Adjust (Lower + Raise)
115 * ,-----------------------------------------------------------------------------------. 115 * ,-----------------------------------------------------------------------------------.
116 * | ???? | Reset|Qwerty| | | | | | | | | Del | 116 * | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
117 * |------+------+------+------+------+-------------+------+------+------+------+------| 117 * |------+------+------+------+------+-------------+------+------+------+------+------|
118 * | CAPS | | | | | | | Mute | Vol+ | Play | | | 118 * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | |
119 * |------+------+------+------+------+------|------+------+------+------+------+------| 119 * |------+------+------+------+------+------|------+------+------+------+------+------|
120 * | | | | | | | | Prev | Vol- | Next | | | 120 * | | | | | | STOP | STOP | Prev | Vol- | Next | | |
121 * |------+------+------+------+------+------+------+------+------+------+------+------| 121 * |------+------+------+------+------+------+------+------+------+------+------+------|
122 * | | | | | | | | DYN | | | | 122 * | | | | | | | | | | | |
123 * `-----------------------------------------------------------------------------------' 123 * `-----------------------------------------------------------------------------------'
124 */ 124 */
125[_ADJUST] = KEYMAP(\ 125[_ADJUST] = KEYMAP(\
126 M(0), RESET, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,\ 126 M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\
127 KC_CAPS, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\ 127 KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\
128 TG(_MAC), _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\ 128 TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\
129 _______, _______, _______, _______, _______, _______, _______, _______, MO(_DYN), _______, _______, _______ \ 129 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
130), 130),
131 131
132/* DYN: Macro Recording and Playback 132/* Mouse
133 * ,-----------------------------------------------------------------------------------. 133 * ,-----------------------------------------------------------------------------------.
134 * | | | | | | REC1 | REC2 | | | | | | 134 * | ESC | | | | | | | | | | | |
135 * |------+------+------+------+------+-------------+------+------+------+------+------| 135 * |------+------+------+------+------+-------------+------+------+------+------+------|
136 * | | | | | | PLAY1| PLAY2| | | | | | 136 * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
137 * |------+------+------+------+------+------|------+------+------+------+------+------| 137 * |------+------+------+------+------+------|------+------+------+------+------+------|
138 * | | | | | | STOP | STOP | | | | | | 138 * | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | |
139 * |------+------+------+------+------+------+------+------+------+------+------+------| 139 * |------+------+------+------+------+------|------+------+------+------+------+------|
140 * | | | | | | | | | | | | 140 * | | | | | | | | | | | | |
141 * `-----------------------------------------------------------------------------------' 141 * `-----------------------------------------------------------------------------------'
142 */ 142 */
143[_DYN]= KEYMAP(\ 143[_MOUSE] = KEYMAP(\
144 _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, _______,\ 144 KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
145 _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______,\ 145 KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______,\
146 _______, _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, _______, _______, _______, _______, _______,\ 146 KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______,\
147 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ 147 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
148), 148),
149 149
150[_MAC]= KEYMAP(\ 150[_MAC]= KEYMAP(\
@@ -247,32 +247,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
247 return true; 247 return true;
248} 248}
249 249
250const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
251 // These would trigger when you hit a key mapped as M(0)
252 if (record->event.pressed) {
253 switch(keycode) {
254 case 0: // Some custom string here
255 SEND_STRING("");
256 return false;
250 257
251const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { 258 case 1: // Word Select
252 switch(id) { 259 SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL));
253 // These would trigger when you hit a key mapped as M(0) 260 return false;
254 case 0: 261
255 if (record->event.pressed) { 262 case 2: // Word Select Mac
256 return MACRO( 263 SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
257 // SENSITIVE 264 return false;
258 END 265 }
259 );
260 }
261 break;
262 case 1: // Word Select
263 if (record->event.pressed) {
264 return MACRO(
265 DOWN(KC_LCTL), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LCTL),
266 END
267 );
268 }
269 case 2: // Word Select - MAC
270 if (record->event.pressed) {
271 return MACRO(
272 DOWN(KC_LALT), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LALT),
273 END
274 );
275 }
276 } 266 }
277 return MACRO_NONE; 267 return MACRO_NONE;
278}; 268};
diff --git a/keyboards/jj40/keymaps/ajp10304/readme.md b/keyboards/jj40/keymaps/ajp10304/readme.md
index 406bb6ba2f..eaaacd05b3 100644
--- a/keyboards/jj40/keymaps/ajp10304/readme.md
+++ b/keyboards/jj40/keymaps/ajp10304/readme.md
@@ -27,7 +27,7 @@ Activated when `fn` held in the above `qwerty` layer.
27| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 27| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
28| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| 28| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT|
29| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | 29| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
30| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn | 30| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
31 31
32##### Lower Layer 32##### Lower Layer
33Activated when `Lower` is held in the above `qwerty` layer. 33Activated when `Lower` is held in the above `qwerty` layer.
@@ -56,38 +56,37 @@ Activated when `Lower` is held in the above `qwerty` layer.
56| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| 56| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC|
57| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| 57| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +|
58| | | | { | } | |&#124;<| LEFT | DOWN |RIGHT |>&#124;|ZOOM -| 58| | | | { | } | |&#124;<| LEFT | DOWN |RIGHT |>&#124;|ZOOM -|
59| | | | | | Alt | Enter |Raise | | | | | 59| Mouse | | | | | Alt | Enter |Raise | | | | |
60 60
61##### Lower + Raise 61##### Lower + Raise
62Activated when `Lower` and `Raise` are held together the above `qwerty` layer. 62Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.
63 63
64* Audio controls in the same position as cursor keys from the `Raise` layer. 64* Audio controls in the same position as cursor keys from the `Raise` layer.
65* ????: Runs a macro for outputting a text string. Do not use this store passwords. 65* ????: Runs a macro for outputting a text string. Do not use this store passwords.
66* Reset: Enter bootloader for flashing firmware to the keyboard. 66* Reset: Enter bootloader for flashing firmware to the keyboard.
67* CAPS: Toggle caps lock. 67* CAPS: Toggle caps lock.
68* DYN: Enter `DYN` layer.
69* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, 68* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
70MRSE with RAISE and MFNC with FUNC respectively. 69MRSE with RAISE and MFNC with FUNC respectively.
70* REC1, REC2: Start recording macro.
71* PLAY1, PLAY2: Playback macro.
72* STOP1, STOP2: Stop recording macro.
71 73
72| | | | | | | | | | | | | 74| | | | | | | | | | | | |
73| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| 75| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
74| ???? | Reset|Qwerty| | | | | | | | | Del | 76| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
75| CAPS | | | | | | | Mute | Vol+ | Play | | | 77| CAPS | | | | | PLAY1| PLAY | Mute | Vol+ | Play | | |
76| MAC | | | | | | | Prev | Vol- | Next | | | 78| MAC | | | | | STOP | STOP | Prev | Vol- | Next | | |
77| | | | | | | | | DYN | | | |
78
79##### DYN
80Activated when `DYN` held along with `Lower` and `Raise`
81Allows recording of macros. To start recording the macro, press either REC1 or REC2.
82To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
83
84| | | | | | | | | | | | |
85| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
86| | | | | | REC1 | REC2 | | | | | |
87| | | | | | PLAY1| PLAY2| | | | | |
88| | | | | | STOP | STOP | | | | | |
89| | | | | | | | | | | | | 79| | | | | | | | | | | | |
80
81##### Mouse
82Activated when `fn` and `Raise` are held together.
90 83
84| | | | | | | | | | | | |
85| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
86| | | | | | | | | | | | |
87| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
88| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | |
89| | | | | | | | | | | | |
91 90
92####Manual Flashing of hex file 91####Manual Flashing of hex file
93`bootloadHID -r .build/jj40_ajp10304.hex` 92`bootloadHID -r .build/jj40_ajp10304.hex`
diff --git a/keyboards/jj40/keymaps/ajp10304/rules.mk b/keyboards/jj40/keymaps/ajp10304/rules.mk
index 76b36845c6..dc6ab13e89 100644
--- a/keyboards/jj40/keymaps/ajp10304/rules.mk
+++ b/keyboards/jj40/keymaps/ajp10304/rules.mk
@@ -2,4 +2,5 @@ ifndef QUANTUM_DIR
2 include ../../../../Makefile 2 include ../../../../Makefile
3endif 3endif
4 4
5AUDIO_ENABLE = no \ No newline at end of file 5AUDIO_ENABLE = no
6MOUSEKEY_ENABLE = yes
diff --git a/keyboards/planck/keymaps/ajp10304/keymap.c b/keyboards/planck/keymaps/ajp10304/keymap.c
index 18a3f486d1..02ba8fff76 100644
--- a/keyboards/planck/keymaps/ajp10304/keymap.c
+++ b/keyboards/planck/keymaps/ajp10304/keymap.c
@@ -15,7 +15,7 @@ enum planck_layers {
15 _FUNC, 15 _FUNC,
16 _MFNC, 16 _MFNC,
17 _ADJUST, 17 _ADJUST,
18 _DYN 18 _MOUSE
19}; 19};
20 20
21enum planck_keycodes { 21enum planck_keycodes {
@@ -27,6 +27,7 @@ enum planck_keycodes {
27 MLWR, 27 MLWR,
28 RAISE, 28 RAISE,
29 MRSE, 29 MRSE,
30 MOUSE,
30 DYNAMIC_MACRO_RANGE 31 DYNAMIC_MACRO_RANGE
31}; 32};
32 33
@@ -64,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
64 * |------+------+------+------+------+------|------+------+------+------+------+------| 65 * |------+------+------+------+------+------|------+------+------+------+------+------|
65 * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | 66 * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
66 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
67 * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn | 68 * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
68 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
69 */ 70 */
70[_FUNC] = { 71[_FUNC] = {
71 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, 72 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
72 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT }, 73 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT },
73 {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) }, 74 {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) },
74 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } 75 {_______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ }
75}, 76},
76 77
77/* Lower 78/* Lower
@@ -100,54 +101,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
100 * |------+------+------+------+------+------|------+------+------+------+------+------| 101 * |------+------+------+------+------+------|------+------+------+------+------+------|
101 * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| 102 * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
102 * |------+------+------+------+------+------|------+------+------+------+------+------| 103 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | | | | | Alt | Enter|Raise | | | | | 104 * | Mouse| | | | | Alt | Enter|Raise | | | | |
104 * `-----------------------------------------------------------------------------------' 105 * `-----------------------------------------------------------------------------------'
105 */ 106 */
106[_RAISE] = { 107[_RAISE] = {
107 {KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN }, 108 {KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN },
108 {KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) }, 109 {KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) },
109 {_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) }, 110 {_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) },
110 {_______, _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ } 111 {MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ }
111}, 112},
112 113
113
114/* Adjust (Lower + Raise) 114/* Adjust (Lower + Raise)
115 * ,-----------------------------------------------------------------------------------. 115 * ,-----------------------------------------------------------------------------------.
116 * | ???? | Reset|Qwerty| | | | | | | | | Del | 116 * | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
117 * |------+------+------+------+------+-------------+------+------+------+------+------| 117 * |------+------+------+------+------+-------------+------+------+------+------+------|
118 * | CAPS | | | | | | | Mute | Vol+ | Play | | | 118 * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | |
119 * |------+------+------+------+------+------|------+------+------+------+------+------| 119 * |------+------+------+------+------+------|------+------+------+------+------+------|
120 * | | | | | | | | Prev | Vol- | Next | | | 120 * | | | | | | STOP | STOP | Prev | Vol- | Next | | |
121 * |------+------+------+------+------+------+------+------+------+------+------+------| 121 * |------+------+------+------+------+------+------+------+------+------+------+------|
122 * | | | | | | | | DYN | | | | 122 * | | | | | | | | | | | |
123 * `-----------------------------------------------------------------------------------' 123 * `-----------------------------------------------------------------------------------'
124 */ 124 */
125[_ADJUST] = { 125[_ADJUST] = {
126 {M(0), RESET, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, 126 {M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL },
127 {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ }, 127 {KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ },
128 {TG(_MAC), _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ }, 128 {TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ },
129 {_______, _______, _______, _______, _______, _______, _______, _______, MO(_DYN), _______, _______, _______ } 129 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
130}, 130},
131 131
132/* DYN: Macro Recording and Playback 132/* Mouse
133 * ,-----------------------------------------------------------------------------------. 133 * ,-----------------------------------------------------------------------------------.
134 * | | | | | | REC1 | REC2 | | | | | | 134 * | ESC | | | | | | | | | | | |
135 * |------+------+------+------+------+-------------+------+------+------+------+------| 135 * |------+------+------+------+------+-------------+------+------+------+------+------|
136 * | | | | | | PLAY1| PLAY2| | | | | | 136 * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
137 * |------+------+------+------+------+------|------+------+------+------+------+------| 137 * |------+------+------+------+------+------|------+------+------+------+------+------|
138 * | | | | | | STOP | STOP | | | | | | 138 * | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | |
139 * |------+------+------+------+------+------+------+------+------+------+------+------| 139 * |------+------+------+------+------+------|------+------+------+------+------+------|
140 * | | | | | | | | | | | | 140 * | | | | | | | | | | | | |
141 * `-----------------------------------------------------------------------------------' 141 * `-----------------------------------------------------------------------------------'
142 */ 142 */
143[_DYN]= { 143[_MOUSE] = {
144 {_______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, _______}, 144 {KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
145 {_______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______}, 145 {KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ },
146 {_______, _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, _______, _______, _______, _______, _______}, 146 {KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ },
147 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 147 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
148}, 148},
149 149
150
151[_MAC]= { 150[_MAC]= {
152 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, 151 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
153 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, 152 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
@@ -248,32 +247,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
248 return true; 247 return true;
249} 248}
250 249
250const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
251 // These would trigger when you hit a key mapped as M(0)
252 if (record->event.pressed) {
253 switch(keycode) {
254 case 0: // Some custom string here
255 SEND_STRING("");
256 return false;
251 257
252const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { 258 case 1: // Word Select
253 switch(id) { 259 SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL));
254 // These would trigger when you hit a key mapped as M(0) 260 return false;
255 case 0: 261
256 if (record->event.pressed) { 262 case 2: // Word Select Mac
257 return MACRO( 263 SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
258 // SENSITIVE 264 return false;
259 END 265 }
260 );
261 }
262 break;
263 case 1: // Word Select
264 if (record->event.pressed) {
265 return MACRO(
266 DOWN(KC_LCTL), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LCTL),
267 END
268 );
269 }
270 case 2: // Word Select - MAC
271 if (record->event.pressed) {
272 return MACRO(
273 DOWN(KC_LALT), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LALT),
274 END
275 );
276 }
277 } 266 }
278 return MACRO_NONE; 267 return MACRO_NONE;
279}; 268};
diff --git a/keyboards/planck/keymaps/ajp10304/readme.md b/keyboards/planck/keymaps/ajp10304/readme.md
index 69b08ed511..3f92d76383 100644
--- a/keyboards/planck/keymaps/ajp10304/readme.md
+++ b/keyboards/planck/keymaps/ajp10304/readme.md
@@ -1,11 +1,12 @@
1# AJP10304 Custom Planck Layout 1# AJP10304 Custom Planck Layout
2# Also available for the JJ40
2 3
3**Note:** In the tables below where there are two characters on a key, 4**Note:** In the tables below where there are two characters on a key,
4the second is the output when shift is applied. 5the second is the output when shift is applied.
5 6
6**Note:** The below tables assume a UK layout. 7**Note:** The below tables assume a UK layout.
7 8
8##### Main Qwerty Layer 9##### Main Qwerty Layer
9 10
10* Tab: when held, operates as shift. 11* Tab: when held, operates as shift.
11* Enter: when held, operates as shift. 12* Enter: when held, operates as shift.
@@ -26,13 +27,13 @@ Activated when `fn` held in the above `qwerty` layer.
26| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 27| 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| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT|
28| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | 29| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
29| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn | 30| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
30 31
31##### Lower Layer 32##### Lower Layer
32Activated when `Lower` is held in the above `qwerty` layer. 33Activated when `Lower` is held in the above `qwerty` layer.
33 34
34* Numbers are along the top row, their shifted counterparts are on row 2. 35* 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* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
36* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word. 37* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.
37 38
38| | | | | | | | | | | | | 39| | | | | | | | | | | | |
@@ -41,48 +42,48 @@ Activated when `Lower` is held in the above `qwerty` layer.
41| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| 42| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks|
42| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | 43| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift |
43| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | 44| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
44 45
45 ##### Raise Layer 46 ##### Raise Layer
46 Activated when `Raise` is held in the above `qwerty` layer. 47 Activated when `Raise` is held in the above `qwerty` layer.
47 48
48 * Preferred layer for typing brackets. 49 * Preferred layer for typing brackets.
49 * Allows for cursor navigation to be used solely with the right hand. 50 * Allows for cursor navigation to be used solely with the right hand.
50 * WRDSEL: Select the word where the cursor is. 51 * WRDSEL: Select the word where the cursor is.
51 * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. 52 * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping.
52 53
53| | | | | | | | | | | | | 54| | | | | | | | | | | | |
54| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| 55| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
55| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| 56| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC|
56| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| 57| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +|
57| | | | { | } | |&#124;<| LEFT | DOWN |RIGHT |>&#124;|ZOOM -| 58| | | | { | } | |&#124;<| LEFT | DOWN |RIGHT |>&#124;|ZOOM -|
58| | | | | | Alt | Enter |Raise | | | | | 59| Mouse | | | | | Alt | Enter |Raise | | | | |
59 60
60##### Lower + Raise 61##### Lower + Raise
61Activated when `Lower` and `Raise` are held together the above `qwerty` layer. 62Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.
62 63
63* Audio controls in the same position as cursor keys from the `Raise` layer. 64* Audio controls in the same position as cursor keys from the `Raise` layer.
64* ????: Runs a macro for outputting a text string. Do not use this store passwords. 65* ????: Runs a macro for outputting a text string. Do not use this store passwords.
65* Reset: Enter bootloader for flashing firmware to the keyboard. 66* Reset: Enter bootloader for flashing firmware to the keyboard.
66* CAPS: Toggle caps lock. 67* CAPS: Toggle caps lock.
67* DYN: Enter `DYN` layer. 68* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
68* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
69MRSE with RAISE and MFNC with FUNC respectively. 69MRSE with RAISE and MFNC with FUNC respectively.
70* REC1, REC2: Start recording macro.
71* PLAY1, PLAY2: Playback macro.
72* STOP1, STOP2: Stop recording macro.
70 73
71| | | | | | | | | | | | |
72| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
73| ???? | Reset|Qwerty| | | | | | | | | Del |
74| CAPS | | | | | | | Mute | Vol+ | Play | | |
75| MAC | | | | | | | Prev | Vol- | Next | | |
76| | | | | | | | | DYN | | | |
77
78##### DYN
79Activated when `DYN` held along with `Lower` and `Raise`
80Allows recording of macros. To start recording the macro, press either REC1 or REC2.
81To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
82
83| | | | | | | | | | | | |
84| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
85| | | | | | REC1 | REC2 | | | | | |
86| | | | | | PLAY1| PLAY2| | | | | |
87| | | | | | STOP | STOP | | | | | |
88| | | | | | | | | | | | | 74| | | | | | | | | | | | |
75| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
76| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
77| CAPS | | | | | PLAY1| PLAY | Mute | Vol+ | Play | | |
78| MAC | | | | | STOP | STOP | Prev | Vol- | Next | | |
79| | | | | | | | | | | | |
80
81##### Mouse
82Activated when `fn` and `Raise` are held together.
83
84| | | | | | | | | | | | |
85| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
86| | | | | | | | | | | | |
87| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
88| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | |
89| | | | | | | | | | | | |
diff --git a/keyboards/planck/keymaps/ajp10304/rules.mk b/keyboards/planck/keymaps/ajp10304/rules.mk
index 76b36845c6..dc6ab13e89 100644
--- a/keyboards/planck/keymaps/ajp10304/rules.mk
+++ b/keyboards/planck/keymaps/ajp10304/rules.mk
@@ -2,4 +2,5 @@ ifndef QUANTUM_DIR
2 include ../../../../Makefile 2 include ../../../../Makefile
3endif 3endif
4 4
5AUDIO_ENABLE = no \ No newline at end of file 5AUDIO_ENABLE = no
6MOUSEKEY_ENABLE = yes