Halfkey function for every layer (#2327)

* started work on halfkeyboard

* update to keymap

* halfkey layouts complete for dvorak and qwerty

* added plover layout to halfkeyboard mapping

* fixed error in dvorak layout right hand

* fixed error in dvorak layout right hand, comments updated

* thing

* added minus and equals to normal layouts

* added minus and equals to normal layouts

* adde visualizer matching halfkeyboard mappings

* adde visualizer matching halfkeyboard mappings

* updated keymaps for mirror handedness functionality for all layers.  Also added visualizer code for distinct color for each layer, and LCD text displaying the current layer.

* had a KC_TILD where should have had KC_GRAV

* its spelled KC_GRAVE
planck_rev6
Oryhara 7 years ago committed by Jack Humbert
parent cee0a33396
commit 7636fdbbd0

@ -8,7 +8,10 @@
#define DVORAK 2 // dvorak layer #define DVORAK 2 // dvorak layer
#define HALFDVORAK 3 // mirrored dvorak layer #define HALFDVORAK 3 // mirrored dvorak layer
#define SYMB 5 // symbols #define SYMB 5 // symbols
#define MDIA 6 // media keys #define HALFSYMB 6 // media keys
#define PLVR 7 // steno plover layout
#define SHORTCUTS 8 //layer with shortcut keys
enum custom_keycodes { enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here PLACEHOLDER = SAFE_RANGE, // can always be here
@ -21,258 +24,346 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: qwerty /* Keymap 0: qwerty
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC | * | ESC | 1 | 2 | 3 | 4 | 5 | ` | | \ | 6 | 7 | 8 | 9 | 0 | BSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | * | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | ' |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER | * | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt | * |Symbol|Dvorak| |Plover|HalfSymb|
* ,------|------|------| |------+--------+------. * ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | | * | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter | * | Space|DELETE|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror| * |mirror| | End | | PgDn | |mirror|
* `--------------------' `----------------------' * `--------------------' `----------------------'
*/ */
// If it accepts an argument (i.e, is a function), it doesn't need KC_. // If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_* // Otherwise, it needs KC_*
[QWERTY] = LAYOUT_ergodox( // layer 0 : default [QWERTY] = LAYOUT_ergodox( // layer 0 : default
// left hand // left hand
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRAVE,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, BL_ON, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINUS,
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), MO(SHORTCUTS),
KC_LALT, TG(DVORAK), TG(SYMB), TG(DVORAK),
KC_HOME, KC_HOME,
LT(HALFQWERTY, KC_SPACE),KC_BSPC,KC_END, LT(HALFQWERTY, KC_SPACE),KC_DEL,KC_END,
// right hand // right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLASH,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT, KC_EQL,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
TG(DVORAK), KC_RALT, TG(PLVR), TG(HALFSYMB),
KC_PGUP, KC_PGUP,
KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT) KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT)
), ),
/* Keymap 1: mirrored qwerty /* Keymap 1: mirrored qwerty
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC | * | BSPC | 0 | 9 | 8 | 7 | 6 | \ | | ` | 5 | 4 | 3 | 2 | 1 | ESC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | \ | P | O | I | U | Y | L1 | | L1 | T | R | E | W | Q | TAB | * | ' | P | O | I | U | Y | ] | | [ | T | R | E | W | Q | TAB |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ENTER | ; | L | K | J | H |------| |------| G | F | D | S | A | BSPC | * | ENTER | ; | L | K | J | H |------| |------| G | F | D | S | A | BSPC |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------|
* | LShift | / | . | , | M | N | | | | B | V | C | X | Z | RShift | * | LShift | / | . | , | M | N | | | | B | V | C | X | Z | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt | * | | | | | |
* ,------|------|------| |------+--------+------. * ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | | * | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter | * | Space|DELETE|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror| * |mirror| | End | | PgDn | |mirror|
* `--------------------' `----------------------' * `--------------------' `----------------------'
*/ */
// If it accepts an argument (i.e, is a function), it doesn't need KC_. // If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_* // Otherwise, it needs KC_*
[HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default [HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default
// left hand // left hand
KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_LEFT, KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_BSLS,
KC_TAB, KC_P, KC_O, KC_I, KC_U, KC_Y, TG(SYMB), KC_BSLS, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_RBRC,
KC_BSPC, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_ENT, KC_SCLN, KC_L, KC_K, KC_J, KC_H,
KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_TRANSPARENT, KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_EQL,
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS,
KC_LALT, KC_TRANSPARENT, KC_TRNS, KC_TRANSPARENT,
KC_HOME, KC_HOME,
KC_TRANSPARENT,KC_BSPC,KC_END, KC_TRANSPARENT,KC_DEL,KC_END,
// right hand // right hand
KC_RGHT, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC, KC_GRAVE, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC,
TG(SYMB), KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS, KC_LBRC, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS,
KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT, KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT,
MEH_T(KC_NO),KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, KC_MINUS,KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_TRANSPARENT, KC_RALT, KC_TRANSPARENT, KC_TRNS,
KC_PGUP, KC_PGUP,
KC_PGDN,KC_TAB, KC_TRANSPARENT KC_PGDN,KC_TAB, KC_TRANSPARENT
), ),
/* Keymap 3: dvorak /* Keymap 3: dvorak
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC | * | ESC | 1 | 2 | 3 | 4 | 5 | ` | | \ | 6 | 7 | 8 | 9 | 0 | BSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | * | TAB | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | / |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | O | E | U | I |------| |------| D | H | T | S | - |ENTER | * | BkSp | A | O | E | U | I |------| |------| D | H | T | N | S |ENTER |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt | * | Alt | | | |Alt |
* ,------|------|------| |------+--------+------. * ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | | * | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter | * | Space|DELETE|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror| * |mirror| | End | | PgDn | |mirror|
* `--------------------' `----------------------' * `--------------------' `----------------------'
*/ */
// If it accepts an argument (i.e, is a function), it doesn't need KC_. // If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_* // Otherwise, it needs KC_*
[DVORAK] = LAYOUT_ergodox( // layer 0 : default [DVORAK] = LAYOUT_ergodox( // layer 0 : default
// left hand // left hand
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRAVE,
KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, TG(SYMB), KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_LBRC,
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_MINUS,
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS,
KC_LALT, KC_TRANSPARENT, TG(SYMB), KC_TRANSPARENT,
KC_HOME, KC_HOME,
LT(HALFDVORAK, KC_SPACE),KC_BSPC,KC_END, LT(HALFDVORAK, KC_SPACE),KC_DEL,KC_END,
// right hand // right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
TG(SYMB), KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH,
KC_D, KC_H, KC_T, KC_S, KC_MINUS, KC_ENT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT,
MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_EQL,KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_TRANSPARENT, KC_RALT, KC_TRANSPARENT, TG(HALFSYMB),
KC_PGUP, KC_PGUP,
KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT) KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT)
), ),
/* Keymap 3: mirrored dvorak /* Keymap 3: mirrored dvorak
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | BSPC | 0 | 9 | 8 | 7 | 6 | LEFT | | RIGHT| 5 | 4 | 3 | 2 | 1 | ESC | * | BSPC | 0 | 9 | 8 | 7 | 6 | \ | | ` | 5 | 4 | 3 | 2 | 1 | ESC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | L | R | C | G | F | L1 | | L1 | Y | P | . | , | ' | / | * | / | L | R | C | G | F | L1 | | L1 | Y | P | . | , | ' | TAB |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | - | S | T | H | D |------| |------| I | U | E | O | A |ENTER | * | ENTER | S | N | T | H | D |------| |------| I | U | E | O | A |BSPC |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * |--------+------+------+------+------+------| = | | - |------+------+------+------+------+--------|
* | LShift | Z | V | W | M | B | | | | X | K | J | Q | ; | RShift | * | LShift | Z | V | W | M | B | | | | X | K | J | Q | ; | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTL-TAB|CTLShTab| LGui| | RGui| UP | DOWN | ALT | RCTRL | * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Alt | LGui | | RGui |Alt | * | Alt | | | |Alt |
* ,------|------|------| |------+--------+------. * ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | | * | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter | * | Space|DELETE|------| |------| Tab |Enter |
* |mirror|ace | End | | PgDn | |mirror| * |mirror| | End | | PgDn | |mirror|
* `--------------------' `----------------------' * `--------------------' `----------------------'
*/ */
// If it accepts an argument (i.e, is a function), it doesn't need KC_. // If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_* // Otherwise, it needs KC_*
[HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default [HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default
// left hand // left hand
KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_BSLS,
KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, TG(SYMB), KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, KC_RBRC,
KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D, KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D,
KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, ALL_T(KC_NO), KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, KC_EQL,
KC_LCTRL, KC_LALT, LCTL(KC_TAB), LCTL(LSFT(KC_TAB)), KC_LGUI, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS,
KC_LALT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,
KC_HOME, KC_HOME,
KC_TRANSPARENT,KC_BSPC,KC_END, KC_TRANSPARENT,KC_DEL,KC_END,
// right hand // right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, KC_GRAVE, KC_5, KC_4, KC_3, KC_2, KC_5, KC_ESC,
TG(SYMB), KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB, KC_LBRC, KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB,
KC_I, KC_U, KC_E, KC_O, KC_A, KC_ENT, KC_I, KC_U, KC_E, KC_O, KC_A, KC_BSPC,
MEH_T(KC_NO),KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT, KC_MINUS,KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_TRANSPARENT, KC_RALT, KC_TRANSPARENT, KC_TRNS,
KC_PGUP, KC_PGUP,
KC_PGDN,KC_TAB, KC_TRANSPARENT KC_PGDN,KC_TAB, KC_TRANSPARENT
), ),
/* Keymap 5: Symbol Layer /* Keymap 5: Symbol Layer
* *
* ,---------------------------------------------------. ,--------------------------------------------------. * ,---------------------------------------------------. ,--------------------------------------------------.
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |Version | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |BkSp |
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | * | | / | \ | { | } | | | | | | Up | 7 | 8 | 9 | * | / |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | * | | ' | ; | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | - | ENTER |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * | | - | = | [ | ] | ~ | | | | & | 1 | 2 | 3 | + | |
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | EPRM | | | | | | | . | 0 | = | | * | EPRM | | | | | | | . | 0 | = | |
* `-----------------------------------' `----------------------------------' * `-----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* |Animat| | |Toggle|Solid | * | | | | | |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* |Bright|Bright| | | |Hue- |Hue+ |
* |ness- |ness+ |------| |------| | |
* | | | | | | | | * | | | | | | | |
* |mirror| |------| |------| |mirror|
* |space | | | | | |enter |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
// SYMBOLS // SYMBOLS
[SYMB] = LAYOUT_ergodox( [SYMB] = LAYOUT_ergodox(
// left hand // left hand
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, KC_NO,KC_SLASH,KC_BSLS, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_NO,KC_QUOT,KC_SCLN, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_NO,KC_MINUS,KC_EQL,KC_LBRC,KC_RBRC,KC_TILD,KC_NO,
EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, EPRM,KC_NO,KC_NO,KC_NO,KC_TRNS,
RGB_MOD,KC_TRNS, KC_TRNS,KC_NO,
KC_TRNS, KC_NO,
RGB_VAD,RGB_VAI,KC_TRNS, LT(HALFSYMB, KC_SPACE),KC_NO,KC_NO,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC,
KC_NO, KC_UP, KC_KP_7, KC_KP_8, KC_KP_9,KC_KP_ASTERISK, KC_KP_SLASH,
KC_DOWN, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_ENTER,
KC_NO,KC_AMPR,KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_NO,
KC_NO,KC_DOT, KC_0, KC_KP_EQUAL, KC_NO,
KC_NO, KC_TRNS,
KC_NO,
KC_NO, KC_NO, LT(HALFSYMB, KC_ENT)
),
/* Keymap 6: Mirrored Symbol Layer
*
* ,---------------------------------------------------. ,--------------------------------------------------.
* |delete | F12 | F11 | F10 | F9 | F8 | F7 | | F6 | F5 | F4 | F3 | F2 | F1 |BkSp |
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | | 7 | 8 | 9 | * | / | | | | | { | } | / | \ | |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | 4 | 5 | 6 | - |------| |------| ` | ( | ) | ; | ' | |
* |---------+------+------+------+------+------|enter | | |------+------+------+------+------+--------|
* | | | 1 | 2 | 3 | + | | | | ~ | [ | ] | = | - | |
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | EPRM | | 0 | . | = | | | | | | |
* `-----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[HALFSYMB] = LAYOUT_ergodox(
// left hand
KC_BSPC, KC_F12, KC_F11, KC_F10, KC_F9, KC_F8, KC_F7,
KC_NO,KC_NO,KC_KP_7, KC_KP_8, KC_KP_9,KC_KP_ASTERISK,KC_KP_SLASH,
KC_ENTER,KC_NO,KC_KP_4, KC_KP_5, KC_KP_6,KC_KP_MINUS,
KC_NO,KC_NO,KC_KP_1, KC_KP_2, KC_KP_3,KC_KP_PLUS,KC_KP_ENTER,
EPRM,KC_NO,KC_KP_0,KC_KP_DOT,KC_KP_EQUAL,
KC_TRNS,KC_NO,
KC_NO,
KC_TRANSPARENT,KC_NO,KC_NO,
// right hand // right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F6, KC_F5, KC_F4, KC_F3, KC_F2, KC_F1, KC_BSPC,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, KC_NO,KC_PIPE,KC_LCBR,KC_RCBR, KC_SLASH, KC_BSLS, KC_NO,
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, KC_GRV,KC_LPRN,KC_RPRN, KC_SCLN, KC_QUOT, KC_NO,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, KC_NO, KC_TILD,KC_LBRC,KC_RBRC, KC_EQL, KC_MINUS, KC_NO,
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO,
RGB_TOG, RGB_SLD, KC_NO, KC_TRNS,
KC_TRNS, KC_NO,
KC_TRNS, RGB_HUD, RGB_HUI KC_NO, KC_NO, KC_TRANSPARENT
), ),
/* Keymap 6: Media and mouse keys
/* Keymap 7: Steno for Plover from https://github.com/shayneholmes/tmk_keyboard/commit/11290f8489013018f778627db725160c745e75bd
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | | * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | * | | q | w | e | r | t |------| |------| y | u | i | o | p | [ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | | * | | a | s | d | f | g | | | | h | j | k | l | ; | ' |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * | | | | | | | | | | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | | | | | | * | | | | | |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | | | | |Brwser| * | | | | | | | |
* | | |------| |------| |Back | * | c | v |------| |------| n | m |
* | | | | | | | | * | | | | | | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
// MEDIA AND MOUSE
[MDIA] = LAYOUT_ergodox( [PLVR] = LAYOUT_ergodox( // layout: layer 4: Steno for Plover
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // left hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_FN4, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO,
// right hand KC_C, KC_V, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK KC_TRNS,
KC_NO, KC_N, KC_M
), ),
/* Keymap 8: shortcuts
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER |
* |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCTRL|ALT |CTLShTab|CTL-TAB| | | RGui| UP | DOWN | ALT | RCTRL |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Alt |Dvorak| |Plover|Alt |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|DELETE|------| |------| Tab |Enter |
* |mirror| | End | | PgDn | |mirror|
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[SHORTCUTS] = LAYOUT_ergodox( // layer 0 : default
// left hand
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO,
KC_TAB, LCTL(KC_Q), LCTL(KC_W),LCTL(KC_E),LCTL(KC_R),LCTL(KC_T), KC_NO,
KC_BSPC, LCTL(KC_A), LCTL(KC_S),LCTL(KC_D),LCTL(KC_F),LCTL(KC_G),
KC_LSFT, LCTL(KC_Z), LCTL(KC_X),LCTL(KC_C),LCTL(KC_V),LCTL(KC_B), KC_MINUS,
KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRANSPARENT,
KC_NO, KC_NO,
KC_NO,
KC_NO,KC_NO,KC_NO,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_EQL,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT,
KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL,
KC_NO, KC_NO,
KC_NO,
KC_NO,KC_NO, KC_NO
),
}; };
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {

@ -0,0 +1,72 @@
/*
Copyright 2017 Fred Sundvik
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 <http://www.gnu.org/licenses/>.
*/
#include "simple_visualizer.h"
#define RED 0
#define ORANGE 21
#define YELLOW 42
#define SPRING_GREEN 64
#define GREEN 85
#define TURQUOISE 107
#define CYAN 127
#define OCEAN 149
#define BLUE 170
#define VIOLET 192
#define MAGENTA 212
#define RASPBERRY 234
// This function should be implemented by the keymap visualizer
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
// that the simple_visualizer assumes that you are updating
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
// stopped. This can be done by either double buffering it or by using constant strings
static void get_visualizer_layer_and_color(visualizer_state_t* state) {
uint8_t saturation = 255;
/* if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
saturation = 255;
} */
if (state->status.layer & 0x100) {
state->target_lcd_color = LCD_COLOR(MAGENTA, saturation, 0xFF);
state->layer_text = "Shortcuts Layer";
}
else if (state->status.layer & 0x80) {
state->target_lcd_color = LCD_COLOR(VIOLET, saturation, 0xFF);
state->layer_text = "Plover";
}
else if (state->status.layer & 0x40) {
state->target_lcd_color = LCD_COLOR(RASPBERRY, saturation, 0xFF);
state->layer_text = "Mirrored Symbols";
}
else if (state->status.layer & 0x20) {
state->target_lcd_color = LCD_COLOR(RED, saturation, 0xFF);
state->layer_text = "Symbols";
}
else if (state->status.layer & 0x8) {
state->target_lcd_color = LCD_COLOR(OCEAN, saturation, 0xFF);
state->layer_text = "Mirrored Dvorak";
}
else if (state->status.layer & 0x4) {
state->target_lcd_color = LCD_COLOR(BLUE, saturation, 0xFF);
state->layer_text = "Dvorak";
}
else if (state->status.layer & 0x2) {
state->target_lcd_color = LCD_COLOR(ORANGE, saturation, 0xFF);
state->layer_text = "Mirrored Qwerty";
}
else {
state->target_lcd_color = LCD_COLOR(YELLOW, saturation, 0xFF);
state->layer_text = "Qwerty";
}
}
Loading…
Cancel
Save