diff options
18 files changed, 6954 insertions, 3057 deletions
diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 3f066aebcd..1d91c34b7f 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -142,7 +142,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE = yes # 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) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index c6642919b8..28aa2c3592 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -14,8 +14,9 @@ #define LAYER_LOWER 3 #define LAYER_RAISE 4 #define LAYER_FUNCTION 5 -#define LAYER_MUSIC 6 -#define LAYER_ADJUST 7 +#define LAYER_MOUSE 6 +#define LAYER_MUSIC 7 +#define LAYER_ADJUST 8 #define MACRO_QWERTY 0 #define MACRO_COLEMAK 1 @@ -23,19 +24,20 @@ #define MACRO_LOWER 3 #define MACRO_RAISE 4 #define MACRO_FUNCTION 5 -#define MACRO_TIMBRE_1 6 -#define MACRO_TIMBRE_2 7 -#define MACRO_TIMBRE_3 8 -#define MACRO_TIMBRE_4 9 -#define MACRO_TEMPO_U 10 -#define MACRO_TEMPO_D 11 -#define MACRO_TONE_DEFAULT 12 -#define MACRO_MUSIC_ON 13 -#define MACRO_MUSIC_OFF 14 -#define MACRO_AUDIO_ON 15 -#define MACRO_AUDIO_OFF 16 -#define MACRO_INC_VOICE 17 -#define MACRO_DEC_VOICE 18 +#define MACRO_MOUSE 6 +#define MACRO_TIMBRE_1 7 +#define MACRO_TIMBRE_2 8 +#define MACRO_TIMBRE_3 9 +#define MACRO_TIMBRE_4 10 +#define MACRO_TEMPO_U 11 +#define MACRO_TEMPO_D 12 +#define MACRO_TONE_DEFAULT 13 +#define MACRO_MUSIC_ON 14 +#define MACRO_MUSIC_OFF 15 +#define MACRO_AUDIO_ON 16 +#define MACRO_AUDIO_OFF 17 +#define MACRO_INC_VOICE 18 +#define MACRO_DEC_VOICE 19 #define M_QWRTY M(MACRO_QWERTY) #define M_COLMK M(MACRO_COLEMAK) @@ -43,6 +45,7 @@ #define M_LOWER M(MACRO_LOWER) #define M_RAISE M(MACRO_RAISE) #define M_FUNCT M(MACRO_FUNCTION) +#define M_MOUSE M(MACRO_MOUSE) #define TIMBR_1 M(MACRO_TIMBRE_1) #define TIMBR_2 M(MACRO_TIMBRE_2) #define TIMBR_3 M(MACRO_TIMBRE_3) @@ -73,8 +76,11 @@ #define _______ KC_TRNS -#define ___T___ KC_TRNS #define XXXXXXX KC_NO +#define ________________ _______, _______ +#define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. @@ -90,13 +96,12 @@ * '--------------------------------------------------------------------------------------------------------------------------------------' */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [LAYER_QWERTY] = { /* QWERTY */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX }, + [LAYER_QWERTY] = { /* QWERTY */ + { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, XXXXXXX, M_LOWER, KC_RALT, KC_HOME, KC_END, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, + { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, + { 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_RSFT, KC_UP, KC_PGDN }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_RALT, KC_LGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, }, /* COLEMAK @@ -105,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAPS | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | + * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| @@ -113,12 +118,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_COLEMAK] = { /* COLEMAK */ + [LAYER_COLEMAK] = { /* COLEMAK */ { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, + { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, XXXXXXX, M_LOWER, KC_RALT, KC_HOME, KC_END, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_RALT, KC_LGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, }, /* DVORAK @@ -135,40 +140,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_DVORAK] = { /* DVORAK */ + [LAYER_DVORAK] = { /* DVORAK */ { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC }, { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL }, { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP }, { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, XXXXXXX, M_LOWER, KC_RALT, KC_HOME, KC_END, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_RALT, KC_LGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, }, - [LAYER_LOWER] = { /* LOWERED */ - { KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + [LAYER_LOWER] = { /* LOWERED */ + { KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, { _______, _______, _______, _______, SC_CCLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, SC_REDO, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_HOME }, + { _______, SC_REDO, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, KC_END }, { _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______, _______, _______, _______ }, }, - [LAYER_RAISE] = { /* RAISED */ - { KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + [LAYER_RAISE] = { /* RAISED */ + { KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, { _______, _______, _______, _______, SC_ACLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS }, - { _______, SC_SELA, SC_SAVE, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, SC_UNDO, SC_CUT, SC_COPY, SC_PSTE, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, SC_SELA, SC_SAVE, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_HOME }, + { _______, SC_UNDO, SC_CUT, SC_COPY, SC_PSTE, _______, _______, _______, _______, _______, _______, ________________, _______, KC_END }, + { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + + [LAYER_FUNCTION] = { /* FUNCTION */ + { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, + { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_PAUS }, + { KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_PSCR }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_VOLU, KC_MUTE }, + { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }, }, - [LAYER_FUNCTION] = { /* FUNCTION */ - { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, +#ifdef MOUSEKEY_ENABLE + + [LAYER_MOUSE] = { /* MOUSE */ + { _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U }, + { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D }, { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, }, - [LAYER_MUSIC] = { +#endif + + [LAYER_MUSIC] = { /* MUSIC */ { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, @@ -176,13 +193,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_RAISE, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, }, - [LAYER_ADJUST] = { /* ADJUST */ - { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, MUS_ON, MUS_OFF, AUD_ON, AUD_OFF, ___T___, ___T___ }, + [LAYER_ADJUST] = { /* ADJUST */ + { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, MUS_ON, MUS_OFF, AUD_ON, AUD_OFF, ________________ }, { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, ___T___, ___T___, VC_UP, _______ }, - { _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______, _______, _______, _______, _______, VC_DOWN, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, + { _______, _______, _______, _______, _______, RESET, _______, M_MOUSE, _______, _______, _______, ________________, VC_UP, _______ }, + { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, VC_DOWN, _______ }, }, + + +/* + [LAYER_EMPTY] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ }, + { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, +*/ + }; #ifdef AUDIO_ENABLE @@ -206,36 +235,6 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); #endif /* AUDIO_ENABLE */ -/* -void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t layer4, bool order) -{ - if (order) - { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) - { - layer_on(layer3); - } - else - { - layer_off(layer3); - layer_off(layer4); - } - } - else - { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) - { - layer_on(layer4); - } - else - { - layer_off(layer3); - layer_off(layer4); - } - } -} -*/ - void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); @@ -314,6 +313,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; +#ifdef MOUSEKEY_ENABLE + + case MACRO_MOUSE: + if (record->event.pressed) + { + layer_invert(LAYER_MOUSE); + } + break; + +#endif /* MOUSEKEY_ENABLE */ + + case MACRO_TIMBRE_1: if (record->event.pressed) set_timbre(TIMBRE_12); break; @@ -389,8 +400,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE - voice_iterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); + voice_iterate(); + PLAY_NOTE_ARRAY(music_scale, false, STACCATO); #endif } break; @@ -399,8 +410,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE - voice_deiterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); + voice_deiterate(); + PLAY_NOTE_ARRAY(music_scale, false, STACCATO); #endif } break; @@ -419,8 +430,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void process_action_user(keyrecord_t *record) { - uint8_t starting_note = 0x0C; - int offset = 7; + uint8_t starting_note = 0x0C; + int offset = 7; if (IS_LAYER_ON(LAYER_MUSIC)) { @@ -485,7 +496,7 @@ void led_set_user(uint8_t usb_led) void play_startup_tone() { - _delay_ms(10); // gets rid of tick + _delay_ms(10); // gets rid of tick PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO); } @@ -495,4 +506,4 @@ void play_goodbye_tone() _delay_ms(1000); } -#endif /* AUDIO_ENABLE */ +#endif /* AUDIO_ENABLE */
\ No newline at end of file diff --git a/keyboard/ergodox_ez/keymaps/twey/keymap.c b/keyboard/ergodox_ez/keymaps/twey/keymap.c new file mode 100644 index 0000000000..75d264bdbe --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/twey/keymap.c @@ -0,0 +1,225 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_plover.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define STEN 3 // steno + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,---------------------------------------------------. ,---------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | STEN | | NONE | 6 | 7 | 8 | 9 | 0 | \ | + * |--------+------+------+------+-------+-------------| |-------+------+------+------+------+------+--------| + * | Del | ' | , | . | P | Y | Esc | | Caps | F | G | C | R | L | / | + * |--------+------+------+------+-------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | O | E | U | I |------| |-------| D | H | T | N |S / L2|- / Cmd | + * |--------+------+------+------+-------+------| Tab | | Enter |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+-------+-------------' `--------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right | | Up | Down | [ | ] | ~L1 | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | PgUp | PgDn | | Home | End | + * ,------|------|------| |-------+-------+------. + * | | | NONE | | NONE | | | + * | Alt | NONE |------| |-------| Space | Ctrl | + * | | | Supr | | AltGr | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(0), + KC_DELT, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + KC_PGUP,KC_PGDN, + KC_NO, + KC_LALT,KC_ENT ,KC_LGUI, + // right hand + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_CAPS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), GUI_T(KC_MINS), + KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z , KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_HOME,KC_END, + KC_NO, + KC_RALT,KC_SPC,KC_RCTL + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), + +[STEN] = KEYMAP( // layout: layer 4: Steno for Plover + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR, + KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, + KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, + KC_NO, KC_NO, + KC_NO, + PV_A, PV_O, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + PV_STAR, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, + PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, + PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, PV_E, PV_U +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +void toggle_steno(int pressed) +{ + uint8_t layer = biton32(layer_state); + + if (pressed) { + if (layer != STEN) layer_on(STEN); else layer_off(STEN); + + register_code(PV_LS); + register_code(PV_LH); + register_code(PV_RF); + register_code(PV_RT); + } else { + unregister_code(PV_LS); + unregister_code(PV_LH); + unregister_code(PV_RF); + unregister_code(PV_RT); + } +} + +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: + toggle_steno(record->event.pressed); + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboard/ergodox_ez/keymaps/twey/readme.md b/keyboard/ergodox_ez/keymaps/twey/readme.md new file mode 100644 index 0000000000..d44c0a2382 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/twey/readme.md @@ -0,0 +1,19 @@ +# Twey's Home Configuration +## Layers +- Layer 0: Non-ANSI Dvorak layout, with modified modifiers — all + modifiers on thumb keys, as well as return and space. +- Layer 1: Default symbol layout. +- Layer 2: Default media/mouse layout. +- Layer 3: Plover-oriented stenography layer. + +## Unusual features +The Plover key (top right key on the left half) also sends my Plover +‘toggle’ chord (SH-FT) when pressed, as well as toggling the steno +layer, so you can toggle between steno and typing modes with a single +keypress. + +If you want to use this feature, you'll need to add: + + "SH-FT": "{PLOVER:TOGGLE}" + +to your Plover dictionary. diff --git a/keyboard/ergodox_ez/keymaps/twey/twey.hex b/keyboard/ergodox_ez/keymaps/twey/twey.hex new file mode 100644 index 0000000000..14f5b7c798 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/twey/twey.hex @@ -0,0 +1,1122 @@ +:100000000C9465020C94A9020C94A9020C94A90208
+:100010000C94A9020C94A9020C94A9020C94A902B4
+:100020000C94A9020C94A9020C94C50B0C94970C87
+:100030000C94A9020C94A9020C94A9020C94A90294
+:100040000C94A9020C9422210C94A9020C94A902EC
+:100050000C94A9020C94C41A0C94A9020C94A90241
+:100060000C94A9020C94A9020C94A9020C94A90264
+:100070000C94A9020C94A9020C94A9020C94A90254
+:100080000C94A9020C94A9020C94A9020C94A90244
+:100090000C94A9020C94A9020C94A9020C94A90234
+:1000A0000C94A9020C94A9020C94A902FC0C1E0D3C
+:1000B000090E1E0D090E600D830D090ED80DEB0DF6
+:1000C000D810D81006110611481184118413841316
+:1000D0009C118413931293125E138413841372136E
+:1000E0000000F0A12E004C002A00E1003581000044
+:1000F0001E00140004001D7134004D001F001A0082
+:1001000016001B00E1042A0020000800070006007A
+:1001100050002C0021001500090019004F004A0072
+:10012000220017000A000500000065745000015409
+:100130000000007F0000E3004F0001540000007742
+:100140000000E20023001C000B00110000002971D8
+:10015000240018000D00100052004B0025000C0078
+:100160000E00360051002800260012000F00370054
+:100170002F002B00270013003382387130004E000F
+:100180002D0031003478E500C100000001000100BD
+:1001900001000100010000003A001E0220022202BC
+:1001A000010001003B001F022102230201000100A7
+:1001B0003C002F0226022F00010001003D0030020A
+:1001C00027023000010001003E00310235003502F7
+:1001D000000001000100010000000100000001001A
+:1001E0000100010000000100000001003F0052007A
+:1001F00051002402000001004000240021001E00E4
+:10020000010001004100250022001F00370001000D
+:1002100042002600230020002700010043002502A1
+:100220002E0231002E0001004400450001000100B3
+:1002300001000000010001000100010001000000B8
+:1002400001000100010001000100010001000100A6
+:10025000F2000100010001000100F000F1000100C6
+:10026000F400010001000100F3000100F5000100AD
+:100270000100010001000100000001000100010077
+:100280000000010000000100010001000000010069
+:100290000000010001000100010001000000010058
+:1002A0000100010001000100A9000100010001009E
+:1002B0000100AC00AA00B600010001000100AB0083
+:1002C000A80001000100010001000100010001007F
+:1002D00001000100AE00010001000000160345000E
+:1002E000720067006F0044006F0078002000450036
+:1002F0005A00000016034500720067006F004400BA
+:100300006F007800200045005A0000000403090433
+:1003100009026D00040100A0FA09040000010301B4
+:100320000100092111010001223F00070581030896
+:10033000000A090401000103010200092111010062
+:1003400001224D000705820308000A09040200018A
+:100350000300000009211101000122360007058376
+:100360000308000A09040300010300000009211129
+:100370000100012239000705840310000112011059
+:100380000100000008EDFE07130100010200010555
+:10039000010906A101050719E029E71500250195C6
+:1003A0000875018102050819012905950575019156
+:1003B000029501750391010507190029771500259C
+:1003C00001957875018102C005010980A1018502AE
+:1003D00016010026B7001A01002AB7007510950112
+:1003E0008100C0050C0901A1018503160100269CAE
+:1003F000021A01002A9C02751095018100C00501B6
+:100400000902A1010901A100050919012905150029
+:10041000250195057501810295017503810105018D
+:10042000093009311581257F950275088106093843
+:100430001581257F950175088106050C0A3802157E
+:1004400081257F950175088106C0C005010906A1B7
+:1004500001050719E029E7150025019508750181B7
+:100460000295017508810105081901290595057591
+:100470000191029501750391010507190029FF15E6
+:100480000025FF950675088100C0000000000000EF
+:100490000000000000010204060A0F17202C3A4A4F
+:1004A0005D71879DB3C7DAE9F5FCFFFCF5E9DAC7B2
+:1004B000B39D87715D4A3A2C20170F0A060402018A
+:1004C0000000000000000000000011241FBECFEF5C
+:1004D000DAE0DEBFCDBF04B603FE24C08091EE019A
+:1004E0009091EF01A091F001B091F1018730904B14
+:1004F000A740B04BB9F41092EE011092EF011092A8
+:10050000F0011092F10114BE84B7877F84BF88E1A7
+:100510000FB6F89480936000109260000FBEE0E088
+:10052000FFE3099511E0A0E0B1E0E8ECF5E402C0DA
+:1005300005900D92A433B107D9F711E0A4E3B1E01F
+:1005400001C01D92AE3EB107E1F70E940B090C9469
+:10055000E2220C94000061110BC0FC01828188230F
|