From eeb100f87d96680302024e816ad7460a6d9bf281 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Thu, 21 Jul 2016 18:19:08 -0400 Subject: First draft of the 'impossible' layout. --- keyboards/planck/keymaps/impossible/Makefile | 25 ++ keyboards/planck/keymaps/impossible/keymap.c | 332 ++++++++++++++++++++++++++ keyboards/planck/keymaps/impossible/readme.md | 2 + 3 files changed, 359 insertions(+) create mode 100644 keyboards/planck/keymaps/impossible/Makefile create mode 100644 keyboards/planck/keymaps/impossible/keymap.c create mode 100644 keyboards/planck/keymaps/impossible/readme.md diff --git a/keyboards/planck/keymaps/impossible/Makefile b/keyboards/planck/keymaps/impossible/Makefile new file mode 100644 index 000000000..581e08cd0 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/Makefile @@ -0,0 +1,25 @@ + + +# 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 + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c new file mode 100644 index 000000000..2489fc270 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -0,0 +1,332 @@ +// 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 +#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 _ALPHA 0 +#define _FN 1 +#define _QWERTY 3 +#define _COLEMAK 4 +#define _DVORAK 5 +#define _LOWER 6 +#define _RAISE 7 +#define _PLOVER 8 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + 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] = { + +[_ALPHA] = { + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, GUI_T(KC_ENTER), KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), KC_SLASH, KC_COMM, SFT_T(KC_BSPC), LT(_FN, KC_ESC), CTL_T(KC_SPC), KC_DOT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_KP_0} +}, + +[_FN] = { + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, KC_ENTER, _______, KC_FN1, KC_FN2, KC_FN3}, + {_______, KC_BSLASH, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_FN10} +}, + +/* 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 | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| 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, KC_ENT }, + {BACKLIT, 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 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_NUHS, KC_NUBS, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* 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} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#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 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 diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + -- cgit v1.2.3-24-g4f1b From a39eaa7fb573026851fff35f379e8ed75df241c0 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Fri, 22 Jul 2016 17:46:23 -0400 Subject: Switched to natural arrows, put ENTER on middle Fn, swapped Shift and CTRL. --- keyboards/planck/keymaps/impossible/keymap.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 2489fc270..037282ee2 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -42,19 +42,32 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Alpha-numeric + ,-----------------------------------------------------------------------------------------------. + | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | + |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | + `-----------------------------------------------------------------------------------------------' +*/ + [_ALPHA] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, GUI_T(KC_ENTER), KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), KC_SLASH, KC_COMM, SFT_T(KC_BSPC), LT(_FN, KC_ESC), CTL_T(KC_SPC), KC_DOT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_KP_0} + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, + KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, [_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, KC_ENTER, _______, KC_FN1, KC_FN2, KC_FN3}, - {_______, KC_BSLASH, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_FN10} + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, + {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} }, /* Qwerty @@ -67,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| 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}, -- cgit v1.2.3-24-g4f1b From 723857bf8a59a4d9a779bfb1a0acd049bb4702d0 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Fri, 22 Jul 2016 18:17:34 -0400 Subject: Table for Fn layer. --- keyboards/planck/keymaps/impossible/keymap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 037282ee2..6c22423ff 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -63,6 +63,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, +/* Symbols (FN Held) + ,-----------------------------------------------------------------------------------------------. + | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | + `-----------------------------------------------------------------------------------------------' +*/ + [_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, -- cgit v1.2.3-24-g4f1b From fb2a7d787a6818ea9aefcff5ce36bac3fc48fa6c Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 17:29:19 -0400 Subject: Removed unused layers (left QWERTY for later use/reference) --- keyboards/planck/keymaps/impossible/keymap.c | 50 ++-------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 6c22423ff..ddf4e2feb 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -17,18 +17,12 @@ extern keymap_config_t keymap_config; #define _ALPHA 0 #define _FN 1 -#define _QWERTY 3 -#define _COLEMAK 4 -#define _DVORAK 5 -#define _LOWER 6 -#define _RAISE 7 -#define _PLOVER 8 -#define _ADJUST 16 +#define _QWERTY 2 +#define _PLOVER 3 +#define _ADJUST 4 enum planck_keycodes { QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, PLOVER, LOWER, RAISE, @@ -242,44 +236,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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); -- cgit v1.2.3-24-g4f1b From 465cf08c6398da60ef8029aa2d813ed023fbc253 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 17:37:56 -0400 Subject: Removed unused layers (keeping QWERTY for later/reference) --- keyboards/planck/keymaps/impossible/keymap.c | 81 ++-------------------------- 1 file changed, 4 insertions(+), 77 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index ddf4e2feb..468677620 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | `-----------------------------------------------------------------------------------------------' */ - + [_ALPHA] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, -/* Symbols (FN Held) +/* FN-key held ,-----------------------------------------------------------------------------------------------. | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| 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}, @@ -94,78 +94,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {BACKLIT, 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 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_NUHS, KC_NUBS, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. * | # | # | # | # | # | # | # | # | # | # | # | # | @@ -209,9 +137,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #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); -- cgit v1.2.3-24-g4f1b From ff8136b8837615e342ee475a0968168a08a81ca9 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 17:39:21 -0400 Subject: Modified Plover layer for Impossible's home position. --- keyboards/planck/keymaps/impossible/keymap.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 468677620..8f85e0fb4 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -96,21 +96,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. - * | # | # | # | # | # | # | # | # | # | # | # | # | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | S | T | P | H | * | * | F | P | L | T | D | + * | S | T | P | H | * | F | P | L | T | D | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * | S | K | W | R | * | R | B | G | S | Z | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Exit | | | A | O | | E | U | | | | + * | # | # | # | # | | # | # | # | # | # | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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} + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, XXXXXXX, XXXXXXX}, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX, XXXXXXX}, + {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, + {EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, /* Adjust (Lower + Raise) @@ -124,6 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ + [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, -- cgit v1.2.3-24-g4f1b From 57952949fe2fa119e986e96363565248a9461eb2 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 23:33:21 -0400 Subject: General table cleanup. --- keyboards/planck/keymaps/impossible/keymap.c | 97 ++++++++++++++-------------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 8f85e0fb4..2a9197aec 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -38,16 +38,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Alpha-numeric - ,-----------------------------------------------------------------------------------------------. - | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | - |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | - `-----------------------------------------------------------------------------------------------' -*/ + * ,-----------------------------------------------------------------------------------------------. + * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | + * `-----------------------------------------------------------------------------------------------' + */ [_ALPHA] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, @@ -58,16 +58,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* FN-key held - ,-----------------------------------------------------------------------------------------------. - | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | - |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | - `-----------------------------------------------------------------------------------------------' -*/ + * ,-----------------------------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | + * `-----------------------------------------------------------------------------------------------' + */ [_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, @@ -77,16 +77,17 @@ 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 | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------------------------------------------------------------. + * | 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 | , | . | / |Enter | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Brite | Ctrl | Alt | GUI |Lower | Sp ace |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}, @@ -95,15 +96,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* Plover layer (http://opensteno.org) - * ,-----------------------------------------------------------------------------------. - * | S | T | P | H | * | F | P | L | T | D | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | S | K | W | R | * | R | B | G | S | Z | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | # | # | # | # | | # | # | # | # | # | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Exit | | A | O | | E | U | | | | | | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------------------------------------------------------------. + * | S | T | P | H | * | F | P | L | T | D | | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | S | K | W | R | * | R | B | G | S | Z | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | # | # | # | # | | # | # | # | # | # | | | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Exit | | A | O | | E | U | | | | | | + * `-----------------------------------------------------------------------------------------------' */ [_PLOVER] = { @@ -113,16 +114,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' +/* Adjust + * ,-----------------------------------------------------------------------------------------------. + * | | Reset | | | | | | | | | | Del | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | | | |Aud on |Audoff |AGnorm |AGswap |Qwerty | | |Plover | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | |Voice- |Voice+ |Mus on |Musoff |MIDIon |MIDIof | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' */ [_ADJUST] = { -- cgit v1.2.3-24-g4f1b From a4e5a4d566f79b2b1c7bb286d25f127d631230d9 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Thu, 28 Jul 2016 13:49:25 -0400 Subject: Modified Qwerty, created Qwerty with numbers --- keyboards/planck/keymaps/impossible/keymap.c | 64 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 2a9197aec..fe9c5dc28 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -20,6 +20,7 @@ extern keymap_config_t keymap_config; #define _QWERTY 2 #define _PLOVER 3 #define _ADJUST 4 +#define _QWERTY2 5 enum planck_keycodes { QWERTY = SAFE_RANGE, @@ -36,7 +37,6 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Alpha-numeric * ,-----------------------------------------------------------------------------------------------. * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | @@ -50,51 +50,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ALPHA] = { - {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, - {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, - KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, /* FN-key held * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * | DFU |Insert | PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | + * |Alt/Tab|Gui/Esc| ` |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | / | * `-----------------------------------------------------------------------------------------------' */ [_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, - {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, + {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} }, /* Qwerty * ,-----------------------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | Esc | Q | W | E | R | T | Y | U | I | O | P | / | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter | + * | Shift | Z | X | C | V | B | N | M | , | . | Up | Enter | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Brite | Ctrl | Alt | GUI |Lower | Sp ace |Raise | Left | Down | Up |Right | + * | Ctrl | Alt | GUI | | | Bksp | Space | | | Left | Down | 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, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH}, + {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_UP, KC_ENT }, + {KC_LCTL, KC_LALT, KC_LGUI, _______, _______, KC_BSPC, KC_SPC, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT} }, +/* Qwerty W/ Numbers + * ,-----------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | / | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Shift | A | S | D | F | G | H | J | K | L | ; | " | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Ctrl | Z | X | C | V | SPC | B | N | M | , | . | Enter | + * `-----------------------------------------------------------------------------------------------' + */ + +[_QWERTY2] = { + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC/3_7, KC_8, KC_9, KC_0, 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_SLSH}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT}, +1}, + /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------------------. * | S | T | P | H | * | F | P | L | T | D | | | @@ -128,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -182,8 +200,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { 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()) { -- cgit v1.2.3-24-g4f1b From 6567fa1ebeabe8fc25df91e8f75330488763b403 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Thu, 28 Jul 2016 14:56:26 -0400 Subject: Fixed Function keys (Impossible layout) --- keyboards/planck/keymaps/impossible/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index fe9c5dc28..edc2ed873 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -69,10 +69,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, - {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty -- cgit v1.2.3-24-g4f1b From c018743729ce55effcec81efa8663dbc54626d15 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Fri, 29 Jul 2016 00:08:48 -0400 Subject: Connected all layers through Adjust layer --- keyboards/planck/keymaps/impossible/keymap.c | 154 ++++++++++++--------------- 1 file changed, 69 insertions(+), 85 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index edc2ed873..4ef16aa3a 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -15,20 +15,17 @@ extern keymap_config_t keymap_config; // 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 _ALPHA 0 -#define _FN 1 +#define _WORKMAN 0 +#define _WORKMAN_FN 1 #define _QWERTY 2 -#define _PLOVER 3 -#define _ADJUST 4 -#define _QWERTY2 5 +#define _QWERTY_FN 3 +#define _PLOVER 4 +#define _ADJUST 5 enum planck_keycodes { - QWERTY = SAFE_RANGE, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV + WORKMAN = SAFE_RANGE, + QWERTY, + PLOVER }; // Fillers to make layering more clear @@ -37,7 +34,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Alpha-numeric +/* Workman Alpha-numeric * ,-----------------------------------------------------------------------------------------------. * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| @@ -45,73 +42,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | + * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/ / | * `-----------------------------------------------------------------------------------------------' */ -[_ALPHA] = { +[_WORKMAN] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_WORKMAN_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJUST, KC_SLASH)} }, -/* FN-key held +/* FN-key held (Workman) * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | DFU |Insert | PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * | Tab | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| ` |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | / | + * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | * `-----------------------------------------------------------------------------------------------' */ -[_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} +[_WORKMAN_FN] = { + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {KC_Tab, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty * ,-----------------------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | / | + * |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | Enter | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Shift | A | S | D | F | G | H | J | K | L | ; | " | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | N | M | , | . | Up | Enter | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Ctrl | Alt | GUI | | | Bksp | Space | | | Left | Down | Right | + * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/ / | * `-----------------------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH}, - {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_UP, KC_ENT }, - {KC_LCTL, KC_LALT, KC_LGUI, _______, _______, KC_BSPC, KC_SPC, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT} + {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_QWERTY_FN, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, }, -/* Qwerty W/ Numbers +/* FN-key held (Qwerty) * ,-----------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | / | - * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Shift | A | S | D | F | G | H | J | K | L | ; | " | + * | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Ctrl | ~ | | PgUp | | | | | Up | - | = | F12 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Shift | | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Ctrl | Z | X | C | V | SPC | B | N | M | , | . | Enter | + * |Alt/Tab| | CapsLk| ScrLk | NumLk | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | * `-----------------------------------------------------------------------------------------------' */ -[_QWERTY2] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC/3_7, KC_8, KC_9, KC_0, 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_SLSH}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT}, -1}, +[_QWERTY_FN] = { + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, + {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, + {_______, XXXXXXX, KC_CAPSLOCK, KC_SLCK, KC_NLCK, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} +}, /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------------------. @@ -121,49 +118,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | # | # | # | # | | # | # | # | # | # | | | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Exit | | A | O | | E | U | | | | | | + * | | | A | O | | E | U | | | | | Adjust| * `-----------------------------------------------------------------------------------------------' */ [_PLOVER] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, XXXXXXX, XXXXXXX}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX, XXXXXXX}, - {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, - {EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX}, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX}, + {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_ADJUST)} }, /* Adjust * ,-----------------------------------------------------------------------------------------------. - * | | Reset | | | | | | | | | | Del | + * | | | | | | | | | | | | RESET | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | | | |Aud on |Audoff |AGnorm |AGswap |Qwerty | | |Plover | | + * | | | | | | | | |Voice +| Audio |MIDIoff| | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | |Voice- |Voice+ |Mus on |Musoff |MIDIon |MIDIof | | | | | | + * | | | | | | | | |Voice -| Music |MIDI on| | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | | | | | | + * | | | | | | | | |Workman| Qwerty| Plover| Adjust| * `-----------------------------------------------------------------------------------------------' */ [_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, + {_______, _______, _______, _______, _______, _______, _______, _______, MUV_IN, AU_TOG, MI_OFF, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MU_TOG, MI_ON, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, WORKMAN, QWERTY, PLOVER, _______} } - }; #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_workman[][2] = SONG(QWERTY_SOUND); +float tone_qwerty[][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 @@ -174,49 +171,36 @@ void persistant_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case WORKMAN: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_NOTE_ARRAY(tone_workman, false, 0); #endif - persistant_default_layer_set(1UL<<_QWERTY); + persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; - case BACKLIT: + case QWERTY: if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif - } else { - unregister_code(KC_RSFT); + persistant_default_layer_set(1UL<<_QWERTY); } 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(_ADJUST); - layer_on(_PLOVER); if (!eeconfig_is_enabled()) { - eeconfig_init(); + 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); + persistant_default_layer_set(1UL<<_PLOVER); } return false; break; -- cgit v1.2.3-24-g4f1b From 5f2d3f27de2913656176516f437880ec0c296e7d Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Sat, 30 Jul 2016 00:56:43 -0400 Subject: Moved CapsLk, ScrollLk, and NumLk to Adjust layer --- keyboards/planck/keymaps/impossible/keymap.c | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 4ef16aa3a..bf5588ad5 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -57,19 +57,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Tab | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * | Tab | Insert| PrtSc | | Pause | | Menu | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | * `-----------------------------------------------------------------------------------------------' */ [_WORKMAN_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_Tab, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {XXXXXXX, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {KC_Tab, KC_INS, KC_PSCR, XXXXXXX, KC_PAUSE, XXXXXXX, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty @@ -99,15 +99,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Shift | | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Alt/Tab| | CapsLk| ScrLk | NumLk | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | + * |Alt/Tab| | | | | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | * `-----------------------------------------------------------------------------------------------' */ [_QWERTY_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, - {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, - {_______, XXXXXXX, KC_CAPSLOCK, KC_SLCK, KC_NLCK, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, + {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} }, /* Plover layer (http://opensteno.org) @@ -133,19 +133,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | | | | | | | | | | | | RESET | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | | | | | | | | |Voice +| Audio |MIDIoff| | + * | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | |Voice -| Music |MIDI on| | + * | | | | | | | | ScrLk |Voice -| Music |MIDI on| | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | |Workman| Qwerty| Plover| Adjust| + * | | | | | | | | Numlk |Workman| Qwerty| Plover| Adjust| * `-----------------------------------------------------------------------------------------------' */ [_ADJUST] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, - {_______, _______, _______, _______, _______, _______, _______, _______, MUV_IN, AU_TOG, MI_OFF, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MU_TOG, MI_ON, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, WORKMAN, QWERTY, PLOVER, _______} + {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} } }; -- cgit v1.2.3-24-g4f1b From 4b74c90cdbe820fc662eb183fa3e138f16191437 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Sun, 31 Jul 2016 22:39:25 -0400 Subject: Added quote key. --- keyboards/planck/keymaps/impossible/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index bf5588ad5..b1815e901 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -57,19 +57,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Tab | Insert| PrtSc | | Pause | | Menu | | PgUp | F1 | F2 | F3 | + * | Menu | Insert| PrtSc | = | Pause | / | | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | * `-----------------------------------------------------------------------------------------------' */ [_WORKMAN_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {XXXXXXX, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_Tab, KC_INS, KC_PSCR, XXXXXXX, KC_PAUSE, XXXXXXX, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {KC_MENU, KC_INS, KC_PSCR, KC_EQUAL, KC_PAUSE, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Ctrl | ~ | | PgUp | | | | | Up | - | = | F12 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Shift | | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | + * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * |Alt/Tab| | | | | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | * `-----------------------------------------------------------------------------------------------' -- cgit v1.2.3-24-g4f1b From 76ef37e72d0cba9c83775e82c086534e8d45a7b8 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Mon, 1 Aug 2016 18:54:25 -0400 Subject: Corrected Qwerty/Fn Mismatch. --- keyboards/planck/keymaps/impossible/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index b1815e901..65d8ac5fd 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -85,10 +85,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = { - {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_QWERTY_FN, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, + {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QWERTY_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, }, /* FN-key held (Qwerty) -- cgit v1.2.3-24-g4f1b From 0acb394ac41f56895d4287d950a79bca5437a45c Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 2 Aug 2016 22:32:27 -0400 Subject: Moved Insert, PrtSc, Pause to Adjust; Corner enter --- keyboards/planck/keymaps/impossible/keymap.c | 70 ++++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 65d8ac5fd..e816f359a 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -16,11 +16,11 @@ extern keymap_config_t keymap_config; // entirely and just use numbers. #define _WORKMAN 0 -#define _WORKMAN_FN 1 +#define _FN 1 #define _QWERTY 2 -#define _QWERTY_FN 3 +#define _QW_FN 3 #define _PLOVER 4 -#define _ADJUST 5 +#define _ADJ 5 enum planck_keycodes { WORKMAN = SAFE_RANGE, @@ -42,15 +42,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/ / | + * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ [_WORKMAN] = { - {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, - {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_WORKMAN_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJUST, KC_SLASH)} + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)} }, /* FN-key held (Workman) @@ -59,55 +59,55 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Menu | Insert| PrtSc | = | Pause | / | | | PgUp | F1 | F2 | F3 | + * | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | + * |Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ -[_WORKMAN_FN] = { +[_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_MENU, KC_INS, KC_PSCR, KC_EQUAL, KC_PAUSE, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} + {KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______} }, /* Qwerty * ,-----------------------------------------------------------------------------------------------. * |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | Enter | + * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| * | Shift | A | S | D | F | G | H | J | K | L | ; | " | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/ / | + * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ [_QWERTY] = { - {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QWERTY_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, + {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)}, }, /* FN-key held (Qwerty) * ,-----------------------------------------------------------------------------------------------. * | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Ctrl | ~ | | PgUp | | | | | Up | - | = | F12 | + * | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Alt/Tab| | | | | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | + * |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ -[_QWERTY_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, - {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} +[_QW_FN] = { + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, + {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} }, /* Plover layer (http://opensteno.org) @@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | # | # | # | # | | # | # | # | # | # | | | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | | | A | O | | E | U | | | | | Adjust| + * | | | A | O | | E | U | | | | |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ @@ -126,26 +126,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX}, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX}, {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_ADJUST)} + {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)} }, /* Adjust * ,-----------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | RESET | + * | | | | | | | | | Insert| PrtSc | Pause | RESET | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| * | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * | | | | | | | | ScrLk |Voice -| Music |MIDI on| | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | Numlk |Workman| Qwerty| Plover| Adjust| + * | | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, - {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} +[_ADJ] = { + {_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET}, + {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} } }; -- cgit v1.2.3-24-g4f1b From 3e128552d92714ff86d4378b4e3acccc62d6f132 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 18 Sep 2016 11:48:47 +0200 Subject: Update the ergodox/algernon keymap to v1.7 Overall changes =============== * The number row has been completely rearranged on both the **Base** and the **ADORE** layers. * The number/function key behavior was changed: function keys are now on the **Media**. * The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers. * The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. * A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. ADORE ===== * `Y` and `X` have been swapped again. Media/Navigation layer ====================== * The function keys are now on this layer. * Mouse keys have been removed. * Media start/stop/prev/next have been removed. * `Print screen` has been removed. * There is only one screen lock key now. Heatmap ======= * Fixed a few issues in the finger-stats calculation. * The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. * The heatmap tool will now colorize the stats by default. * The periodic stats are now printed in a more compact format. Tools ===== * Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. * Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. * A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/Makefile | 4 +- .../keymaps/algernon/images/adore-layer.png | Bin 93893 -> 97225 bytes .../ergodox/keymaps/algernon/images/base-layer.png | Bin 95204 -> 102142 bytes .../ergodox/keymaps/algernon/images/heatmap.png | Bin 137912 -> 139351 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 381 ++++++++++----------- keyboards/ergodox/keymaps/algernon/readme.md | 76 ++-- .../algernon/tools/heatmap-layout.ADORE.json | 132 ++----- .../algernon/tools/heatmap-layout.Dvorak.json | 129 ++----- .../ergodox/keymaps/algernon/tools/hid-commands | 61 ++++ .../ergodox/keymaps/algernon/tools/layer-notify | 12 + .../keymaps/algernon/tools/log-to-heatmap.py | 184 +++++++--- .../ergodox/keymaps/algernon/tools/max-focused | 5 - .../ergodox/keymaps/algernon/tools/text-to-log.py | 107 ++++++ 13 files changed, 616 insertions(+), 475 deletions(-) create mode 100755 keyboards/ergodox/keymaps/algernon/tools/hid-commands create mode 100755 keyboards/ergodox/keymaps/algernon/tools/layer-notify delete mode 100755 keyboards/ergodox/keymaps/algernon/tools/max-focused create mode 100755 keyboards/ergodox/keymaps/algernon/tools/text-to-log.py diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile index 7c2b3ad97..699add3dd 100644 --- a/keyboards/ergodox/keymaps/algernon/Makefile +++ b/keyboards/ergodox/keymaps/algernon/Makefile @@ -7,7 +7,7 @@ CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes KEYLOGGER_ENABLE ?= yes UCIS_ENABLE = yes -MOUSEKEY_ENABLE ?= yes +MOUSEKEY_ENABLE = no AUTOLOG_ENABLE ?= no @@ -25,6 +25,8 @@ OPT_DEFS += -DKEYLOGGER_ENABLE CONSOLE_ENABLE = yes endif +OPT_DEFS += -DUSER_PRINT + KEYMAP_VERSION = $(shell \ if [ -d "${KEYMAP_PATH}/.git" ]; then \ cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index 3d0a5fb20..b611fbc42 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png and b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png index 7ea57aae3..2a981a470 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/base-layer.png and b/keyboards/ergodox/keymaps/algernon/images/base-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/heatmap.png b/keyboards/ergodox/keymaps/algernon/images/heatmap.png index 356035e0a..4f55c5adf 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/heatmap.png and b/keyboards/ergodox/keymaps/algernon/images/heatmap.png differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 9f476d8a6..248a0ed30 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -8,7 +8,6 @@ #include "debug.h" #include "action_layer.h" #include "action_util.h" -#include "mousekey.h" #include "timer.h" #include "keymap_plover.h" #include "eeconfig.h" @@ -36,18 +35,6 @@ enum { A_PLVR, A_MPN, - // Function / number keys - KF_1, // 1, F1 - KF_2, // 2, F2 - KF_3, // ... - KF_4, - KF_5, - KF_6, - KF_7, - KF_8, - KF_9, - KF_10, - // Application select keys APP_SLK, // Slack APP_EMCS, // Emacs @@ -55,17 +42,6 @@ enum { APP_CHRM, // Chrome APP_MSIC, // Music - // Diagonal mouse movement - A_MUL, - A_MUR, - A_MDL, - A_MDR, - - // Mouse acceleration - A_ACL0, - A_ACL1, - A_ACL2, - // Hungarian layer keys HU_AA, // Á HU_OO, // Ó @@ -76,6 +52,18 @@ enum { HU_UE, // Ü HU_OEE, // Ő HU_UEE, // Ű + + // number/symbol keys + A_1, // 1 + A_2, // 2 + A_3, // ... + A_4, + A_5, + A_6, + A_7, + A_8, + A_9, + A_0, }; /* Fn keys */ @@ -95,7 +83,9 @@ enum { CT_CLN = 0, CT_TA, CT_LBP, - CT_RBP + CT_RBP, + CT_TMUX, + CT_TPS, }; /* States & timers */ @@ -114,6 +104,8 @@ bool log_enable = false; bool time_travel = false; +static uint8_t is_adore = 0; + /* The Keymap */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -121,13 +113,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Base Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | - * |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------| - * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | + * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| + * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' @@ -141,22 +133,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = KEYMAP( // left hand - M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I -,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN) -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) + M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 +,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) +,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I +,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX) +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) ,F(F_ALT),F(F_GUI) ,F(F_CTRL) ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS - ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP - ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) + ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS + ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL + ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP + ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL ,KC_LEAD @@ -166,15 +158,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 1: Adore layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ | + * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | | + * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| + * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | + * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. * | LAlt | GUI | | MDIA | Del | @@ -186,22 +178,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [ADORE] = KEYMAP( // left hand - KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U -,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN) -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 +,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) +,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U +,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX) +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) ,F(F_ALT),F(F_GUI) ,F(F_CTRL) ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS - ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) + ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS + ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL + ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO + ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL ,F(F_HUN) @@ -350,45 +342,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 5: Navigation & Media layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | | + * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen| - * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------| - * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | | - * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------| - * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop | + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | |------| |------| | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | | | | | | | | | | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Mute | VlUp | | BASE | MClk | + * | Mute | VlUp | | BASE | | * ,------|------|------| |------+------+------. - * | | | VlDn | | Prev |Left |Right | - * | SPC | Enter|------| |------| Click| Click| - * | | | ESC | | Next | | | + * | | | VlDn | | | | | + * | | |------| |------| | | + * | | | | | | | | * `--------------------' `--------------------' */ [NMDIA] = KEYMAP( // left hand - M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) -,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO -,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO -,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO + KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLU ,KC_VOLD - ,KC_SPC,KC_ENTER,KC_ESC + ,KC_NO ,KC_NO ,KC_TRNS // right hand - ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR - ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO - ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP + ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_TRNS ,KC_MS_BTN3 - ,KC_MPRV - ,KC_MNXT ,KC_BTN1 ,KC_BTN2 + ,KC_TRNS ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ), /* Keymap 6: Steno for Plover @@ -514,40 +506,62 @@ static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_c return MACRO_NONE; } -static bool from_appsel; +static void ang_handle_num_row(uint8_t id, keyrecord_t *record) { + uint8_t idx = id - A_1; + uint8_t kc; + static bool shifted[10]; -static void ang_handle_kf (keyrecord_t *record, uint8_t id) -{ - uint8_t code = id - KF_1; + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + if (record->event.pressed) + shifted[idx] = true; + } - if (record->event.pressed) { - kf_timers[code] = timer_read (); + if (!shifted[idx]) { + kc = idx + KC_1; } else { - uint8_t kc_base; - - if (from_appsel) { - from_appsel = false; + switch (id) { + case A_8: + case A_9: + shifted[idx] = false; return; - } - if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) { - // Long press - kc_base = KC_F1; - } else { - kc_base = KC_1; + case A_7: + kc = KC_2; + break; + case A_5: + kc = KC_8; + break; + case A_3: + kc = KC_6; + break; + case A_1: + kc = KC_4; + break; + + case A_0: + kc = KC_5; + break; + case A_2: + kc = KC_1; + break; + case A_4: + kc = KC_3; + break; + case A_6: + kc = KC_7; + break; } - kf_timers[code] = 0; - code += kc_base; + } - register_code (code); - unregister_code (code); + if (record->event.pressed) { + register_code (kc); + } else { + unregister_code (kc); + shifted[idx] = false; } } -static struct { - uint8_t idx; -} m_accel_state; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { @@ -592,70 +606,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case HU_UEE: return ang_do_hun (record, KC_EQL, KC_U); -#if MOUSEKEY_ENABLE - /* Mouse movement */ - case A_MUL: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - break; - - case A_MUR: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_RIGHT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_RIGHT); - } - mousekey_send(); - break; - - case A_MDL: - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - break; - - case A_MDR: - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_RIGHT); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_RIGHT); - } - mousekey_send(); - break; - - case A_ACL0 ... A_ACL2: - if (record->event.pressed) { - uint8_t idx = id - A_ACL0; - if (m_accel_state.idx == id) { - mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0); - m_accel_state.idx = 0; - } else { - if (m_accel_state.idx) { - mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0); - m_accel_state.idx = 0; - } - mousekey_on(KC_ACL0 + idx); - m_accel_state.idx = id; - } - } - break; -#endif - /* Plover base */ case A_PLVR: toggle_steno(record->event.pressed); @@ -667,7 +617,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code (KC_LGUI); if (record->tap.count && !record->tap.interrupted) { if (record->tap.count >= 2) { - register_code (KC_W); layer_on (APPSEL); set_oneshot_layer (APPSEL, ONESHOT_START); } @@ -678,7 +627,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } else { if (record->tap.count >= 2) { - unregister_code (KC_W); clear_oneshot_layer_state (ONESHOT_PRESSED); } gui_timer = timer_read (); @@ -686,43 +634,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case APP_SLK: - from_appsel = true; - return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_slack\n"); + break; case APP_EMCS: - from_appsel = true; - return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_emacs\n"); + break; case APP_TERM: - from_appsel = true; - if (!record->event.pressed) { - register_code(KC_ESC); - unregister_code(KC_ESC); - wait_ms(TAPPING_TERM + 25); - register_code(KC_DEL); - unregister_code(KC_DEL); - } + if (record->event.pressed) + uprintf("CMD:appsel_term\n"); break; case APP_CHRM: - from_appsel = true; - return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_chrome\n"); + break; case APP_MSIC: - from_appsel = true; - return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_music\n"); + break; - /* Function keys */ - case KF_1 ... KF_10: - ang_handle_kf (record, id); + // number row and symbols + case A_1 ... A_0: + ang_handle_num_row(id, record); break; } return MACRO_NONE; }; -static uint8_t is_adore = 0; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { uint8_t dl; @@ -805,6 +749,36 @@ static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data layer_off (ARRW); } +static void ang_tap_dance_tmux_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_LALT); + register_code(KC_SPC); + unregister_code(KC_SPC); + unregister_code(KC_LALT); + } else { + register_code(KC_LCTL); + register_code(KC_A); + unregister_code(KC_A); + unregister_code(KC_LCTL); + } +} + +static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *user_data) { + uint8_t kc = KC_P; + + if (state->count >= 2) { + kc = KC_Z; + } + + register_code(KC_LALT); + register_code(KC_SPC); + unregister_code(KC_SPC); + unregister_code(KC_LALT); + + register_code(kc); + unregister_code(kc); +} + qk_tap_dance_action_t tap_dance_actions[] = { [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) ,[CT_TA] = { @@ -813,12 +787,23 @@ qk_tap_dance_action_t tap_dance_actions[] = { } ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN) ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) + ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished) + ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select) }; // Runs constantly in the background, in a loop. void matrix_scan_user(void) { + static uint32_t prev_layer_state; uint8_t layer = biton32(layer_state); bool is_arrow = false; + static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"}; + + if (layer_state != prev_layer_state) { + prev_layer_state = layer_state; + if (layer_lookup[layer]) + uprintf("LAYER: %s\n", layer_lookup[layer]); + } + if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) unregister_code (KC_LGUI); @@ -929,18 +914,7 @@ void matrix_scan_user(void) { } SEQ_TWO_KEYS (KC_W, KC_M) { - register_code (KC_LALT); - register_code (KC_F2); - unregister_code (KC_F2); - unregister_code (KC_LALT); - - wait_ms (1000); - - ang_tap (KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0); - register_code (KC_LGUI); - register_code (KC_UP); - unregister_code (KC_UP); - unregister_code (KC_LGUI); + uprintf("CMD:wm\n"); } SEQ_ONE_KEY (KC_A) { @@ -999,8 +973,11 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE bool process_record_user (uint16_t keycode, keyrecord_t *record) { #if KEYLOGGER_ENABLE if (log_enable) { - xprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, - record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); + uint8_t layer = biton32(layer_state); + + if ((layer == ADORE) || (layer == BASE)) + uprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, + record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); } #endif @@ -1047,8 +1024,8 @@ void qk_ucis_symbol_fallback (void) { for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { uint8_t code; - if (qk_ucis_state.codes[i] > KF_1) - code = qk_ucis_state.codes[i] - KF_1 + KC_1; + if ((qk_ucis_state.codes[i] >= M(A_1)) && (qk_ucis_state.codes[i] <= M(A_0))) + code = qk_ucis_state.codes[i] - M(A_1) + KC_1; else code = qk_ucis_state.codes[i]; register_code(code); diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 5e7adb332..f15b67652 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -18,12 +18,11 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs] * [Layouts](#layouts) - [Base layer](#base-layer) - [ADORE layer](#adore-layer) - - [Hungarian layer](#hungarian-layer) - - [Navigation and media layer](#navigation-and-media-layer) - [Steno layer](#steno-layer) - [LED states](#led-states) * [Tools](#tools) - [Heatmap](#heatmap) + - [Layer notification](#layer-notification) * [Special features](#special-features) - [Unicode Symbol Input](#unicode-symbol-input) * [Building](#building) @@ -39,7 +38,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs] At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave: -* The keys on the number row double as function keys, when held for a bit longer than an usual tap. This allows me to use the function keys without having to switch layers. +* The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer. * The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap. * The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. @@ -57,28 +56,16 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest - `LEAD d` toggles logging keypress positions to the HID console. - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. + +The symbols on the front in the image above have the same color as the key that activates them, with the exception of the **Arrow** layer, which is just black on the front. ## ADORE layer [![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a) -While using the standard Dvorak layout, I encountered a number of inconveniences, and on this layer, I am playing with ideas to make the layout feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, had shortcomings I was not happy with. So now this is something inbetween, with own observations thrown in. How it works out in the long run remains to be seen. +My experimental layout, that I keep tweaking. No full description here, because things are very much in flux. - [cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm - -Based on a week and a half of typing, the keys were rearranged, and the home row neatly spelled out **ADORE**, that gave the layout its name. - -## Hungarian layer - -[![Hungarian layer](images/hun-layer.png)](http://www.keyboard-layout-editor.com/#/gists/b160f6ec90d58c127c114c89f66e9dc9) - -On this layer, the accented characters are at the same position as their base variant. For some, which can have other diatribes, the long one is on top, short's on bottom. Tapping any of the accented characters takes us back to the base layer. - -## Navigation and media layer - -[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892) - -This layer is primarily for navigating with the cursor or the mouse, and some media things. +Note that the **HUN** layer does not work well with ADORE: it still has the same layout as on the [Base](#base-layer) layer. This will remain until ADORE becomes the default. ## Steno layer @@ -93,8 +80,8 @@ The primary purpose of the LEDs is to show the modifier status, a secondary, to For the layers, the following rules apply: * When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. -* When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on. -* When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on. +* When the **Hungarian** layer is active, the *green* and *blue* LEDs are on. +* When the **Media** layer is active, the *red* and *green* ones are on. * When the **ARROW** layer is active, the *red* and *blue* ones are on. * For the [Steno layer](#steno-layer), all LEDs will be turned on. @@ -129,6 +116,10 @@ The generated heatmap looks somewhat like this: ![Heatmap](images/heatmap.png) +## Layer notification + +There is a very small tool in `tools/layer-notify`, that listens to the HID console, looking for layer change events, and pops up a notification for every detected change. It is a very simple tool, mainly serving as an example. + # Building To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: @@ -156,6 +147,43 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the # Changelog +## v1.7 + +*2016-09-18* + +### Overall changes + +* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. +* The number/function key behavior was changed: function keys are now on the **Media**. +* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers. +* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. +* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. + +### ADORE + +* `Y` and `X` have been swapped again. + +### Media/Navigation layer + +* The function keys are now on this layer. +* Mouse keys have been removed. +* Media start/stop/prev/next have been removed. +* `Print screen` has been removed. +* There is only one screen lock key now. + +### Heatmap + +* Fixed a few issues in the finger-stats calculation. +* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. +* The heatmap tool will now colorize the stats by default. +* The periodic stats are now printed in a more compact format. + +### Tools + +* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. +* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. +* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. + ## v1.6 *2016-08-24* @@ -174,7 +202,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the ### Miscellaneous changes * `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. -* The mouse acceleration keys on the [Navigation and Media](#navigation-and-media-layer) layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. +* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. * When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. ### Heatmap @@ -221,7 +249,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. * The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. * The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. -* The **Emacs** layer is gone, replaced by a simplified [navigation and media](#navigation-and-media-layer) layer. +* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. * `LEAD v` types the firmware version, and the keymap version. * On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. * The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. @@ -240,7 +268,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the - `-` on the left half was replaced by `Tab`. - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. - `:` now inputs `;` when shifted. -* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers. +* `ESC` cancels the **Hungarian** layer too, not just modifiers. ## v1.0 diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json index 4dfa877a7..502d1e6ea 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -13,18 +13,15 @@ [ { "x": 3.5, - "c": "#a7d0db", "fa": [ 0, 0, 2 ] }, - "#\n3\nF3", + "*\n5\nF5", { "x": 10.5, - "c": "#a7d0db", - "t": "#000000", "a": 4, "fa": [ 0, @@ -32,54 +29,44 @@ 2 ] }, - "*\n8\nF8" + "#\n4\nF4" ], [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, - "@\n2\nF2", + "@\n7\nF7", { - "x": 1, - "c": "#7adabd", - "t": "#000000" + "x": 1 }, - "$\n4\nF4", + "^\n3\nF3", { "x": 8.5 }, - "&\n7\nF7", + "!\n2\nF2", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, - "(\n9\nF9" + "&\n6\nF6" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, - "%\n5\nF5", + "$\n1\nF1", { - "c": "#f9cd31", "a": 7, - "f": 2 + "f": 3 }, - "STENO", + "F11", { "x": 4.5, "f": 3 }, "F12", { - "c": "#7adabd", "a": 4, "f": 3, "fa": [ @@ -88,19 +75,17 @@ 2 ] }, - "^\n6\nF6" + "%\n0\nF10" ], [ { "y": -0.875, - "c": "#ffb2d2", "f": 9, "a": 6, "w": 1.5 }, "\n\n", { - "t": "#0d0d0b", "f": 3, "a": 4, "fa": [ @@ -109,23 +94,21 @@ 2 ] }, - "!\n1\nF1", + " \n9\nF9", { "x": 14.5 }, - ")\n0\nF10", + " \n8\nF8", { "a": 7, "w": 1.5 }, - "F11" + "STENO" ], [ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 6 }, "G", @@ -138,15 +121,11 @@ { "y": -0.875, "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", "a": 6 }, "W", { "x": 1, - "c": "#7adabd", - "t": "#000000", "a": 6 }, "L", @@ -155,22 +134,17 @@ }, "H", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "P" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "M", { - "c": "#93c9b7", "a": 4, "fa": [0, 0, 0], "h": 1.5 @@ -182,7 +156,6 @@ }, "}\n)\n]", { - "c": "#7adabd", "a": 6 }, "F" @@ -190,24 +163,21 @@ [ { "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", "f": 3, "a": 4, "w": 1.5 }, "\n\n~\n`", { - "c": "#ffb2d2", "a": 6, "f": 3 }, - "Y", + "X", { "x": 14.5, "a": 6 }, - "X", + "Y", { "a": 4, "w": 1.5 @@ -218,8 +188,6 @@ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 6 }, "E", @@ -231,15 +199,11 @@ [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, "O", { "x": 1, - "c": "#7adabd", - "t": "#000000", "n": true }, "I", @@ -249,18 +213,14 @@ }, "R", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "N" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "U", { @@ -271,8 +231,6 @@ [ { "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", "fa": [ 6 ], @@ -308,22 +266,21 @@ { "y": -0.625, "x": 6.5, - "c": "#93c9b7", - "t": "#000000", + "a": 7, + "f": 9, "h": 1.5 }, - ";\n:", + "", { "x": 4.5, "h": 1.5 }, - "_\n-" + "" ], [ { "y": -0.75, "x": 3.5, - "c": "#a7d0db", "a": 4, "f": 3 }, @@ -339,15 +296,11 @@ { "y": -0.875, "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", "a": 6 }, "Q", { "x": 1, - "c": "#7adabd", - "t": "#000000", "a": 4 }, "<\n,", @@ -357,9 +310,7 @@ }, "K", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "J" ], @@ -367,8 +318,6 @@ { "y": -0.875, "x": 5.5, - "c": "#7adabd", - "t": "#000000", "a": 4 }, ">\n.", @@ -381,15 +330,12 @@ [ { "y": -0.875, - "c": "#ffb07b", "f": 9, "w": 1.5, "g": true }, "", { - "c": "#ffb2d2", - "t": "#0d0d0b", "a": 6, "f": 3, "g": false @@ -401,8 +347,6 @@ }, "?\n/", { - "c": "#ffb07b", - "t": "#000000", "f": 9, "g": true, "w": 1.5, @@ -414,7 +358,6 @@ { "y": -0.375, "x": 3.5, - "c": "#d9dae0", "g": true, "a": 7, "f": 3 @@ -433,18 +376,16 @@ "", { "x": 1, - "c": "#d4872a", - "g": true, + "g": false, "a": 5 }, - "", + ";\n:", { "x": 8.5 }, - "", + "_\n-", { "x": 1, - "c": "#d9dae0", "g": true, "a": 7 }, @@ -472,7 +413,6 @@ "ry": 4.25, "y": -1, "x": 1, - "c": "#f9cd31", "g": false }, "Alt", @@ -489,7 +429,6 @@ ], [ { - "c": "#d4872a", "a": 7, "f": 9, "h": 2 @@ -500,15 +439,13 @@ }, "", { - "c": "#f9cd31", "f": 3 }, "Ctrl" ], [ { - "x": 2, - "c": "#e26757" + "x": 2 }, "ESC" ], @@ -518,7 +455,6 @@ "rx": 13, "y": -1, "x": -3, - "c": "#f9cd31", "f": 2 }, "MEDIA", @@ -531,7 +467,6 @@ }, "HUN", { - "c": "#d4872a", "f": 9, "h": 2 }, @@ -545,7 +480,6 @@ [ { "x": -3, - "c": "#f9cd31", "f": 2 }, "LEAD" diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json index 1248d36af..5b4ca06c3 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json @@ -13,18 +13,15 @@ [ { "x": 3.5, - "c": "#a7d0db", "fa": [ 0, 0, 2 ] }, - "#\n3\nF3", + "*\n5\nF5", { "x": 10.5, - "c": "#a7d0db", - "t": "#000000", "a": 4, "fa": [ 0, @@ -32,54 +29,44 @@ 2 ] }, - "*\n8\nF8" + "#\n4\nF4" ], [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, - "@\n2\nF2", + "@\n7\nF7", { - "x": 1, - "c": "#7adabd", - "t": "#000000" + "x": 1 }, - "$\n4\nF4", + "^\n3\nF3", { "x": 8.5 }, - "&\n7\nF7", + "!\n2\nF2", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, - "(\n9\nF9" + "&\n6\nF6" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, - "%\n5\nF5", + "$\n1\nF1", { - "c": "#f9cd31", "a": 7, - "f": 2 + "f": 3 }, - "STENO", + "F11", { "x": 4.5, "f": 3 }, "F12", { - "c": "#7adabd", "a": 4, "f": 3, "fa": [ @@ -88,12 +75,11 @@ 2 ] }, - "^\n6\nF6" + "%\n0\nF10" ], [ { "y": -0.875, - "c": "#ffb2d2", "f": 6, "a": 6, "w": 1.5 @@ -101,7 +87,6 @@ "\n\n", { "f": 3, - "t": "#0d0d0b", "a": 4, "fa": [ 0, @@ -110,23 +95,21 @@ ] }, - "!\n1\nF1", + " \n9\nF9", { "x": 14.5 }, - ")\n0\nF10", + " \n8\nF8", { "a": 7, "w": 1.5 }, - "F11" + "STENO" ], [ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 4 }, ">\n.", @@ -140,15 +123,11 @@ { "y": -0.875, "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", "a": 4 }, "<\n,", { "x": 1, - "c": "#7adabd", - "t": "#000000", "a": 6 }, "P", @@ -157,22 +136,17 @@ }, "G", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "R" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "Y", { - "c": "#93c9b7", "a": 4, "h": 1.5 }, @@ -183,7 +157,6 @@ }, "}\n)\n]", { - "c": "#7adabd", "a": 6 }, "F" @@ -191,14 +164,12 @@ [ { "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", "f": 3, + "a": 4, "w": 1.5 }, "\n\n~\n`", { - "c": "#ffb2d2", "a": 4, "f": 3 }, @@ -218,8 +189,6 @@ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 6 }, "E", @@ -231,15 +200,11 @@ [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, "O", { "x": 1, - "c": "#7adabd", - "t": "#000000", "n": true }, "U", @@ -249,18 +214,14 @@ }, "H", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "N" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "I", { @@ -271,8 +232,6 @@ [ { "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", "fa": [ 6 ], @@ -308,23 +267,22 @@ { "y": -0.625, "x": 6.5, - "c": "#93c9b7", - "t": "#000000", "a": 7, + "f": 9, "h": 1.5 }, - "(", + "", { "x": 4.5, "h": 1.5 }, - ")" + "" ], [ { "y": -0.75, "x": 3.5, - "c": "#a7d0db", + "f": 3, "a": 6 }, "J", @@ -336,15 +294,11 @@ [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, "Q", { - "x": 1, - "c": "#7adabd", - "t": "#000000" + "x": 1 }, "K", { @@ -352,18 +306,14 @@ }, "M", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "V" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "X", { @@ -374,14 +324,11 @@ [ { "y": -0.875, - "c": "#ffb07b", "f": 9, "w": 1.5 }, "\n\n", { - "c": "#ffb2d2", - "t": "#0d0d0b", "a": 4, "f": 3 }, @@ -392,8 +339,6 @@ }, "Z", { - "c": "#ffb07b", - "t": "#000000", "f": 9, "w": 1.5 }, @@ -403,7 +348,6 @@ { "y": -0.375, "x": 3.5, - "c": "#d9dae0", "g": true, "a": 7, "f": 3 @@ -422,7 +366,6 @@ "", { "x": 1, - "c": "#d4872a", "g": false, "a": 5 }, @@ -433,7 +376,6 @@ "_\n-", { "x": 1, - "c": "#d9dae0", "g": true, "a": 7 }, @@ -461,7 +403,6 @@ "ry": 4.25, "y": -1, "x": 1, - "c": "#f9cd31", "g": false }, "Alt", @@ -478,7 +419,6 @@ ], [ { - "c": "#d4872a", "a": 7, "f": 9, "h": 2 @@ -489,15 +429,13 @@ }, "", { - "c": "#f9cd31", "f": 3 }, "Ctrl" ], [ { - "x": 2, - "c": "#e26757" + "x": 2 }, "ESC" ], @@ -507,7 +445,6 @@ "rx": 13, "y": -1, "x": -3, - "c": "#f9cd31", "f": 2 }, "MEDIA", @@ -520,7 +457,6 @@ }, "LEAD", { - "c": "#d4872a", "f": 9, "h": 2 }, @@ -534,7 +470,6 @@ [ { "x": -3, - "c": "#f9cd31", "f": 2 }, "HUN" diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands new file mode 100755 index 000000000..f3b83cf6d --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands @@ -0,0 +1,61 @@ +#!/bin/bash +set -e + +cmd_wm () { + WIN="$(xdotool getactivewindow)" + wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz + xdotool windowsize ${WIN} 100% 100% + wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz +} + +_cmd_appsel () { + wmctrl -x -a $1 || true + xdotool key Escape +} + +cmd_appsel_music () { + wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true + xdotool key Escape +} + +cmd_appsel_slack () { + _cmd_appsel slack +} + +cmd_appsel_emacs () { + _cmd_appsel emacs24 +} + +cmd_appsel_term () { + _cmd_appsel gnome-terminal +} + +cmd_appsel_chrome () { + _cmd_appsel chromium +} + +cmd_help () { + cat </dev/null 2>&1; then + cmd_${cmd} + fi +done + + diff --git a/keyboards/ergodox/keymaps/algernon/tools/layer-notify b/keyboards/ergodox/keymaps/algernon/tools/layer-notify new file mode 100755 index 000000000..627c2861e --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/layer-notify @@ -0,0 +1,12 @@ +#!/bin/sh +HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}" + +sudo "${HL}" | grep --line-buffered LAYER: | \ +(while read line; do + case $line in + LAYER:*) + layer="$(echo $(echo $line | cut -d: -f2-))" + notify-send -i mark-location-symbolic "Switched to layer: $layer" + ;; + esac + done) diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py index 68585843b..09c737646 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py +++ b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py @@ -1,12 +1,15 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import json import os import sys import re import argparse +import time from math import floor from os.path import dirname +from subprocess import Popen, PIPE, STDOUT +from blessings import Terminal class Heatmap(object): coords = [ @@ -33,7 +36,7 @@ class Heatmap(object): [ # Row 4 [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], - [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], + [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [], [], [], [] ], [ # Row 5 @@ -56,11 +59,13 @@ class Heatmap(object): def set_attr(orig, new): return new - def set_bg(self, (block, n), color): + def set_bg(self, coords, color): + (block, n) = coords self.set_attr_at(block, n, "c", self.set_attr, color) #self.set_attr_at(block, n, "g", self.set_attr, False) - def set_tap_info(self, (block, n), count, cap): + def set_tap_info(self, coords, count, cap): + (block, n) = coords def _set_tap_info(o, _count, _cap): ns = 4 - o.count ("\n") return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) @@ -87,8 +92,8 @@ class Heatmap(object): g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] - r, g, b = [x * 255 for x in r, g, b] - return "#%02x%02x%02x" % (r, g, b) + r, g, b = [x * 255 for x in (r, g, b)] + return "#%02x%02x%02x" % (int(r), int(g), int(b)) def __init__(self, layout): self.log = {} @@ -96,7 +101,8 @@ class Heatmap(object): self.max_cnt = 0 self.layout = layout - def update_log(self, (c, r)): + def update_log(self, coords): + (c, r) = coords if not (c, r) in self.log: self.log[(c, r)] = 0 self.log[(c, r)] = self.log[(c, r)] + 1 @@ -132,18 +138,17 @@ class Heatmap(object): # right hand [0, 0, 0, 0, 0] ] - finger_map = [0, 0, 1, 2, 3, 4, 4] + finger_map = [0, 0, 1, 2, 3, 3, 3, 1, 1, 1, 2, 3, 4, 4] for (c, r) in self.log: if r == 5: # thumb cluster if c <= 6: # left side usage[0][4] = usage[0][4] + self.log[(c, r)] else: - usage[1][4] = usage[1][4] + self.log[(c, r)] + usage[1][0] = usage[1][0] + self.log[(c, r)] else: fc = c hand = 0 if fc >= 7: - fc = fc - 7 hand = 1 fm = finger_map[fc] usage[hand][fm] = usage[hand][fm] + self.log[(c, r)] @@ -157,79 +162,158 @@ class Heatmap(object): if total == 0: total = 1 stats = { + "total-keys": total, "hands": { "left": { - "usage": float(hand_usage[0]) / total * 100, + "usage": round(float(hand_usage[0]) / total * 100, 2), "fingers": { - "0 - pinky": 0, - "1 - ring": 0, - "2 - middle": 0, - "3 - index": 0, - "4 - thumb": 0, + "pinky": 0, + "ring": 0, + "middle": 0, + "index": 0, + "thumb": 0, } }, "right": { - "usage": float(hand_usage[1]) / total * 100, + "usage": round(float(hand_usage[1]) / total * 100, 2), "fingers": { - "0 - thumb": 0, - "1 - index": 0, - "2 - middle": 0, - "3 - ring": 0, - "4 - pinky": 0, + "thumb": 0, + "index": 0, + "middle": 0, + "ring": 0, + "pinky": 0, } }, } } hmap = ['left', 'right'] - fmap = ['0 - pinky', '1 - ring', '2 - middle', '3 - index', '4 - thumb', - '0 - thumb', '1 - index', '2 - middle', '3 - ring', '4 - pinky'] + fmap = ['pinky', 'ring', 'middle', 'index', 'thumb', + 'thumb', 'index', 'middle', 'ring', 'pinky'] for hand_idx in range(len(usage)): hand = usage[hand_idx] for finger_idx in range(len(hand)): - stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = float(hand[finger_idx]) / total * 100 + stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = round(float(hand[finger_idx]) / total * 100, 2) return stats def dump_all(out_dir, heatmaps): - for layer in heatmaps.keys(): + stats = {} + t = Terminal() + t.clear() + sys.stdout.write("\x1b[2J\x1b[H") + + print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir)) + + keys = list(heatmaps.keys()) + keys.sort() + + for layer in keys: if len(heatmaps[layer].log) == 0: continue with open ("%s/%s.json" % (out_dir, layer), "w") as f: json.dump(heatmaps[layer].get_heatmap(), f) - print >>sys.stderr, "%s stats:" % (layer) - json.dump (heatmaps[layer].get_stats(), sys.stderr, - indent = 4, sort_keys = True) - print >>sys.stderr, "" - print >>sys.stderr, "" + stats[layer] = heatmaps[layer].get_stats() -def main(opts): + left = stats[layer]['hands']['left'] + right = stats[layer]['hands']['right'] + + print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer, + total=int(stats[layer]['total-keys'] / 2))) + print (('{t.underline} | ' + \ + 'left ({l[usage]:6.2f}%) | ' + \ + 'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right)) + print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \ + ' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \ + ' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \ + ' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \ + ' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \ + '').format(left=left['fingers'], right=right['fingers'], t=t)) + +def process_line(line, heatmaps, opts, stamped_log = None): + m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) + if not m: + return False + if stamped_log is not None: + if line.startswith("KL:"): + print ("%10.10f %s" % (time.time(), line), + file = stamped_log, end = '') + else: + print (line, + file = stamped_log, end = '') + stamped_log.flush() + + (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4)) + if (c, r) not in opts.allowed_keys: + return False + + heatmaps[l].update_log ((c, r)) + + return True + +def setup_allowed_keys(opts): + if len(opts.only_key): + incmap={} + for v in opts.only_key: + m = re.search ('(\d+),(\d+)', v) + if not m: + continue + (c, r) = (int(m.group(1)), int(m.group(2))) + incmap[(c, r)] = True + else: + incmap={} + for r in range(0, 6): + for c in range(0, 14): + incmap[(c, r)] = True + for v in opts.ignore_key: + m = re.search ('(\d+),(\d+)', v) + if not m: + continue + (c, r) = (int(m.group(1)), int(m.group(2))) + del(incmap[(c, r)]) + + return incmap + +def main(opts): heatmaps = {"Dvorak": Heatmap("Dvorak"), "ADORE": Heatmap("ADORE") } cnt = 0 - restrict_row = opts.restrict_row out_dir = opts.outdir + if not os.path.exists(out_dir): + os.makedirs(out_dir) + + opts.allowed_keys = setup_allowed_keys(opts) + + if not opts.one_shot: + + try: + with open("%s/stamped-log" % out_dir, "r") as f: + while True: + line = f.readline() + if not line: + break + if not process_line(line, heatmaps, opts): + continue + except: + pass + + stamped_log = open ("%s/stamped-log" % (out_dir), "a+") + else: + stamped_log = None + while True: line = sys.stdin.readline() if not line: break - m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) - if not m: + if not process_line(line, heatmaps, opts, stamped_log): continue cnt = cnt + 1 - (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4)) - if restrict_row != -1 and r != restrict_row: - continue - if c in opts.ignore_columns: - continue - - heatmaps[l].update_log ((c, r)) - if opts.dump_interval != -1 and cnt >= opts.dump_interval: + if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot: cnt = 0 dump_all(out_dir, heatmaps) @@ -239,11 +323,17 @@ if __name__ == "__main__": parser = argparse.ArgumentParser (description = "keylog to heatmap processor") parser.add_argument ('outdir', action = 'store', help = 'Output directory') - parser.add_argument ('--row', dest = 'restrict_row', action = 'store', type = int, - default = -1, help = 'Restrict processing to this row only') parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int, default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only') - parser.add_argument ('--ignore-column', dest = 'ignore_columns', action = 'append', type = int, - default = [], help = 'Ignore the specified columns') + parser.add_argument ('--ignore-key', dest = 'ignore_key', action = 'append', type = str, + default = [], help = 'Ignore the key at position (x, y)') + parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str, + default = [], help = 'Only include key at position (x, y)') + parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true', + help = 'Do not load previous data, and do not update it, either.') args = parser.parse_args() + if len(args.ignore_key) and len(args.only_key): + print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!", + file = sys.stderr) + sys.exit(1) main(args) diff --git a/keyboards/ergodox/keymaps/algernon/tools/max-focused b/keyboards/ergodox/keymaps/algernon/tools/max-focused deleted file mode 100755 index 4d5220aa8..000000000 --- a/keyboards/ergodox/keymaps/algernon/tools/max-focused +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -WIN="$(xdotool getactivewindow)" -wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz -xdotool windowsize ${WIN} 100% 100% -wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz diff --git a/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py new file mode 100755 index 000000000..e068c3cbf --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 + +import os +import sys + +charmap = { + '9': [[1, 0]], + '7': [[2, 0]], '@': [[2, 5], [2, 0]], + '5': [[3, 0]], '*': [[2, 5], [3, 0]], + '3': [[4, 0]], '^': [[2, 5], [4, 0]], + '1': [[5, 0]], '$': [[2, 5], [5, 0]], + '0': [[8, 0]], '%': [[2, 5], [8, 0]], + '2': [[9, 0]], '!': [[2, 5], [9, 0]], + '4': [[10, 0]], '#': [[2, 5], [10, 0]], + '6': [[11, 0]], '&': [[2, 5], [11, 0]], + '8': [[12, 0]], + + '`': [[0, 1]], '~': [[2, 5], [0, 1]], + 'y': [[1, 1]], 'Y': [[2, 5], [1, 1]], + 'w': [[2, 1]], 'W': [[2, 5], [2, 1]], + 'g': [[3, 1]], 'G': [[2, 5], [3, 1]], + 'l': [[4, 1]], 'L': [[2, 5], [4, 1]], + 'm': [[5, 1]], 'M': [[2, 5], [5, 1]], + '[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]], + ']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]], + 'f': [[8, 1]], 'F': [[2, 5], [8, 1]], + 'h': [[9, 1]], 'H': [[2, 5], [9, 1]], + 'c': [[10, 1]], 'C': [[2, 5], [10, 1]], + 'p': [[11, 1]], 'P': [[2, 5], [11, 1]], + 'x': [[12, 1]], 'X': [[2, 5], [12, 1]], + '\\': [[13, 1]], '|': [[2, 5], [13, 1]], + + '\t': [[0, 2]], + 'a': [[1, 2]], 'A': [[2, 5], [1, 2]], + 'o': [[2, 2]], 'O': [[2, 5], [2, 2]], + 'e': [[3, 2]], 'E': [[2, 5], [3, 2]], + 'i': [[4, 2]], 'I': [[2, 5], [4, 2]], + 'u': [[5, 2]], 'U': [[2, 5], [5, 2]], + 'd': [[8, 2]], 'D': [[2, 5], [8, 2]], + 'r': [[9, 2]], 'R': [[2, 5], [9, 2]], + 't': [[10, 2]], 'T': [[2, 5], [10, 2]], + 'n': [[11, 2]], 'N': [[2, 5], [11, 2]], + 's': [[12, 2]], 'S': [[2, 5], [12, 2]], + '=': [[13, 2]], '+': [[2, 5], [13, 2]], + + 'z': [[1, 3]], 'Z': [[2, 5], [1, 3]], + 'q': [[2, 3]], 'Q': [[2, 5], [2, 3]], + '\'': [[3, 3]], '"': [[2, 5], [3, 3]], + ',': [[4, 3]], '<': [[2, 5], [4, 3]], + '.': [[5, 3]], '>': [[2, 5], [5, 3]], + 'b': [[8, 3]], 'B': [[2, 5], [8, 3]], + 'k': [[9, 3]], 'K': [[2, 5], [9, 3]], + 'v': [[10, 3]], 'V': [[2, 5], [10, 3]], + 'j': [[11, 3]], 'J': [[2, 5], [11, 3]], + '/': [[12, 3]], '?': [[2, 5], [12, 3]], + + ':': [[4, 4]], ';': [[4, 4], [4, 4]], + '-': [[9, 4]], '_': [[2, 5], [9, 4]], + + ' ': [[10, 5]], + '\n': [[11, 5]], + + ## Layered things + # Hungarian + 'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]], + 'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]], + 'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]], + 'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]], + 'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]], + 'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]], + 'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]], + 'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]], + 'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]], +} + +def lookup_char(layer, ch): + if ch in charmap: + return charmap[ch] + return None + +def process_char(layer, ch, out=sys.stdout): + keys = lookup_char(layer, ch) + if not keys: + print ("Unknown char: %s" % ch, file=sys.stderr) + else: + for (c, r) in keys: + print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out) + print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out) + +def process_file(fn, layer, out=sys.stdout): + with open(fn, "r") as f: + ch = f.read(1) + while ch: + process_char(layer, ch, out) + ch = f.read(1) + +if sys.argv[1] == '-': + out='/dev/stdin' +else: + out=sys.argv[1] + +if len(sys.argv) >= 2: + layer = 'ADORE' +else: + layer = sys.argv[2] + +process_file(out, layer = layer) -- cgit v1.2.3-24-g4f1b From 86e85438d36014b6a6a2b20be4454b865374d47a Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 20 Sep 2016 15:45:50 -0400 Subject: Fixed Qwerty Fn layer to match documented design --- keyboards/planck/keymaps/impossible/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index e816f359a..503976fa2 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -97,17 +97,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | + * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ [_QW_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, - {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12}, + {_______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} }, /* Plover layer (http://opensteno.org) -- cgit v1.2.3-24-g4f1b From 6631abc1cb0e570271bcf33464e3af17b6fc0b87 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 20 Sep 2016 21:38:59 -0500 Subject: Made Serial and I2C not include the Other This saves 192 bytes --- keyboards/lets_split/config.h | 7 ++++++- keyboards/lets_split/i2c.c | 3 +++ keyboards/lets_split/matrix.c | 23 +++++++++++++++-------- keyboards/lets_split/rules.mk | 4 ++-- keyboards/lets_split/serial.c | 5 ++++- keyboards/lets_split/split_util.c | 8 ++++++-- 6 files changed, 36 insertions(+), 14 deletions(-) diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index ec99514aa..f4d900acc 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -41,6 +41,11 @@ along with this program. If not, see . // #define USE_I2C +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + // #define EE_HANDS #define I2C_MASTER_LEFT @@ -94,4 +99,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif \ No newline at end of file +#endif diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index c72789403..084c890c4 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -6,6 +6,8 @@ #include #include "i2c.h" +#ifdef USE_I2C + // Limits the amount of we wait for any one i2c transaction. // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is // 9 bits, a single transaction will take around 90μs to complete. @@ -157,3 +159,4 @@ ISR(TWI_vect) { // Reset everything, so we are ready for the next TWI interrupt TWCR |= (1<. #include "debug.h" #include "util.h" #include "matrix.h" -#include "i2c.h" -#include "serial.h" #include "split_util.h" #include "pro_micro.h" #include "config.h" +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + #ifndef DEBOUNCE -# define DEBOUNCE 5 +# define DEBOUNCE 5 #endif #define ERROR_DISCONNECT_COUNT 5 @@ -145,6 +149,8 @@ uint8_t _matrix_scan(void) return 1; } +#ifdef USE_I2C + // Get rows from other half over i2c int i2c_transaction(void) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; @@ -176,7 +182,8 @@ i2c_error: // the cable is disconnceted, or something else went wrong return 0; } -#ifndef USE_I2C +#else // USE_SERIAL + int serial_transaction(void) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; @@ -199,7 +206,7 @@ uint8_t matrix_scan(void) #ifdef USE_I2C if( i2c_transaction() ) { -#else +#else // USE_SERIAL if( serial_transaction() ) { #endif // turn on the indicator led when halves are disconnected @@ -235,7 +242,7 @@ void matrix_slave_scan(void) { /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } -#else +#else // USE_SERIAL for (int i = 0; i < ROWS_PER_HAND; ++i) { serial_slave_buffer[i] = matrix[offset+i]; } @@ -290,7 +297,7 @@ static void init_cols(void) static matrix_row_t read_cols(void) { matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { + for(int x = 0; x < MATRIX_COLS; x++) { result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); } return result; @@ -298,7 +305,7 @@ static matrix_row_t read_cols(void) static void unselect_rows(void) { - for(int x = 0; x < ROWS_PER_HAND; x++) { + for(int x = 0; x < ROWS_PER_HAND; x++) { _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); } diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 6961fbd55..6fde8a444 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -52,7 +52,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# 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) @@ -71,4 +71,4 @@ RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes \ No newline at end of file +CUSTOM_MATRIX = yes diff --git a/keyboards/lets_split/serial.c b/keyboards/lets_split/serial.c index f439c2f20..6faed09ce 100644 --- a/keyboards/lets_split/serial.c +++ b/keyboards/lets_split/serial.c @@ -10,9 +10,10 @@ #include #include #include - #include "serial.h" +#ifdef USE_SERIAL + // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. #define SERIAL_DELAY 24 @@ -223,3 +224,5 @@ int serial_update_buffers(void) { sei(); return 0; } + +#endif diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 65003a71a..461921798 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -6,11 +6,15 @@ #include #include "split_util.h" #include "matrix.h" -#include "i2c.h" -#include "serial.h" #include "keyboard.h" #include "config.h" +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + volatile bool isLeftHand = true; static void setup_handedness(void) { -- cgit v1.2.3-24-g4f1b From b30e6c1c9e1c876ddf95fcc3bc727a04ca6f2abc Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 20 Sep 2016 21:46:33 -0500 Subject: Created I2C and Serial keymaps for unit testing Having a dedicated I2C keymap and a dedicated serial keymap will allow the testing suite to check both conditions. --- keyboards/lets_split/keymaps/i2c/config.h | 102 +++++++++++++ keyboards/lets_split/keymaps/i2c/keymap.c | 214 +++++++++++++++++++++++++++ keyboards/lets_split/keymaps/serial/config.h | 102 +++++++++++++ keyboards/lets_split/keymaps/serial/keymap.c | 214 +++++++++++++++++++++++++++ 4 files changed, 632 insertions(+) create mode 100644 keyboards/lets_split/keymaps/i2c/config.h create mode 100644 keyboards/lets_split/keymaps/i2c/keymap.c create mode 100644 keyboards/lets_split/keymaps/serial/config.h create mode 100644 keyboards/lets_split/keymaps/serial/keymap.c diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h new file mode 100644 index 000000000..2671fabf6 --- /dev/null +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -0,0 +1,102 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +#define CATERINA_BOOTLOADER + +#define USE_I2C + +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * 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 + +#endif diff --git a/keyboards/lets_split/keymaps/i2c/keymap.c b/keyboards/lets_split/keymaps/i2c/keymap.c new file mode 100644 index 000000000..0d2d94b67 --- /dev/null +++ b/keyboards/lets_split/keymaps/i2c/keymap.c @@ -0,0 +1,214 @@ +#include "lets_split.h" +#include "action_layer.h" +#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 _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// 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 | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + 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, KC_ENT , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + 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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + 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 , \ + ADJUST, 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 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + 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,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + 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_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_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 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 ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h new file mode 100644 index 000000000..f4d900acc --- /dev/null +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -0,0 +1,102 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * 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 + +#endif diff --git a/keyboards/lets_split/keymaps/serial/keymap.c b/keyboards/lets_split/keymaps/serial/keymap.c new file mode 100644 index 000000000..0d2d94b67 --- /dev/null +++ b/keyboards/lets_split/keymaps/serial/keymap.c @@ -0,0 +1,214 @@ +#include "lets_split.h" +#include "action_layer.h" +#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 _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// 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 | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + 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, KC_ENT , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + 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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + 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 , \ + ADJUST, 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 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + 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,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + 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_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_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 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 ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 7a91cce869f7cda8a42bf071ba77ee6096772d20 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 21 Sep 2016 08:02:51 +0200 Subject: - Updated backlight levels for KC60 --- keyboards/kc60/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index c4a9b9ff8..29695d0b9 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LEVELS 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE -- cgit v1.2.3-24-g4f1b From e1f131db8e59c6ed3471906d3a62457d593f51af Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 21 Sep 2016 10:11:42 +0200 Subject: restore each_tap callback --- quantum/process_keycode/process_tap_dance.c | 1 + 1 file changed, 1 insertion(+) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 79ade4d00..6ae362c4c 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -70,6 +70,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { action->state.keycode = keycode; action->state.count++; action->state.timer = timer_read(); + process_tap_dance_action_on_each_tap (action); if (last_td && last_td != keycode) { qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; -- cgit v1.2.3-24-g4f1b From 0edc82f0300924394324e2f3c4d2f8f0008439db Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 21 Sep 2016 11:29:34 +0200 Subject: formatting --- quantum/process_keycode/process_tap_dance.h | 8 ++++---- readme.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index d7b857bdc..49b06e450 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -39,15 +39,15 @@ typedef struct #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ - .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ + .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ } #define ACTION_TAP_DANCE_FN(user_fn) { \ - .fn = { NULL, user_fn, NULL } \ + .fn = { NULL, user_fn, NULL }, \ } -#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ - .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ +#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ + .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ } extern qk_tap_dance_action_t tap_dance_actions[]; diff --git a/readme.md b/readme.md index ea20b5e01..a7320202b 100644 --- a/readme.md +++ b/readme.md @@ -526,7 +526,7 @@ This array specifies what actions shall be taken when a tap-dance key is in acti * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. -* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. +* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. -- cgit v1.2.3-24-g4f1b From cda4b534fa4921c2d8f9884aa6a144333e7b07c4 Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 21 Sep 2016 11:29:43 +0200 Subject: add user_data field --- quantum/process_keycode/process_tap_dance.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 49b06e450..f753cbba6 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -44,10 +44,12 @@ typedef struct #define ACTION_TAP_DANCE_FN(user_fn) { \ .fn = { NULL, user_fn, NULL }, \ + .user_data = NULL, \ } #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ + .user_data = NULL, \ } extern qk_tap_dance_action_t tap_dance_actions[]; -- cgit v1.2.3-24-g4f1b From 9d629719cb0da23a115ec811359ccd9b749cf8fa Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Wed, 21 Sep 2016 14:41:37 +0000 Subject: Filled Impossible Layout documentation --- keyboards/planck/keymaps/impossible/readme.md | 91 ++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index de9680b49..af85d7603 100644 --- a/keyboards/planck/keymaps/impossible/readme.md +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -1,2 +1,91 @@ -# The Default Planck Layout +# The Impossible Layout +The Impossible Layout is named such because it manages to fit in both a numpad and an inverted-T arrow cluster into the same layer as the alpha keys. + +## Main layout + +The Impossible Layout places the middle column of the alphas onto where the punctuation keys were, moving he most used punctuation to be accessed by the thumbs. Because removing the middle columns fits with the Workman layout's philosopy, Workman is used as the basis for the layout. This means the layout should be very easy to learn for Workman users, and reasonable for Colemak users. Other space gains are made by combining keys that are only ever chorded with other non symbol keys (with function-layer alternatives where needed). + +### Alpha-numeric layer + +,-----------------------------------------------------------------------------------------------. +| Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +|Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +### Function layer + +,-----------------------------------------------------------------------------------------------. +| ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +|Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +## Qwerty + +The Qwerty layer, mostly intended for gaming use, makes use of the doubled chorded/non-symbolic keys to obtain use of the entire alpha-numeric typing area. + +### Qwerty layer + +,-----------------------------------------------------------------------------------------------. +|Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| Shift | A | S | D | F | G | H | J | K | L | ; | " | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +|Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +### Qwerty Fn Layer + +,-----------------------------------------------------------------------------------------------. +| Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +|Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +## Stenography + +The Steno/Plover layer moves the number row below the regular keys, providing a much more comfortable placement for the thumb keys. Using this layout will require a slightly different dictionary to account for different keys being adjacent to the number row. + +### Steno Layer + +,-----------------------------------------------------------------------------------------------. +| S | T | P | H | * | F | P | L | T | D | | | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| S | K | W | R | * | R | B | G | S | Z | | | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| # | # | # | # | | # | # | # | # | # | | | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| | | A | O | | E | U | | | | |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +## Adjustments and Options + +In order to switch between layouts and change other keyboard settings, an adjustment layer is accessible from the same position over any layout. + +### Adjustment Layer + +,-----------------------------------------------------------------------------------------------. +| | | | | | | | | Insert| PrtSc | Pause | RESET | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| | | | | | | | CapLk |Voice +| Audio |MIDIoff| | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| | | | | | | | ScrLk |Voice -| Music |MIDI on| | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent| +`-----------------------------------------------------------------------------------------------' -- cgit v1.2.3-24-g4f1b From 073a1f21bb4ccf8dc47ec3757e64db97d4011ab8 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Wed, 21 Sep 2016 14:45:05 +0000 Subject: Corrected Impossible Layout readme tables --- keyboards/planck/keymaps/impossible/readme.md | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index af85d7603..7b3c87b4e 100644 --- a/keyboards/planck/keymaps/impossible/readme.md +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -8,27 +8,17 @@ The Impossible Layout places the middle column of the alphas onto where the punc ### Alpha-numeric layer -,-----------------------------------------------------------------------------------------------. | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ### Function layer -,-----------------------------------------------------------------------------------------------. | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| |Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ## Qwerty @@ -36,27 +26,17 @@ The Qwerty layer, mostly intended for gaming use, makes use of the doubled chord ### Qwerty layer -,-----------------------------------------------------------------------------------------------. |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | Shift | A | S | D | F | G | H | J | K | L | ; | " | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ### Qwerty Fn Layer -,-----------------------------------------------------------------------------------------------. | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ## Stenography @@ -64,15 +44,10 @@ The Steno/Plover layer moves the number row below the regular keys, providing a ### Steno Layer -,-----------------------------------------------------------------------------------------------. | S | T | P | H | * | F | P | L | T | D | | | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | S | K | W | R | * | R | B | G | S | Z | | | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | # | # | # | # | | # | # | # | # | # | | | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | | | A | O | | E | U | | | | |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ## Adjustments and Options @@ -80,12 +55,7 @@ In order to switch between layouts and change other keyboard settings, an adjust ### Adjustment Layer -,-----------------------------------------------------------------------------------------------. | | | | | | | | | Insert| PrtSc | Pause | RESET | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | | | | | | | | ScrLk |Voice -| Music |MIDI on| | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent| -`-----------------------------------------------------------------------------------------------' -- cgit v1.2.3-24-g4f1b From 9e6a493172da4f36df6b35307a5796ee8cb2cbec Mon Sep 17 00:00:00 2001 From: UnderSampled Date: Wed, 21 Sep 2016 18:55:14 +0000 Subject: Fixed Impossible Layout readme tables (again) --- keyboards/planck/keymaps/impossible/readme.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index 7b3c87b4e..02c719197 100644 --- a/keyboards/planck/keymaps/impossible/readme.md +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -8,6 +8,8 @@ The Impossible Layout places the middle column of the alphas onto where the punc ### Alpha-numeric layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | @@ -15,6 +17,8 @@ The Impossible Layout places the middle column of the alphas onto where the punc ### Function layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | @@ -26,6 +30,8 @@ The Qwerty layer, mostly intended for gaming use, makes use of the doubled chord ### Qwerty layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | | Shift | A | S | D | F | G | H | J | K | L | ; | " | @@ -33,6 +39,8 @@ The Qwerty layer, mostly intended for gaming use, makes use of the doubled chord ### Qwerty Fn Layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | @@ -44,6 +52,8 @@ The Steno/Plover layer moves the number row below the regular keys, providing a ### Steno Layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | S | T | P | H | * | F | P | L | T | D | | | | S | K | W | R | * | R | B | G | S | Z | | | | # | # | # | # | | # | # | # | # | # | | | @@ -55,6 +65,8 @@ In order to switch between layouts and change other keyboard settings, an adjust ### Adjustment Layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | | | | | | | | | Insert| PrtSc | Pause | RESET | | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | | | | | | | | | ScrLk |Voice -| Music |MIDI on| | -- cgit v1.2.3-24-g4f1b From d4309990472895bbbe82f7ba22ed33c16f928778 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Fri, 23 Sep 2016 00:55:15 +0200 Subject: Fix issue #772 Meh and Hyper not working --- tmk_core/common/action.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 08ef22eb9..d485b46c7 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -155,9 +155,10 @@ void process_action(keyrecord_t *record, action_t action) action.key.mods<<4; if (event.pressed) { if (mods) { - if (IS_MOD(action.key.code)) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. - // this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT) + // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). + // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). add_mods(mods); } else { add_weak_mods(mods); @@ -168,7 +169,7 @@ void process_action(keyrecord_t *record, action_t action) } else { unregister_code(action.key.code); if (mods) { - if (IS_MOD(action.key.code)) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { del_mods(mods); } else { del_weak_mods(mods); -- cgit v1.2.3-24-g4f1b From 6e5142ca3ee7c45a0776d84ba667c5504dc85cd8 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Thu, 22 Sep 2016 22:05:12 -0400 Subject: Adds EPRM reset key --- keyboards/ergodox/keymaps/default/keymap.c | 12 ++++++++++-- keyboards/ergodox/keymaps/default/readme.md | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodox/keymaps/default/keymap.c index 1b80cb3a2..2f399bd18 100644 --- a/keyboards/ergodox/keymaps/default/keymap.c +++ b/keyboards/ergodox/keymaps/default/keymap.c @@ -7,6 +7,8 @@ #define SYMB 1 // symbols #define MDIA 2 // media keys +#define EPRM M(1) // Macro 1: Reset EEPROM + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -62,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | + * | EPRM | | | | | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -79,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, + EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, @@ -149,6 +151,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; } return MACRO_NONE; }; @@ -158,6 +165,7 @@ void matrix_init_user(void) { }; + // Runs constantly in the background, in a loop. void matrix_scan_user(void) { diff --git a/keyboards/ergodox/keymaps/default/readme.md b/keyboards/ergodox/keymaps/default/readme.md index 8f6dba45e..f68138ed6 100644 --- a/keyboards/ergodox/keymaps/default/readme.md +++ b/keyboards/ergodox/keymaps/default/readme.md @@ -2,6 +2,8 @@ ## Changelog +* Sep 22, 2016: + * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM. * Feb 2, 2016 (V1.1): * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). -- cgit v1.2.3-24-g4f1b From fad54872667d493ccd95e2171addf6c6b22343b7 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Thu, 22 Sep 2016 23:33:22 -0400 Subject: Initial support for TADA68 --- keyboards/tada68/Makefile | 3 + keyboards/tada68/config.h | 94 ++++++++++++++++++++++++++++ keyboards/tada68/keymaps/default/Makefile | 21 +++++++ keyboards/tada68/keymaps/default/keymap.c | 98 ++++++++++++++++++++++++++++++ keyboards/tada68/keymaps/default/readme.md | 1 + keyboards/tada68/readme.md | 4 ++ keyboards/tada68/rules.mk | 66 ++++++++++++++++++++ keyboards/tada68/tada68.c | 30 +++++++++ keyboards/tada68/tada68.h | 43 +++++++++++++ 9 files changed, 360 insertions(+) create mode 100644 keyboards/tada68/Makefile create mode 100644 keyboards/tada68/config.h create mode 100644 keyboards/tada68/keymaps/default/Makefile create mode 100644 keyboards/tada68/keymaps/default/keymap.c create mode 100644 keyboards/tada68/keymaps/default/readme.md create mode 100644 keyboards/tada68/readme.md create mode 100644 keyboards/tada68/rules.mk create mode 100644 keyboards/tada68/tada68.c create mode 100644 keyboards/tada68/tada68.h diff --git a/keyboards/tada68/Makefile b/keyboards/tada68/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/tada68/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h new file mode 100644 index 000000000..5c2b29062 --- /dev/null +++ b/keyboards/tada68/config.h @@ -0,0 +1,94 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER TADA +#define PRODUCT TADA68 +#define DESCRIPTION QMK keyboard firmware for TADA68 with WS2812 support + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {D0,D1,F6,F7,D5} +#define MATRIX_COL_PINS {F0,F1,E6,C7,C6,B7,D4,B1,B0,B5,B4,D7,D6,B3,F4} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration + */ + +#define RGB_DI_PIN F5 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * 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 + +#endif diff --git a/keyboards/tada68/keymaps/default/Makefile b/keyboards/tada68/keymaps/default/Makefile new file mode 100644 index 000000000..2a7ff2779 --- /dev/null +++ b/keyboards/tada68/keymaps/default/Makefile @@ -0,0 +1,21 @@ +# 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 = 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. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c new file mode 100644 index 000000000..da57c0343 --- /dev/null +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +#include "tada68.h" + + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// 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 _BL 0 +#define _FL 1 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + 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_GRV, \ + 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,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_UP,KC_PGDN, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | | | | | | | | | | | | | RESET| | + * |----------------------------------------------------------------| + * | | | | | | | | | | | |BL-|BL+|BL | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + #ifdef RGBLIGHT_ENABLE + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), + #else + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), + #endif +}; + +/*enum function_id { + //SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + //[0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}*/ diff --git a/keyboards/tada68/keymaps/default/readme.md b/keyboards/tada68/keymaps/default/readme.md new file mode 100644 index 000000000..36760d6b9 --- /dev/null +++ b/keyboards/tada68/keymaps/default/readme.md @@ -0,0 +1 @@ +# default TADA68 layout diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md new file mode 100644 index 000000000..552fdea52 --- /dev/null +++ b/keyboards/tada68/readme.md @@ -0,0 +1,4 @@ +TADA68 keyboard firmware +====================== + +TODO: to be updated. diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk new file mode 100644 index 000000000..1102584d8 --- /dev/null +++ b/keyboards/tada68/rules.mk @@ -0,0 +1,66 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c new file mode 100644 index 000000000..24f89048c --- /dev/null +++ b/keyboards/tada68/tada68.c @@ -0,0 +1,30 @@ +#include "tada68.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRB |= (1<<2); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< Date: Fri, 23 Sep 2016 14:20:05 -0400 Subject: Disable RGB led support until a suitable pin is located --- keyboards/tada68/config.h | 9 ++++++--- keyboards/tada68/rules.mk | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index 5c2b29062..5d8757936 100644 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -66,12 +66,15 @@ along with this program. If not, see . /* Underlight configuration */ -#define RGB_DI_PIN F5 +/*#define RGB_DI_PIN E2 #define RGBLIGHT_TIMER -#define RGBLED_NUM 4 // Number of LEDs +#define RGBLED_NUM 2 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_VAL_STEP 17*/ +//Disabled while I figure out a suitable pin for RGB support. +//I've tried F5, D2, D3, and E2 but it's possible the end of my +//strand is bad. New LEDs on order. /* * Feature disable options diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index 1102584d8..d8ec42365 100644 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -58,7 +58,7 @@ EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) CONSOLE_ENABLE ?= yes # Console for debug(+400) COMMAND_ENABLE ?= yes # Commands for debug and configuration NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870) BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) MIDI_ENABLE ?= no # MIDI controls AUDIO_ENABLE ?= no -- cgit v1.2.3-24-g4f1b From 1a96b2cdc8895bd9f219e6c793aeee6ff7ce81f6 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Fri, 23 Sep 2016 20:57:36 -0400 Subject: Disables sleep LED by default --- keyboards/ergodox/ez/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox/ez/rules.mk index 37e554b30..a9715beb8 100644 --- a/keyboards/ergodox/ez/rules.mk +++ b/keyboards/ergodox/ez/rules.mk @@ -71,6 +71,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 # comment out to disable the options. # +SLEEP_LED_ENABLE = no + ifndef QUANTUM_DIR include ../../../Makefile endif -- cgit v1.2.3-24-g4f1b