From a7ce482d142b5e4570ba0f63423ec66e51c51c6f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 11 Jun 2017 21:24:23 -0400 Subject: remove the rest of the .pngs --- keyboards/planck/keymaps/ab/keyboard-layout.png | Bin 27168 -> 0 bytes keyboards/planck/keymaps/ab/readme.md | 2 +- keyboards/planck/keymaps/circuit/Readme.md | 2 ++ keyboards/planck/keymaps/dbroqua/layout.png | Bin 21895 -> 0 bytes keyboards/planck/keymaps/dbroqua/readme.md | 2 +- keyboards/planck/keymaps/johannes/planck-layout.png | Bin 19661 -> 0 bytes keyboards/planck/keymaps/johannes/readme.md | 2 +- 7 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 keyboards/planck/keymaps/ab/keyboard-layout.png delete mode 100644 keyboards/planck/keymaps/dbroqua/layout.png delete mode 100644 keyboards/planck/keymaps/johannes/planck-layout.png (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/ab/keyboard-layout.png b/keyboards/planck/keymaps/ab/keyboard-layout.png deleted file mode 100644 index 70e4c2bd47..0000000000 Binary files a/keyboards/planck/keymaps/ab/keyboard-layout.png and /dev/null differ diff --git a/keyboards/planck/keymaps/ab/readme.md b/keyboards/planck/keymaps/ab/readme.md index 94f930500e..dc8b374bcf 100644 --- a/keyboards/planck/keymaps/ab/readme.md +++ b/keyboards/planck/keymaps/ab/readme.md @@ -1,7 +1,7 @@ # Practical keymap for Planck Ortholinear 40% Mechanical Keyboard A practical keymap that emulates standard QWERTY keyboard for Planck. Once you get comfortable with this keymap, you may fork and customize it for your own needs. -![Layout](keyboard-layout.png "Practical Keymap") +![Layout](https://i.imgur.com/xnlaiZd.png "Practical Keymap") ![Photo](keyboard-photo.jpg "Planck Keyboard") * Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/bda299020baaafe6a2a4a82e615e3cfc diff --git a/keyboards/planck/keymaps/circuit/Readme.md b/keyboards/planck/keymaps/circuit/Readme.md index cbdf5de4e5..58ea0140fd 100644 --- a/keyboards/planck/keymaps/circuit/Readme.md +++ b/keyboards/planck/keymaps/circuit/Readme.md @@ -42,3 +42,5 @@ Open the `Makefile` and set `TAP_DANCE_ENABLE = no`. I wrote the layout to compe * `ALT` and `GUI` are reversed compared to the normal US layout. I will also be using my Planck on my mac, and that's the standard in the Apple ecosystem. I may add a special compiler flag in the future to swap the two. * The DVORAK `Z` key is to the right of the `S` key instead of under it as part of a compromise I made to keep the ARROW keys available on the default layer. I prioritize the ARROW keys, so the DVORAK layout is the one to suffer. * I also support the little tones that the default Planck layout features, identical to them too, (minus those for layouts I don't support). To enable it, open the `Makefile` and set `AUDIO_ENABLE = yes`. + +![keyboard-layout](https://i.imgur.com/HHSZSQq.png) diff --git a/keyboards/planck/keymaps/dbroqua/layout.png b/keyboards/planck/keymaps/dbroqua/layout.png deleted file mode 100644 index 37b74cdc5e..0000000000 Binary files a/keyboards/planck/keymaps/dbroqua/layout.png and /dev/null differ diff --git a/keyboards/planck/keymaps/dbroqua/readme.md b/keyboards/planck/keymaps/dbroqua/readme.md index 777c76abd4..090af649e1 100644 --- a/keyboards/planck/keymaps/dbroqua/readme.md +++ b/keyboards/planck/keymaps/dbroqua/readme.md @@ -1,6 +1,6 @@ # Dbroqua Layout -![Layout](layout.png "Dbroqua Keymap") +![Layout](https://i.imgur.com/XxBtDBy.png "Dbroqua Keymap") * Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/e77306f9d14cc93fa26123b93b106474 * Online keyboard layout editor (lower layer): http://www.keyboard-layout-editor.com/#/gists/786e03f6fbd274cb4f4e77a3d67f85fa diff --git a/keyboards/planck/keymaps/johannes/planck-layout.png b/keyboards/planck/keymaps/johannes/planck-layout.png deleted file mode 100644 index e863b802cd..0000000000 Binary files a/keyboards/planck/keymaps/johannes/planck-layout.png and /dev/null differ diff --git a/keyboards/planck/keymaps/johannes/readme.md b/keyboards/planck/keymaps/johannes/readme.md index bbb7accf8f..c9c7e30808 100644 --- a/keyboards/planck/keymaps/johannes/readme.md +++ b/keyboards/planck/keymaps/johannes/readme.md @@ -1,6 +1,6 @@ # Planck layout for Swedish programmer I.e. easy access to special keys and åäö. -![layout](planck-layout.png) +![layout](https://i.imgur.com/74wHmDh.png) [KBLE link](http://www.keyboard-layout-editor.com/#/gists/dc01cc2225899308a05ba3ef0031548b) -- cgit v1.2.1 From 23c448b21d050cc1f9e9907ce9f6569d9b6c879b Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 11 Jun 2017 22:16:42 -0400 Subject: remove .hex, .PNG, .jpg --- keyboards/planck/keymaps/ab/keyboard-photo.jpg | Bin 252997 -> 0 bytes keyboards/planck/keymaps/ab/readme.md | 2 +- keyboards/planck/keymaps/circuit/keyboard-layout.png | Bin 154368 -> 0 bytes keyboards/planck/keymaps/dshields/keyboard-layout.jpg | Bin 50615 -> 0 bytes keyboards/planck/keymaps/dshields/readme.md | 2 +- keyboards/planck/keymaps/espynn/keyboard-layout.jpg | Bin 53129 -> 0 bytes keyboards/planck/keymaps/espynn/readme.md | 2 +- keyboards/planck/keymaps/jacob/Keyboard Layout.PNG | Bin 17292 -> 0 bytes keyboards/planck/keymaps/jacob/readme.md | 4 +++- keyboards/planck/keymaps/yale/readme.md | 1 + keyboards/planck/keymaps/yale/yale_layout_picture.jpg | Bin 58141 -> 0 bytes keyboards/planck/keymaps/yang/WS2812-wiring.jpg | Bin 290495 -> 0 bytes .../planck/keymaps/yang/planck-with-rgb-underglow.jpg | Bin 343033 -> 0 bytes keyboards/planck/keymaps/yang/readme.md | 2 ++ 14 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 keyboards/planck/keymaps/ab/keyboard-photo.jpg delete mode 100644 keyboards/planck/keymaps/circuit/keyboard-layout.png delete mode 100644 keyboards/planck/keymaps/dshields/keyboard-layout.jpg delete mode 100644 keyboards/planck/keymaps/espynn/keyboard-layout.jpg delete mode 100644 keyboards/planck/keymaps/jacob/Keyboard Layout.PNG create mode 100644 keyboards/planck/keymaps/yale/readme.md delete mode 100644 keyboards/planck/keymaps/yale/yale_layout_picture.jpg delete mode 100644 keyboards/planck/keymaps/yang/WS2812-wiring.jpg delete mode 100644 keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg create mode 100644 keyboards/planck/keymaps/yang/readme.md (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/ab/keyboard-photo.jpg b/keyboards/planck/keymaps/ab/keyboard-photo.jpg deleted file mode 100644 index 358cb6bcae..0000000000 Binary files a/keyboards/planck/keymaps/ab/keyboard-photo.jpg and /dev/null differ diff --git a/keyboards/planck/keymaps/ab/readme.md b/keyboards/planck/keymaps/ab/readme.md index dc8b374bcf..5f52e4436a 100644 --- a/keyboards/planck/keymaps/ab/readme.md +++ b/keyboards/planck/keymaps/ab/readme.md @@ -2,7 +2,7 @@ A practical keymap that emulates standard QWERTY keyboard for Planck. Once you get comfortable with this keymap, you may fork and customize it for your own needs. ![Layout](https://i.imgur.com/xnlaiZd.png "Practical Keymap") -![Photo](keyboard-photo.jpg "Planck Keyboard") +![Photo](https://i.imgur.com/1kQPbLv.jpg "Planck Keyboard") * Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/bda299020baaafe6a2a4a82e615e3cfc diff --git a/keyboards/planck/keymaps/circuit/keyboard-layout.png b/keyboards/planck/keymaps/circuit/keyboard-layout.png deleted file mode 100644 index e9296a6d97..0000000000 Binary files a/keyboards/planck/keymaps/circuit/keyboard-layout.png and /dev/null differ diff --git a/keyboards/planck/keymaps/dshields/keyboard-layout.jpg b/keyboards/planck/keymaps/dshields/keyboard-layout.jpg deleted file mode 100644 index 142f821308..0000000000 Binary files a/keyboards/planck/keymaps/dshields/keyboard-layout.jpg and /dev/null differ diff --git a/keyboards/planck/keymaps/dshields/readme.md b/keyboards/planck/keymaps/dshields/readme.md index 447eaae972..6070fd2e9e 100644 --- a/keyboards/planck/keymaps/dshields/readme.md +++ b/keyboards/planck/keymaps/dshields/readme.md @@ -8,5 +8,5 @@ one-shot layers, tap-dance keys and dynamic macros. Layout ------- -![Layout](keyboard-layout.jpg "Keyboard Layout") +![Layout](https://i.imgur.com/vZR3c8m.jpg "Keyboard Layout") diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg deleted file mode 100644 index c5e438f6af..0000000000 Binary files a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg and /dev/null differ diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md index ea84cf9552..a7e8f02f4a 100644 --- a/keyboards/planck/keymaps/espynn/readme.md +++ b/keyboards/planck/keymaps/espynn/readme.md @@ -3,7 +3,7 @@ Created by James Folkert: https://twitter.com/trekloFsemaJ Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c -![Layout](keyboard-layout.jpg "Practical Keymap") +![Layout](https://i.imgur.com/PEI4eva.jpg "Practical Keymap") * Online keyboard layout editor: http://www.keyboard-layout-editor.com/ diff --git a/keyboards/planck/keymaps/jacob/Keyboard Layout.PNG b/keyboards/planck/keymaps/jacob/Keyboard Layout.PNG deleted file mode 100644 index 40f0b89429..0000000000 Binary files a/keyboards/planck/keymaps/jacob/Keyboard Layout.PNG and /dev/null differ diff --git a/keyboards/planck/keymaps/jacob/readme.md b/keyboards/planck/keymaps/jacob/readme.md index 2a4be4ebce..7ec2d35222 100644 --- a/keyboards/planck/keymaps/jacob/readme.md +++ b/keyboards/planck/keymaps/jacob/readme.md @@ -1 +1,3 @@ -Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck. \ No newline at end of file +Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck. + +![layout](https://i.imgur.com/YG7xVp8.png) \ No newline at end of file diff --git a/keyboards/planck/keymaps/yale/readme.md b/keyboards/planck/keymaps/yale/readme.md new file mode 100644 index 0000000000..5b57450f52 --- /dev/null +++ b/keyboards/planck/keymaps/yale/readme.md @@ -0,0 +1 @@ +![pic](https://i.imgur.com/OmARVcw.jpg) \ No newline at end of file diff --git a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg deleted file mode 100644 index ab9c6b4eba..0000000000 Binary files a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg and /dev/null differ diff --git a/keyboards/planck/keymaps/yang/WS2812-wiring.jpg b/keyboards/planck/keymaps/yang/WS2812-wiring.jpg deleted file mode 100644 index 2c65cd283a..0000000000 Binary files a/keyboards/planck/keymaps/yang/WS2812-wiring.jpg and /dev/null differ diff --git a/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg b/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg deleted file mode 100644 index c636b9a83d..0000000000 Binary files a/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg and /dev/null differ diff --git a/keyboards/planck/keymaps/yang/readme.md b/keyboards/planck/keymaps/yang/readme.md new file mode 100644 index 0000000000..e42d9f912c --- /dev/null +++ b/keyboards/planck/keymaps/yang/readme.md @@ -0,0 +1,2 @@ +![rgb](https://i.imgur.com/97E6aSo.jpg) +![wiring](https://i.imgur.com/yL2ybk6.jpg) \ No newline at end of file -- cgit v1.2.1 From 5c11ba74d863bde954fe42ff6a48b52567003333 Mon Sep 17 00:00:00 2001 From: Dylan Khor Date: Thu, 15 Jun 2017 03:34:08 -0400 Subject: tap dance and hold changes to make planck match lets split --- keyboards/planck/keymaps/khord/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index f9fa7318a0..c3ba6ef073 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -47,7 +47,7 @@ enum planck_keycodes { #define M_BRDFT M(MACRO_BREATH_DEFAULT) // Tap Dance Declarations enum { - ESC_CAP = 0, + SFT_CAP = 0, LFT_HOM, DWN_PDN, UPP_PUP, @@ -72,10 +72,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + {TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } }, /* Colemak @@ -192,7 +192,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { qk_tap_dance_action_t tap_dance_actions[] = { - [ESC_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), + [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), [LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME), [DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN), [UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP), -- cgit v1.2.1 From cc158d90aeb9f95aa29591baed921bbb7fc82400 Mon Sep 17 00:00:00 2001 From: Daniel Shields Date: Thu, 15 Jun 2017 08:34:34 +0100 Subject: Minor updates to planck/keymaps/dshields * tweaks to tap dance keys * tidy up code * save a few bytes --- keyboards/planck/keymaps/dshields/config.h | 2 ++ keyboards/planck/keymaps/dshields/keymap.c | 38 ++++++++++-------------------- 2 files changed, 15 insertions(+), 25 deletions(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/dshields/config.h b/keyboards/planck/keymaps/dshields/config.h index 5f2810287b..906400adc8 100644 --- a/keyboards/planck/keymaps/dshields/config.h +++ b/keyboards/planck/keymaps/dshields/config.h @@ -37,6 +37,7 @@ #define TD_DOT TD(TDK_DOT) #define TD_SLSH TD(TDK_SLSH) +// macros #define ACTION_TAP_DANCE_FN_KEYCODE(user_fn, kc) { \ .fn = { NULL, user_fn, NULL }, \ .user_data = (void *)&((qk_tap_dance_pair_t) { kc, 0 }) \ @@ -47,6 +48,7 @@ .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ } +#define TAP(keycode) register_code16(keycode); unregister_code16(keycode) #endif diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c index 09bdc3e407..7b3f4bc97a 100644 --- a/keyboards/planck/keymaps/dshields/keymap.c +++ b/keyboards/planck/keymaps/dshields/keymap.c @@ -25,10 +25,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [DEF] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, TD_COMM, TD_DOT, TD_SLSH}, - {OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD_SCLN}, + {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, TD_COMM, TD_DOT, TD_SLSH}, + {OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower * ,-----------------------------------------------------------------------------------. @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, {KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END } }, /* Raise * ,-----------------------------------------------------------------------------------. @@ -59,10 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [RSE] = { - {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0}, + {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0 }, {KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END } }, /* Function * ,-----------------------------------------------------------------------------------. @@ -76,17 +76,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [FUN] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10}, + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, {KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R}, {BL_TOGG, BL_STEP, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R} }, - -}; - -void tap(uint16_t keycode) { - register_code16(keycode); - unregister_code16(keycode); }; void tap_dance_triple(qk_tap_dance_state_t *state, void *user_data) { @@ -96,25 +90,22 @@ void tap_dance_triple(qk_tap_dance_state_t *state, void *user_data) { switch(state->count) { case 2: register_code(KC_LSFT); - tap(keycode); + TAP(keycode); unregister_code(KC_LSFT); break; - case 3: + case 3: // fall through if (pair->kc2) { keycode = pair->kc2; } - tap(keycode); - tap(keycode); - break; + TAP(keycode); default: - tap(keycode); - break; + TAP(keycode); } } qk_tap_dance_action_t tap_dance_actions[] = { [TDK_SCLN] = ACTION_TAP_DANCE_FN_KEYCODE2(tap_dance_triple, KC_SCLN, KC_COLN), - [TDK_COMM] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_COMM), + [TDK_COMM] = ACTION_TAP_DANCE_FN_KEYCODE2(tap_dance_triple, KC_COMM, KC_LABK), [TDK_DOT] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_DOT), [TDK_SLSH] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_SLSH) }; @@ -126,6 +117,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_init_user(void) { -} - -- cgit v1.2.1 From 1a8042ae914f71e80b56b022d15606cf760cd255 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 17 Jun 2017 23:11:37 -0400 Subject: Added personal keymap with underglow, right shift, numpad, and bright hidden behind raise/lower --- keyboards/planck/keymaps/chance/Makefile | 6 + keyboards/planck/keymaps/chance/config.h | 16 ++ keyboards/planck/keymaps/chance/keymap.c | 386 +++++++++++++++++++++++++++++++ 3 files changed, 408 insertions(+) create mode 100644 keyboards/planck/keymaps/chance/Makefile create mode 100644 keyboards/planck/keymaps/chance/config.h create mode 100644 keyboards/planck/keymaps/chance/keymap.c (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/chance/Makefile b/keyboards/planck/keymaps/chance/Makefile new file mode 100644 index 0000000000..00d09e974a --- /dev/null +++ b/keyboards/planck/keymaps/chance/Makefile @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +AUDIO_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/chance/config.h b/keyboards/planck/keymaps/chance/config.h new file mode 100644 index 0000000000..3a1ab58563 --- /dev/null +++ b/keyboards/planck/keymaps/chance/config.h @@ -0,0 +1,16 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define TAPPING_TERM 165 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +//#define BACKLIGHT_ENABLE +#endif diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c new file mode 100644 index 0000000000..ae7d23945b --- /dev/null +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -0,0 +1,386 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _PLOVER 5 +#define _NUMPAD 6 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + NUMPAD, + EXT_NUM, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |En/sh | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(0) }, + {KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | | | Play | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,KC_HOME, KC_END, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} +}, +\ +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | PgUp | PgDn |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | | | Play | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_PGDN, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | Tab | | | ^ | / | 7 | 8 | 9 | - | = | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | | | % | * | 4 | 5 | 6 | + | ( | ) | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shft | | | $ | Del | 1 | 2 | 3 |Enter | [ | ] |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | Ctrl | Alt | Gui | | 0 | . | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = { + {KC_TAB, XXXXXXX, XXXXXXX, KC_CIRC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_EQL, XXXXXXX, KC_BSPC}, + {KC_ESC, XXXXXXX, XXXXXXX, KC_PERC, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LPRN, KC_RPRN, XXXXXXX}, + {KC_LSFT, XXXXXXX, XXXXXXX, KC_DLR, KC_DEL, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LBRC, KC_RBRC, KC_ENT }, + {EXT_NUM, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_P0, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Login| | | | | | Num |Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps |RGBTOG|RGBMOD| Hue+ | Hue- | Sat+ | Sat- | Val+ | Val- | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + { M(1) , _______, _______, _______, _______, _______, NUMPAD, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + register_code(KC_RCTL); + register_code(KC_ESC); + } + else{ + clear_keyboard(); + } + break; + case 1: + if (record->event.pressed) { + register_code(KC_LCTL); + register_code(KC_LALT); + register_code(KC_DEL); + } + else{ + clear_keyboard(); + } + break; + } + return MACRO_NONE; +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case NUMPAD: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_NUMPAD); + } + return false; + break; + case EXT_NUM: + if (record->event.pressed) { + layer_off(_NUMPAD); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif -- cgit v1.2.1 From 2ffcf47793f825d510077975cc72ed0f1f7fd036 Mon Sep 17 00:00:00 2001 From: Brandon Height Date: Mon, 19 Jun 2017 20:12:30 -0700 Subject: This is a complete redo of my keymap. It includes several layers including qwerty, colemak, navigation, and gui layers. I also was playing around with dancing tap keys. --- keyboards/planck/keymaps/brandon/Makefile | 32 +- keyboards/planck/keymaps/brandon/config.h | 98 ++++++ keyboards/planck/keymaps/brandon/keymap.c | 512 +++++++++++++++++++++++------- 3 files changed, 499 insertions(+), 143 deletions(-) create mode 100644 keyboards/planck/keymaps/brandon/config.h (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/brandon/Makefile b/keyboards/planck/keymaps/brandon/Makefile index cf2c31f0fb..a79bda3731 100644 --- a/keyboards/planck/keymaps/brandon/Makefile +++ b/keyboards/planck/keymaps/brandon/Makefile @@ -1,27 +1,13 @@ -# Please remove if no longer applicable -$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD) -$(warning Please disable some options in the Makefile to resolve) +# This gets included at the beginning of the Planck's Makefile. +# Alternatively, you can run make from the keymap directory +# and the main Makefile will be included after. -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +COMMAND_ENABLE = no # Disable shift combination, which conflicts with shift-parens +NKRO_ENABLE = yes # N-key rollover required for use as a steno board +AUDIO_ENABLE = no # Audio output on port C6 +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/planck/keymaps/brandon/config.h b/keyboards/planck/keymaps/brandon/config.h new file mode 100644 index 0000000000..5442ebf751 --- /dev/null +++ b/keyboards/planck/keymaps/brandon/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define TAPPING_TERM 200 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define AUDIO_VOICES + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index 2b89f86db2..f6ee89b17c 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c @@ -1,134 +1,406 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - #include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include "action_layer.h" +#include "eeconfig.h" +#include "keymap_plover.h" +#include "action_tapping.h" + +extern keymap_config_t keymap_config; + +// Keymap layers +enum planck_layers { + BASE_QWERTY_LAYER, + BASE_COLEMAK_LAYER, + BASE_STENO_LAYER, + LOWER_LAYER, + RAISE_LAYER, + NAVIGATION_LAYER, + GUI_LAYER, + KEYBOARD_LAYER +}; + +// Key aliases for legibility +#define _______ KC_TRNS +#define ___x___ KC_NO + +// Macros +enum planck_macros { + LALT_BRACE, + RALT_BRACE +}; + +// Dashes (macOS) +#define KC_NDSH LALT(KC_MINS) +#define KC_MDSH S(LALT(KC_MINS)) -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QW 0 -#define _CM 1 -#define _TK 2 -#define _LW 3 -#define _RS 4 +// Window manager keys +#define WM_FULL LALT(LGUI(KC_F)) +#define WM_NEXT LCTL(LALT(LGUI(KC_RGHT))) +#define WM_PREV LCTL(LALT(LGUI(KC_LEFT))) +#define WM_NW LCTL(LGUI(KC_LEFT)) +#define WM_N LALT(LGUI(KC_UP)) +#define WM_NE LCTL(LGUI(KC_RGHT)) +#define WM_E LALT(LGUI(KC_RGHT)) +#define WM_SE S(LCTL(LGUI(KC_RGHT))) +#define WM_S LALT(LGUI(KC_DOWN)) +#define WM_SW S(LCTL(LGUI(KC_LEFT))) +#define WM_W LALT(LGUI(KC_LEFT)) +#define WM_CNTR LALT(LGUI(KC_C)) + +// Special key codes +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + STENO, + LOWER, + RAISE, + PV_EXIT, + PV_LOOK +}; + +//Tap Dance Declarations +enum { + TD_ESC_GRV = 0 +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Esc, twice for Backspace + [TD_ESC_GRV] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) + // Other declarations would go here, separated by commas, if you have them +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = { /* Qwerty */ -/* MIT Layout (QWERTY layer) - * - * ,-----------------------------------------------------------------------. - * | esc | q | w | e | r | t | y | u | i | o | p | bspc| - * |-----------------------------------------------------------------------| - * | tab | a | s | d | f | g | h | j | k | l | ; | ' | - * |-----------------------------------------------------------------------| - * |shift| z | x | c | v | b | n | m | , | . | / |enter| - * |-----------------------------------------------------------------------| - * | ctl | alt | win | TK |lower| spc |raise|left |down | up |right| - * `-----------------------------------------------------------------------' - */ - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT) }, - {KC_LCTL, KC_LALT, KC_LGUI, TG(_TK), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_CM] = { /* Colemak */ -/* MIT Layout (Colemak layer) - * - * ,-----------------------------------------------------------------------. - * | esc | q | w | f | p | g | j | l | u | y | ; | bspc| - * |-----------------------------------------------------------------------| - * | tab | a | r | s | t | d | h | n | e | i | o | ' | - * |-----------------------------------------------------------------------| - * |shift| z | x | c | v | b | k | m | , | . | / |enter| - * |-----------------------------------------------------------------------| - * | ctl | alt | win | TK |lower| spc |raise|left |down | up |right| - * `-----------------------------------------------------------------------' - */ - {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_ENT)}, - {KC_LCTL, KC_LALT, KC_LGUI, TG(_TK), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_RS] = { /* RAISE */ -/* MIT Layout (RAISE layer) - * - * ,-----------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | bspc| - * |-----------------------------------------------------------------------| - * | tab | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |-----------------------------------------------------------------------| - * |shift| F7 | F8 | F9 | F10 | F11 | F12 | QW | CM | BL | RST |enter| - * |-----------------------------------------------------------------------| - * | ctl | alt | win | del |lower| spc |raise|next |vold |volu |PLAY | - * `-----------------------------------------------------------------------' - */ - - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), M(0), RESET, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[_LW] = { /* LOWER */ -/* MIT Layout (Colemak layer) - * - * ,-----------------------------------------------------------------------. - * | esc | q | w | f | p | g | j | l | u | y | ; | bspc| - * |-----------------------------------------------------------------------| - * | tab | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |-----------------------------------------------------------------------| - * |shift| F7 | F8 | F9 | F10 | F11 | F12 | QW | CM | BL | RST |enter| - * |-----------------------------------------------------------------------| - * | ctl | alt | win | TK |lower| spc |raise|next |vold |volu |PLAY | - * `-----------------------------------------------------------------------' - */ - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), M(0), RESET, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[_TK] = { /* Ten Key*/ -/* MIT Layout (Ten Key layer) - * - * ,-----------------------------------------------------------------------. - * | esc | F9 | F10 | F11 | F12 | PGUP| % | / | 7 | 8 | 9 | bspc| - * |-----------------------------------------------------------------------| - * | tab | F5 | F6 | F7 | F8 | PGDN| HOME| * | 4 | 5 | 6 | \ | - * |-----------------------------------------------------------------------| - * |shift| F1 | F2 | F3 | F4 | DEL | END | 0 | 1 | 2 | 3 |enter| - * |-----------------------------------------------------------------------| - * | ctl | alt | win | TK |lower| spc |raise|left |down | up |right| - * `-----------------------------------------------------------------------' - */ - {KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_PERC, KC_SLSH, KC_7, KC_8, KC_9, KC_BSPC}, - {KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_PIPE}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_END, KC_0, KC_1, KC_2, KC_3, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -} + /* Base layer (Qwerty) + * ,-----------------------------------------------------------------------. + * Double tap 4 ~ | ESC | Q | W | E | R | T | Y | U | I | O | P | ' | + * |-----------------------------------------------------------------------| + * Tap for Tab -- |Ctrl | A | S | D | F | G | H | J | K | L |; Fn4|Ctrl | -- Tap for Enter + * |-----------------------------------------------------------------------| + * Tap for ( -- |Shift| Z | X | C | V | B | N | M | , | . | / |Shift| -- Tap for ) + * |-----------------------------------------------------------------------| + * Tap for [ -- | Fn3 |Hyper| Alt |Super| Fn1 | Space | Fn2 |Super| Alt |Hyper| Fn3 | -- Tap for ] + * `-----------------------------------------------------------------------' + * / / + * Tap for ] [ --------'-----------------------------------------------------' + */ + [BASE_QWERTY_LAYER] = { + {TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT}, + {F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, F(1), F(6)}, + {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC}, + {F(3), ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), F(4)} + }, + + /* Base layer (Colemak) + * ,-----------------------------------------------------------------------. + * | | Q | W | F | P | G | J | L | U | Y | ; | | + * |-----------------------------------------------------------------------| + * | | A | R | S | T | D | H | N | E | I |O Fn4| | + * |-----------------------------------------------------------------------| + * | | Z | X | C | V | B | K | M | | | | | + * |-----------------------------------------------------------------------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------' + */ + [BASE_COLEMAK_LAYER] = { + {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______}, + {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, F(2), _______}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + }, + + /* Base layer (Qwerty-Steno) + * ,-----------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |-----------------------------------------------------------------------| + * |Look | | T | P | H | | F | P | L | T | D | + * | -up | S |-----+-----+-----| * |-----+-----+-----+-----+-----| + * | | | K | W | R | | R | B | G | S | Z | + * |-----------------------------------------------------------------------| + * |Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------' + */ + [BASE_STENO_LAYER] = { + {PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM}, + {PV_LOOK, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD}, + {PV_LOOK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ}, + {PV_EXIT, ___x___, ___x___, PV_A, PV_O, _______, _______, PV_E, PV_U, ___x___, ___x___, ___x___} + }, + + /* Numeric layer + * ,-----------------------------------------------------------------------. + * Application -- |D-Grv| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | # | + * window |-----------------------------------------------------------------------| + * switcher | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |-----------------------------------------------------------------------| + * | | - | = | ` | \ | |ndash|mdash| , | . | / | | + * |-----------------------------------------------------------------------| + * | | | | | | Backspace | | | | | | + * `-----------------------------------------------------------------------' + */ + [LOWER_LAYER] = { + {LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3)}, + {F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6)}, + {KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC}, + {F(3), ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), F(4)} + }, + + /* Symbol layer + * ,-----------------------------------------------------------------------. + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | # | + * |-----------------------------------------------------------------------| + * | | ! | @ | # | $ | % | ^ | & | * | ' | " | | \ + * |-----------------------------------------------------------------------| |-- Mostly shifted version + * | | _ | + | ~ | | | |ndash|mdash| , | . | / | | / of lower layer + * |-----------------------------------------------------------------------| + * | | | | | | Delete | | | | | | + * `-----------------------------------------------------------------------' + */ + [RAISE_LAYER] = { + {_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(KC_3)}, + {_______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_QUOT, S(KC_QUOT), _______}, + {_______, KC_UNDS, KC_PLUS, KC_TILD, KC_PIPE, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, KC_DEL, KC_DEL, _______, _______, _______, _______, _______} + }, + + /* Directional navigation layer + * + * Large movements -----/```````````````````\ /```````````````````\----- Vim-style arrow keys + * ,-----------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |-----------------------------------------------------------------------| + * | | |Home |PgUp |PgDn | End |Left |Down | Up |Right| | | + * |-----------------------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------------------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------' + */ + [NAVIGATION_LAYER] = { + {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, + {_______, ___x___, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, F(1), _______}, + {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______}, + {_______, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, _______} + }, + /* GUI (window management/mouse/media controls) layer + * + * Mouse keys -----/```````````````````\ /```````````````````\----- Window manager + * ,-----------------------------------------------------------------------. + * | |Ms B2|Ms Up|Ms B1|Ms WD| | |Prev | NW | N | NE | | + * |-----------------------------------------------------------------------| + * | |Ms L |Ms Dn|Ms R |Ms WU| | |Full | W |Centr| E | | + * |-----------------------------------------------------------------------| + * | |Ms WL|Ms B3|Ms WR| | | |Next | SW | S | SE | | + * |-----------------------------------------------------------------------| + * | |Prev |Play |Next |Brig-| Sleep |Brig+|Mute |Vol- |Vol+ | | + * `-----------------------------------------------------------------------' + * \___ Media ___/ \___ Screen/sleep __/ \___ Volume __/ + */ + [GUI_LAYER] = { + {_______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, ___x___, ___x___, WM_PREV, WM_NW, WM_N, WM_NE, _______}, + {_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, ___x___, ___x___, WM_FULL, WM_W, WM_CNTR, WM_E, _______}, + {_______, KC_WH_L, KC_BTN3, KC_WH_R, ___x___, ___x___, ___x___, WM_NEXT, WM_SW, WM_S, WM_SE, _______}, + {_______, KC_MPRV, KC_MPLY, KC_MNXT, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, _______} + }, + + /* Keyboard settings layer + * ,-----------------------------------------------------------------------. + * Firmware -- | |Reset| | | | | | | | | | | + * |-----------------------------------------------------------------------| + * Set layer -- | |Qwert|Colem|Steno| ... | | | | | | | | + * |-----------------------------------------------------------------------| + * Audio -- | |Voic-|Voic+|Mus +|Mus -|MIDI+|MIDI-| | |Aud +|Aud -| | + * |-----------------------------------------------------------------------| + * | | | | | | Toggle | |Toggl| BL- | BL+ | | + * `-----------------------------------------------------------------------' + * \_____________\_ Backlight _/ + */ + [KEYBOARD_LAYER] = { + {___x___, RESET, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, + {___x___, QWERTY, COLEMAK, STENO, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, + {___x___, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, AU_ON, AU_OFF, ___x___}, + {___x___, ___x___, ___x___, ___x___, LOWER, BL_TOGG, BL_TOGG, RAISE, BL_TOGG, BL_DEC, BL_INC, ___x___} + } }; const uint16_t PROGMEM fn_actions[] = { + // Layer switching + [1] = ACTION_LAYER_TAP_KEY(NAVIGATION_LAYER, KC_SCOLON), + [2] = ACTION_LAYER_TAP_KEY(NAVIGATION_LAYER, KC_O), + [3] = ACTION_LAYER_TAP_KEY(GUI_LAYER, KC_LBRACKET), + [4] = ACTION_LAYER_TAP_KEY(GUI_LAYER, KC_RBRACKET), + // Modifiers + [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), + [6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case LALT_BRACE: + if (record->event.pressed) { + register_mods(MOD_LALT); + record->tap.interrupted = 0; + } else { + unregister_mods(MOD_LALT); + + if (record->tap.count && !record->tap.interrupted) { + add_weak_mods(MOD_LSFT); + register_code(KC_LBRACKET); + unregister_code(KC_LBRACKET); + del_weak_mods(MOD_LSFT); + } + + record->tap.count = 0; } - return MACRO_NONE; -}; + break; + case RALT_BRACE: + if (record->event.pressed) { + register_mods(MOD_RALT); + record->tap.interrupted = 0; + } else { + unregister_mods(MOD_RALT); + + if (record->tap.count && !record->tap.interrupted) { + add_weak_mods(MOD_LSFT); + register_code(KC_RBRACKET); + unregister_code(KC_RBRACKET); + del_weak_mods(MOD_LSFT); + } + + record->tap.count = 0; + } + break; + } + return MACRO_NONE; +} + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Send PHROPB ({PLOVER:RESUME}). +void plover_resume(void) { + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RP); + register_code(PV_RB); + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RP); + unregister_code(PV_RB); +} + +// Send PHROF ({PLOVER:SUSPEND}). +void plover_suspend(void) { + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RF); + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RF); +} + +// Send PHROBG ({PLOVER:LOOKUP}). +void plover_lookup(void) { + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RB); + register_code(PV_RG); + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RB); + unregister_code(PV_RG); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<event.pressed) { + persistant_default_layer_set(1UL<event.pressed) { + layer_on(LOWER_LAYER); + update_tri_layer(LOWER_LAYER, RAISE_LAYER, KEYBOARD_LAYER); + } else { + layer_off(LOWER_LAYER); + update_tri_layer(LOWER_LAYER, RAISE_LAYER, KEYBOARD_LAYER); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(RAISE_LAYER); + update_tri_layer(LOWER_LAYER, RAISE_LAYER, KEYBOARD_LAYER); + } else { + layer_off(RAISE_LAYER); + update_tri_layer(LOWER_LAYER, RAISE_LAYER, KEYBOARD_LAYER); + } + return false; + case STENO: + if (record->event.pressed) { + layer_off(RAISE_LAYER); + layer_off(LOWER_LAYER); + layer_off(KEYBOARD_LAYER); + layer_on(BASE_STENO_LAYER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + plover_resume(); + } + return false; + case PV_EXIT: + if (record->event.pressed) { + plover_suspend(); + layer_off(BASE_STENO_LAYER); + } + return false; + case PV_LOOK: + if (record->event.pressed) { + plover_lookup(); + } + return false; + } + return true; +} + +void matrix_init_user(void) { +#ifdef AUDIO_ENABLE + startup_user(); +#endif +} -- cgit v1.2.1 From 3a2ae6a213acf7b20fab711a311ed5ca44b79b19 Mon Sep 17 00:00:00 2001 From: rai-suta Date: Mon, 26 Jun 2017 00:37:46 +0900 Subject: Add a keymap for testing JIS_KEYCODE. --- keyboards/planck/keymaps/rai-suta/Makefile | 28 ++++++++ keyboards/planck/keymaps/rai-suta/config.h | 8 +++ keyboards/planck/keymaps/rai-suta/keymap.c | 107 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/rai-suta/readme.md | 3 + 4 files changed, 146 insertions(+) create mode 100644 keyboards/planck/keymaps/rai-suta/Makefile create mode 100644 keyboards/planck/keymaps/rai-suta/config.h create mode 100644 keyboards/planck/keymaps/rai-suta/keymap.c create mode 100644 keyboards/planck/keymaps/rai-suta/readme.md (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/rai-suta/Makefile b/keyboards/planck/keymaps/rai-suta/Makefile new file mode 100644 index 0000000000..4263440ec1 --- /dev/null +++ b/keyboards/planck/keymaps/rai-suta/Makefile @@ -0,0 +1,28 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Option defines +OPT_DEFS += -DJIS_KEYCODE + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/rai-suta/config.h b/keyboards/planck/keymaps/rai-suta/config.h new file mode 100644 index 0000000000..b36aa3db92 --- /dev/null +++ b/keyboards/planck/keymaps/rai-suta/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define TAPPING_TERM ( 200 ) + +#endif diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c new file mode 100644 index 0000000000..13fc3677e6 --- /dev/null +++ b/keyboards/planck/keymaps/rai-suta/keymap.c @@ -0,0 +1,107 @@ +// This keymap assumes that the keyboard is recognized as JIS keyboard from the OS. + +#include "planck.h" +#include "version.h" + +// Keycode defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define C(kc) LCTL(kc) +// JIS keyboard +#define JK_CIRC KC_EQL // ^ +#define JK_AT KC_LBRC // @ +#define JK_LBRC KC_RBRC // [ +#define JK_CLN KC_QUOT // : +#define JK_RBRC KC_BSLS // ] +#define JK_BSLS KC_RO // Backslash(\) +#define JK_DQT S(KC_2) // " +#define JK_AMPR S(KC_6) // & +#define JK_SQT S(KC_7) // ' +#define JK_LPRN S(KC_8) // ( +#define JK_RPRN S(KC_9) // ) +#define JK_S0 S(KC_0) // Tilde(~) at IBM 5576-A01 spec +#define JK_EQ S(KC_MINS) // = +#define JK_TLD S(JK_CIRC) // ~ +#define JK_PIPE S(KC_JYEN) // | +#define JK_GRV S(JK_AT) // ` +#define JK_LCBR S(JK_LBRC) // { +#define JK_PLUS S(KC_SCLN) // + +#define JK_ASTR S(JK_CLN) // * +#define JK_RCBR S(JK_RBRC) // } +#define JK_QUES S(KC_SLSH) // ? +#define JK_UNDS S(JK_BSLS) // _ + +enum user_macro { + UM_MHEN, + UM_HENK, + UM_DEBUG, +}; +#define M_MHEN MACROTAP(UM_MHEN) +#define M_HENK MACROTAP(UM_HENK) +#define M_DEBUG M(UM_DEBUG) + +enum keymap_layer { + KL_QWERTY, + KL_LOWER, + KL_RAISE, +}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [KL_QWERTY] = { + { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JK_CLN}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_ZKHK, KC_KANA, KC_LGUI, KC_LALT, M_MHEN, KC_SPC, KC_SPC, M_HENK, KC_RALT, KC_RGUI, KC_APP, KC_ENT} + }, + + [KL_LOWER] = { + {KC_GESC, KC_EXLM, JK_DQT, KC_HASH, KC_DLR, KC_PERC, JK_AMPR, JK_SQT, JK_LPRN, JK_RPRN, JK_S0, KC_DEL}, + {_______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, JK_EQ, JK_TLD, JK_GRV, JK_LCBR, JK_PIPE}, + {_______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), XXXXXXX, KC_ENT, KC_LABK, KC_RABK, JK_RCBR, JK_UNDS}, + { RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + }, + + [KL_RAISE] = { + {KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, JK_CIRC, JK_AT, JK_LBRC, KC_JYEN}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_COMM, KC_DOT, JK_RBRC, JK_BSLS}, + {M_DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + }, + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + dprintf( "record.\n" + " event.pressed = %u\n" + " tap.count = %u\n" + " tap.interrupted = %u\n" + , record->event.pressed + , record->tap.count + , record->tap.interrupted ); + dprintf( "id = %u\n", id ); + dprintf( "opt = %u\n", opt ); + + switch(id) { + + case UM_MHEN: { + return MACRO_TAP_HOLD_LAYER( record, MACRO(TYPE(KC_MHEN), END), KL_LOWER ); + } break; + + case UM_HENK: { + return MACRO_TAP_HOLD_LAYER( record, MACRO(TYPE(KC_HENK), END), KL_RAISE ); + } break; + + case UM_DEBUG: { + if (record->event.pressed) { + debug_enable = !debug_enable; + if (debug_enable) { + dprint("\nDEBUG: enabled.\n"); + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + } + } break; + + } + return MACRO_NONE; +}; diff --git a/keyboards/planck/keymaps/rai-suta/readme.md b/keyboards/planck/keymaps/rai-suta/readme.md new file mode 100644 index 0000000000..cb73c172aa --- /dev/null +++ b/keyboards/planck/keymaps/rai-suta/readme.md @@ -0,0 +1,3 @@ +# rai-suta's Planck Layout + +This keymap assumes that the keyboard is recognized as JIS keyboard from the OS. -- cgit v1.2.1 From b476d65b9cc2b25031c6f8143fd6a59a7d5ee6b7 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 30 Jun 2017 16:09:52 -0400 Subject: Update keyboards' rules.mk/Makefiles (#1442) this may change some of the keyboards' default settings - if you experience anything odd, please check back to this commit --- .../planck/keymaps/handwired_binaryplease/Makefile | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/handwired_binaryplease/Makefile b/keyboards/planck/keymaps/handwired_binaryplease/Makefile index 538b1c26cc..248fe2bb74 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/Makefile +++ b/keyboards/planck/keymaps/handwired_binaryplease/Makefile @@ -56,19 +56,19 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -MIDI_ENABLE ?= yes # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = yes # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -- cgit v1.2.1