summaryrefslogtreecommitdiff
path: root/keyboards/planck/keymaps
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 /keyboards/planck/keymaps
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
Diffstat (limited to 'keyboards/planck/keymaps')
-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
3 files changed, 81 insertions, 90 deletions
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 {
_FUNC,
_MFNC,
_ADJUST,
- _DYN
+ _MOUSE
};
enum planck_keycodes {
@@ -27,6 +27,7 @@ enum planck_keycodes {
MLWR,
RAISE,
MRSE,
+ MOUSE,
DYNAMIC_MACRO_RANGE
};
@@ -64,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn |
+ * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
* `-----------------------------------------------------------------------------------'
*/
[_FUNC] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
- {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT },
- {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) },
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
+ {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
+ {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT },
+ {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) },
+ {_______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ }
},
/* Lower
@@ -100,54 +101,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | Alt | Enter|Raise | | | | |
+ * | Mouse| | | | | Alt | Enter|Raise | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
- {KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN },
- {KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) },
- {_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) },
- {_______, _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ }
+ {KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN },
+ {KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) },
+ {_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) },
+ {MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ }
},
-
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
- * | ???? | Reset|Qwerty| | | | | | | | | Del |
+ * | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * | CAPS | | | | | | | Mute | Vol+ | Play | | |
+ * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | Prev | Vol- | Next | | |
+ * | | | | | | STOP | STOP | Prev | Vol- | Next | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | DYN | | | |
+ * | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
- {M(0), RESET, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ },
- {TG(_MAC), _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ },
- {_______, _______, _______, _______, _______, _______, _______, _______, MO(_DYN), _______, _______, _______ }
+ {M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL },
+ {KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ },
+ {TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ },
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
},
-/* DYN: Macro Recording and Playback
+/* Mouse
* ,-----------------------------------------------------------------------------------.
- * | | | | | | REC1 | REC2 | | | | | |
+ * | ESC | | | | | | | | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | | | | PLAY1| PLAY2| | | | | |
+ * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | STOP | STOP | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
+ * | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_DYN]= {
- {_______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+[_MOUSE] = {
+ {KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ {KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ },
+ {KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ },
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
},
-
[_MAC]= {
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
@@ -248,32 +247,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
+ // These would trigger when you hit a key mapped as M(0)
+ if (record->event.pressed) {
+ switch(keycode) {
+ case 0: // Some custom string here
+ SEND_STRING("");
+ return false;
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch(id) {
- // These would trigger when you hit a key mapped as M(0)
- case 0:
- if (record->event.pressed) {
- return MACRO(
- // SENSITIVE
- END
- );
- }
- break;
- case 1: // Word Select
- if (record->event.pressed) {
- return MACRO(
- DOWN(KC_LCTL), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LCTL),
- END
- );
- }
- case 2: // Word Select - MAC
- if (record->event.pressed) {
- return MACRO(
- DOWN(KC_LALT), DOWN(KC_RIGHT), UP(KC_RIGHT), DOWN(KC_LSFT), DOWN(KC_LEFT), UP(KC_LEFT), UP(KC_LSFT), UP(KC_LALT),
- END
- );
- }
+ case 1: // Word Select
+ 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));
+ return false;
+
+ case 2: // Word Select Mac
+ 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));
+ return false;
+ }
}
return MACRO_NONE;
};
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 @@
# AJP10304 Custom Planck Layout
+# Also available for the JJ40
-**Note:** In the tables below where there are two characters on a key,
+**Note:** In the tables below where there are two characters on a key,
the second is the output when shift is applied.
-
+
**Note:** The below tables assume a UK layout.
-##### Main Qwerty Layer
+##### Main Qwerty Layer
* Tab: when held, operates as shift.
* Enter: when held, operates as shift.
@@ -26,13 +27,13 @@ Activated when `fn` held in the above `qwerty` layer.
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT|
| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift |
-| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | MENU | Alt | Ctrl | Fn |
+| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
##### Lower Layer
Activated when `Lower` is held in the above `qwerty` layer.
* Numbers are along the top row, their shifted counterparts are on row 2.
-* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
+* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.
| | | | | | | | | | | | |
@@ -41,48 +42,48 @@ Activated when `Lower` is held in the above `qwerty` layer.
| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks|
| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift |
| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
-
+
##### Raise Layer
Activated when `Raise` is held in the above `qwerty` layer.
-
+
* Preferred layer for typing brackets.
* Allows for cursor navigation to be used solely with the right hand.
* WRDSEL: Select the word where the cursor is.
* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping.
-| | | | | | | | | | | | |
-| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
+| | | | | | | | | | | | |
+| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC|
| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +|
| | | | { | } | |&#124;<| LEFT | DOWN |RIGHT |>&#124;|ZOOM -|
-| | | | | | Alt | Enter |Raise | | | | |
-
+| Mouse | | | | | Alt | Enter |Raise | | | | |
+
##### Lower + Raise
-Activated when `Lower` and `Raise` are held together the above `qwerty` layer.
+Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.
-* Audio controls in the same position as cursor keys from the `Raise` layer.
+* Audio controls in the same position as cursor keys from the `Raise` layer.
* ????: Runs a macro for outputting a text string. Do not use this store passwords.
* Reset: Enter bootloader for flashing firmware to the keyboard.
* CAPS: Toggle caps lock.
-* DYN: Enter `DYN` layer.
-* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
+* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
MRSE with RAISE and MFNC with FUNC respectively.
+* REC1, REC2: Start recording macro.
+* PLAY1, PLAY2: Playback macro.
+* STOP1, STOP2: Stop recording macro.
-| | | | | | | | | | | | |
-| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
-| ???? | Reset|Qwerty| | | | | | | | | Del |
-| CAPS | | | | | | | Mute | Vol+ | Play | | |
-| MAC | | | | | | | Prev | Vol- | Next | | |
-| | | | | | | | | DYN | | | |
-
-##### DYN
-Activated when `DYN` held along with `Lower` and `Raise`
-Allows recording of macros. To start recording the macro, press either REC1 or REC2.
-To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
-
-| | | | | | | | | | | | |
-| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
-| | | | | | REC1 | REC2 | | | | | |
-| | | | | | PLAY1| PLAY2| | | | | |
-| | | | | | STOP | STOP | | | | | |
| | | | | | | | | | | | |
+| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
+| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
+| CAPS | | | | | PLAY1| PLAY | Mute | Vol+ | Play | | |
+| MAC | | | | | STOP | STOP | Prev | Vol- | Next | | |
+| | | | | | | | | | | | |
+
+##### Mouse
+Activated when `fn` and `Raise` are held together.
+
+| | | | | | | | | | | | |
+| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
+| | | | | | | | | | | | |
+| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
+| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | |
+| | | | | | | | | | | | |
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
include ../../../../Makefile
endif
-AUDIO_ENABLE = no \ No newline at end of file
+AUDIO_ENABLE = no
+MOUSEKEY_ENABLE = yes