From 0cd017d485f19a2c9ce5e8df3535d44958664ea7 Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Wed, 22 Jun 2016 16:51:25 -0400 Subject: Use Space Cadet parens on LSFT --- keyboards/planck/keymaps/cbbrowne/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 55385acd6b..6ce4fd0e7a 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, + {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, -- cgit v1.2.3 From 477ed703c88822aea62152d62fb2310267edc48f Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Tue, 12 Jul 2016 11:57:05 -0400 Subject: I did not like Space Cadet paren; it jumps in in way too many extra cases --- keyboards/planck/keymaps/cbbrowne/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 6ce4fd0e7a..55385acd6b 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, - {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, 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_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, -- cgit v1.2.3 From 82f768e6c04c57fa44d6020e3d57a6b3de211ddc Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Mon, 18 Jul 2016 16:07:00 -0400 Subject: Notes about changes --- keyboards/planck/keymaps/cbbrowne/readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 5f08530f46..fdb0997001 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -7,16 +7,10 @@ Christopher Browne This was originally based on the default keyboard map, but I have been doing sundry experimentation: -1. Experiments +1. Useful Experiments ---------------------------------------- - * To figure things out about the toolset - * I'm an Emacs guy, so will be needing a fair bit of tuning * It made sense to mess around some with keyboard maps. - - I tried added Workman alongside Dvorak and Colemak - - Boy, oh boy, these don't help!!! - - I have done 30 years of learning of Emacs key mappings, and - these alternative keyboards massively mess me up - I added a keypad, originally based on keymaps/numpad.c, but mighty substantially revised, as that one seems to be rotated 90 degrees from usual conventions for number pads @@ -30,6 +24,7 @@ doing sundry experimentation: - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number + * Minor use of Space Cadet Shift; my SHIFT key has switched to KC_LSP0, so that when I just hit SHIFT, I get a left parens: ( which is great for Lisping. I don't have a Right Shift, so I don't get an autoclose; I think I'll live with that until a Planck successor with more lines of keys :-) 2. Some code structure ideas --------------------------------------------------- @@ -62,6 +57,10 @@ doing sundry experimentation: and shift ESC off the first column so KC_LCTL and KC_LALT can be on the first column. * I needed to swap ' and ENTER + * I tried added Workman alongside Dvorak and Colemak + - Boy, oh boy, these don't help!!! + - I have done 30 years of learning of Emacs key mappings, and + these alternative keyboards massively mess me up 4. TODO --------------------------------------------------------- @@ -73,6 +72,7 @@ doing sundry experimentation: helpers. * I do not presently have anything that handles X11 screen switching, as with Control-Alt-various - + * I ought to probably look into KC_LEAD, to have some key combos + that do not need to be concurrent -- cgit v1.2.3 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 (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/Makefile b/keyboards/planck/keymaps/impossible/Makefile new file mode 100644 index 0000000000..581e08cd02 --- /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 0000000000..2489fc270a --- /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 0000000000..de9680b498 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + -- cgit v1.2.3 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 2489fc270a..037282ee20 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 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(+) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 037282ee20..6c22423fff 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 6c22423fff..ddf4e2feb7 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index ddf4e2feb7..4686776209 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 4686776209..8f85e0fb40 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 8f85e0fb40..2a9197aec2 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 2a9197aec2..fe9c5dc28d 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index fe9c5dc28d..edc2ed8739 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index edc2ed8739..4ef16aa3a6 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 4ef16aa3a6..bf5588ad55 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index bf5588ad55..b1815e9011 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index b1815e9011..65d8ac5fd7 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 65d8ac5fd7..e816f359a6 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 From 5f37b11f2c300a95e0e9e34517c5c29a3345be83 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 9 Aug 2016 11:03:12 +0100 Subject: changed order of bottom row of symbol layer to ease acess to brackets --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index a747dcb159..ed187df1da 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------. * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | ~ | | | + | [ | { | } | ] | = | \ | ` | | + * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYMB] = { {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC }, {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, - {_______, KC_TILD, KC_PIPE, KC_PLUS, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_EQL, KC_BSLS, KC_GRV, _______}, + {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From 725dd7328f9963959f72318af912ed66f5a5f513 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 9 Aug 2016 11:09:52 +0100 Subject: updated readme.md to reflect keymap changes --- keyboards/planck/keymaps/callum/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index d4f3449f15..030def7f77 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -31,9 +31,9 @@ On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ti None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. ## The `SYMB` layer -![](http://i.imgur.com/iuU144Y.png) +![](http://i.imgur.com/thh1ne2.png) -The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, with brackets in the centre; then normally shifted symbols to the left, and non shifted to the right, in order of most to least used. +The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. `esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand. -- cgit v1.2.3 From 993d72b11fca8d50296570dc85e9354f8045c4a6 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 12 Aug 2016 21:05:52 +0100 Subject: added a lock screen key --- keyboards/planck/keymaps/callum/keymap.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index ed187df1da..494ed30b06 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -20,7 +20,8 @@ enum planck_keycodes { BASE = SAFE_RANGE, MOVE, SYMB, - FUNC + FUNC, + LOCK }; // Fillers to make layering more clear @@ -87,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |-----------------------------------------------------------------------------------. - * | | Play | Prev | Next | BL+ | | | | | | | | + * | | Play | Prev | Next | BL+ | | | Lock | | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | Mute | Vol- | Vol+ | BL- | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -96,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______}, {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } @@ -133,6 +134,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case LOCK: + if (record->event.pressed) { + register_code(KC_RSFT); + register_code(KC_RGUI); + register_code(KC_POWER); + } else { + unregister_code(KC_POWER); + unregister_code(KC_RGUI); + unregister_code(KC_RSFT); + } + return false; + break; } return true; } -- cgit v1.2.3 From f512179e66e4d4dfbcc92c6ba1aaa1b6cf1ef12b Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 24 Aug 2016 13:17:01 +0200 Subject: ergodox: Update algernon's keymap to v1.6 Major changes include: Base layer changes ------------------ * The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. * The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`. * The `Apps` key has been replaced by `F12`. * The `-`/`_` is no longer a tap-dance key. ADORE layer changes ------------------- * Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations. 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* 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 ------- * The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. * The heatmap generator received a lot of updates. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/Makefile | 9 +- .../keymaps/algernon/images/adore-layer.png | Bin 93748 -> 93893 bytes .../ergodox/keymaps/algernon/images/base-layer.png | Bin 95222 -> 95204 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 494 +++++++----------- keyboards/ergodox/keymaps/algernon/readme.md | 67 ++- .../algernon/tools/heatmap-adore-layout.json | 533 -------------------- .../algernon/tools/heatmap-base-layout.json | 533 -------------------- .../algernon/tools/heatmap-layout.ADORE.json | 553 +++++++++++++++++++++ .../algernon/tools/heatmap-layout.Dvorak.json | 542 ++++++++++++++++++++ .../keymaps/algernon/tools/log-to-heatmap.py | 368 +++++++++----- 10 files changed, 1564 insertions(+), 1535 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json delete mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json create mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json create mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile index 00194857ac..7c2b3ad97c 100644 --- a/keyboards/ergodox/keymaps/algernon/Makefile +++ b/keyboards/ergodox/keymaps/algernon/Makefile @@ -1,22 +1,23 @@ BOOTMAGIC_ENABLE=no COMMAND_ENABLE=no SLEEP_LED_ENABLE=no -UNICODE_ENABLE=no FORCE_NKRO ?= yes DEBUG_ENABLE = no CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes KEYLOGGER_ENABLE ?= yes +UCIS_ENABLE = yes +MOUSEKEY_ENABLE ?= yes -ADORE_AUTOLOG ?= no +AUTOLOG_ENABLE ?= no ifeq (${FORCE_NKRO},yes) OPT_DEFS += -DFORCE_NKRO endif -ifeq (${ADORE_AUTOLOG},yes) +ifeq (${AUTOLOG_ENABLE},yes) KEYLOGGER_ENABLE = yes -OPT_DEFS += -DADORE_AUTOLOG +OPT_DEFS += -DAUTOLOG_ENABLE endif ifeq (${KEYLOGGER_ENABLE},yes) diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index 44ad8a1eb7..3d0a5fb20c 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 da159fbe2e..7ea57aae38 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/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 144030e2e9..9f476d8a6b 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -2,6 +2,7 @@ * algernon's ErgoDox EZ layout, please see the readme.md file! */ +#include #include "ergodox.h" #include "led.h" #include "debug.h" @@ -33,7 +34,6 @@ enum { // Buttons that do extra stuff A_GUI, A_PLVR, - A_ESC, A_MPN, // Function / number keys @@ -47,7 +47,6 @@ enum { KF_8, KF_9, KF_10, - KF_11, // =, F11 // Application select keys APP_SLK, // Slack @@ -62,6 +61,11 @@ enum { A_MDL, A_MDR, + // Mouse acceleration + A_ACL0, + A_ACL1, + A_ACL2, + // Hungarian layer keys HU_AA, // Á HU_OO, // Ó @@ -89,7 +93,6 @@ enum { enum { CT_CLN = 0, - CT_MNS, CT_TA, CT_LBP, CT_RBP @@ -102,7 +105,11 @@ uint16_t gui_timer = 0; uint16_t kf_timers[12]; #if KEYLOGGER_ENABLE +# ifdef AUTOLOG_ENABLE +bool log_enable = true; +# else bool log_enable = false; +# endif #endif bool time_travel = false; @@ -114,12 +121,12 @@ 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 | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | 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 | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | ~ | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | \ | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ~ | ' | , | . | 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 | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | @@ -135,21 +142,21 @@ 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 ,KC_LBRC +,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 ,KC_LPRN +,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) ,F(F_ALT),F(F_GUI) ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),M(A_ESC) + ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_APP ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS + ,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_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP - ,TD(CT_MNS),KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_MINS ,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 @@ -159,13 +166,13 @@ 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 | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | 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 | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | `~ | X | W | K | L | M | ( | | ) | F | H | C | P | Y | \ | + * | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | : | | - | B | G | V | J | / | | + * | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | | | | | | | | * `-----------------------------------' `-----------------------------------' @@ -180,20 +187,20 @@ 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_X ,KC_W ,KC_K ,KC_L ,KC_M ,TD(CT_LBP) +,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 ,F(F_ALT),F(F_GUI) ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),M(A_ESC) + ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_APP ,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_Y ,KC_BSLS + ,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 - ,TD(CT_MNS),KC_B ,KC_G ,KC_V ,KC_J ,KC_SLSH ,KC_NO + ,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL @@ -363,14 +370,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [NMDIA] = KEYMAP( // left hand - KC_ACL0 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) -,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO -,KC_ACL2 ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO + 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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLU ,KC_VOLD - ,KC_SPC,KC_ENTER,M(A_ESC) + ,KC_SPC,KC_ENTER,KC_ESC // right hand ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -439,7 +446,7 @@ const uint16_t PROGMEM fn_actions[] = { ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) }; -void toggle_steno(int pressed) +static void toggle_steno(int pressed) { uint8_t layer = biton32(layer_state); @@ -462,7 +469,7 @@ void toggle_steno(int pressed) } } -macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) +static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) { uint8_t need_shift = 0; uint8_t hold_shift = 0; @@ -507,46 +514,43 @@ macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) return MACRO_NONE; } -void ang_handle_kf (keyrecord_t *record, uint8_t id) +static bool from_appsel; + +static void ang_handle_kf (keyrecord_t *record, uint8_t id) { uint8_t code = id - KF_1; if (record->event.pressed) { kf_timers[code] = timer_read (); } else { - uint8_t kc; + uint8_t kc_base; - if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) { + if (from_appsel) { + from_appsel = false; + return; + } + + if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) { // Long press - kc = KC_F1 + code; + kc_base = KC_F1; } else { - if (id == KF_11) - kc = KC_EQL; - else - kc = KC_1 + code; + kc_base = KC_1; } + kf_timers[code] = 0; + code += kc_base; - register_code (kc); - unregister_code (kc); + register_code (code); + unregister_code (code); } } +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) { - case A_ESC: - if (record->event.pressed) { - if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { - clear_oneshot_mods (); - } else { - register_code (KC_ESC); - } - layer_off (HUN); - } else { - unregister_code (KC_ESC); - } - break; - case A_MPN: if (record->event.pressed) { if (keyboard_report->mods & MOD_BIT(KC_LSFT) || @@ -588,6 +592,7 @@ 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) { @@ -633,6 +638,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 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); @@ -663,22 +686,34 @@ 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); 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); case APP_TERM: - return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END); + 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); + } + break; case APP_CHRM: + from_appsel = true; return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); 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); /* Function keys */ - case KF_1 ... KF_11: + case KF_1 ... KF_10: ang_handle_kf (record, id); break; } @@ -686,12 +721,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; -uint8_t is_adore = 0; +static uint8_t is_adore = 0; // Runs just one time when the keyboard initializes. void matrix_init_user(void) { uint8_t dl; + set_unicode_input_mode(UC_LNX); + ergodox_led_all_on(); for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { ergodox_led_all_set (i); @@ -709,120 +746,38 @@ void matrix_init_user(void) { dl = eeconfig_read_default_layer (); if (dl == (1UL << ADORE)) { is_adore = 1; -#if ADORE_AUTOLOG - log_enable = true; -#endif } }; LEADER_EXTERNS(); -void ang_do_unicode (void) { - register_code (KC_RCTL); - register_code (KC_RSFT); - register_code (KC_U); - unregister_code (KC_U); - unregister_code (KC_RSFT); - unregister_code (KC_RCTL); - wait_ms (100); -} +static void ang_tap (uint8_t code, ...) { + uint8_t kc = code; + va_list ap; -void ang_tap (uint16_t codes[]) { - for (int i = 0; codes[i] != 0; i++) { - register_code (codes[i]); - unregister_code (codes[i]); - wait_ms (50); - } + va_start(ap, code); + + do { + register_code(kc); + unregister_code(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); } #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) -void ang_tap_dance_bp_finished (qk_tap_dance_state_t *state, void *user_data) { - bool left, parens; - - if (state->count > 2) { - state->count = 0; - return; - } - - if (state->keycode == TD(CT_LBP)) - left = true; - else - left = false; - - if (state->count == 1) - parens = false; - else - parens = true; - - if (parens) { - register_code (KC_RSFT); - if (left) { - TAP_ONCE(KC_9); - } else { - TAP_ONCE(KC_0); - } - unregister_code (KC_RSFT); - } else { - if (left) { - TAP_ONCE (KC_LBRC); - } else { - TAP_ONCE (KC_RBRC); - } - } -} - -void ang_tap_dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_RSFT); - register_code (KC_SCLN); - } else if (state->count == 2) { - register_code (KC_SCLN); - } -} - -void ang_tap_dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_SCLN); - unregister_code (KC_RSFT); - } else if (state->count == 2) { - unregister_code (KC_SCLN); - } -} - -void ang_tap_dance_mns_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_MINS); - } else if (state->count == 2) { - register_code (KC_RSFT); - register_code (KC_MINS); - } -} - -void ang_tap_dance_mns_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_MINS); - } else if (state->count == 2) { - unregister_code (KC_RSFT); - unregister_code (KC_MINS); - } -} - typedef struct { bool layer_toggle; bool sticky; - bool finished_once; } td_ta_state_t; -void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { +static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - if (td_ta->finished_once) { - return; - } - if (td_ta->sticky) { td_ta->sticky = false; td_ta->layer_toggle = false; @@ -830,7 +785,6 @@ void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { return; } - td_ta->finished_once = true; if (state->count == 1 && !state->pressed) { register_code (KC_TAB); td_ta->sticky = false; @@ -842,35 +796,29 @@ void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { } } -void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { +static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; if (!td_ta->layer_toggle) unregister_code (KC_TAB); if (!td_ta->sticky) layer_off (ARRW); - - td_ta->finished_once = false; } qk_tap_dance_action_t tap_dance_actions[] = { - [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset) - ,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset) + [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) ,[CT_TA] = { .fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset }, - .user_data = (void *)&((td_ta_state_t) { false, false, false }) + .user_data = (void *)&((td_ta_state_t) { false, false }) } - ,[CT_LBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished) - ,[CT_RBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished) + ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN) + ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) }; -static uint16_t uni[32]; -static uint8_t unicnt; -static bool unimagic = false; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); + bool is_arrow = false; if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) unregister_code (KC_LGUI); @@ -893,13 +841,19 @@ void matrix_scan_user(void) { ergodox_right_led_2_set (LED_BRIGHTNESS_HI); } + if (layer_state & (1UL << ARRW)) { + ergodox_right_led_1_on (); + ergodox_right_led_3_on (); + is_arrow = true; + } + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { ergodox_right_led_1_set (LED_BRIGHTNESS_HI); ergodox_right_led_1_on (); } else { ergodox_right_led_1_set (LED_BRIGHTNESS_LO); - if (layer != NMDIA && layer != PLVR && layer != ADORE) + if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) ergodox_right_led_1_off (); } @@ -919,7 +873,7 @@ void matrix_scan_user(void) { ergodox_right_led_3_on (); } else { ergodox_right_led_3_set (LED_BRIGHTNESS_LO); - if (layer != HUN && layer != PLVR && layer != ADORE) + if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) ergodox_right_led_3_off (); } @@ -936,20 +890,17 @@ void matrix_scan_user(void) { } #endif + SEQ_ONE_KEY (KC_Q) { + register_code16 (LCTL(KC_1)); + unregister_code16 (LCTL(KC_1)); + } + SEQ_ONE_KEY (KC_T) { time_travel = !time_travel; } SEQ_ONE_KEY (KC_U) { - ang_do_unicode (); - } - - SEQ_TWO_KEYS (KC_LEAD, KC_U) { - unicnt = 0; - unimagic = true; - register_code(KC_RSFT); - TAP_ONCE(KC_U); - unregister_code(KC_RSFT); + qk_ucis_start(); } SEQ_ONE_KEY (KC_V) { @@ -958,25 +909,23 @@ void matrix_scan_user(void) { SEQ_ONE_KEY (KC_L) { /* λ */ - ang_do_unicode (); - - uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0}; - ang_tap (codes); + unicode_input_start(); + register_hex(0x03bb); + unicode_input_finish(); } SEQ_ONE_KEY (KC_Y) { - uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0}; - ang_tap (codes); + ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); } SEQ_ONE_KEY (KC_S) { - ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); TAP_ONCE (KC_BSLS); register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); TAP_ONCE (KC_SLSH); - ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); } SEQ_TWO_KEYS (KC_W, KC_M) { @@ -987,8 +936,7 @@ void matrix_scan_user(void) { wait_ms (1000); - uint16_t codes[] = {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}; - ang_tap (codes); + 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); @@ -1013,13 +961,7 @@ void matrix_scan_user(void) { ergodox_right_led_2_off (); wait_ms (100); ergodox_right_led_1_off (); -#if ADORE_AUTOLOG - log_enable = true; -#endif } else { -#if ADORE_AUTOLOG - log_enable = false; -#endif is_adore = 0; default_layer_and (0); default_layer_or (1UL << BASE); @@ -1043,140 +985,38 @@ void matrix_scan_user(void) { static uint16_t last4[4]; -bool is_uni_seq(char *seq) { - uint8_t i; - - for (i = 0; seq[i]; i++) { - uint16_t code; - if (('1' <= seq[i]) && (seq[i] <= '9')) - code = seq[i] - '1' + KC_1; - else if (seq[i] == '0') - code = KC_0; - else - code = seq[i] - 'a' + KC_A; - - if (i > unicnt) - return false; - if (uni[i] != code) - return false; - } - - if (uni[i] == KC_ENT || uni[i] == KC_SPC) - return true; - - return false; -} - -uint16_t hex_to_keycode(uint8_t hex) -{ - if (hex == 0x0) { - return KC_0; - } else if (hex < 0xA) { - return KC_1 + (hex - 0x1); - } else { - return KC_A + (hex - 0xA); - } -} - -void register_hex(uint16_t hex) { - bool leading_zeros = true; - - for(int i = 3; i >= 0; i--) { - uint8_t digit = ((hex >> (i*4)) & 0xF); - if (digit != 0) - leading_zeros = false; - else if (leading_zeros) - continue; - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - wait_ms(10); - } -} - -typedef struct { - char *symbol; - uint16_t codes[4]; -} qk_ucis_symbol_t; - -static qk_ucis_symbol_t ucis_symbol_table[] = { - {"poop", {0x1, 0xf4a9, 0}}, - {"rofl", {0x1, 0xf923, 0}}, - {"kiss", {0x1, 0xf619, 0}}, - {"snowman", {0x2603, 0}}, - {NULL, {}} -}; - -bool process_record_ucis (uint16_t keycode, keyrecord_t *record) { - uint8_t i; - - if (!unimagic) - return true; - - if (!record->event.pressed) - return true; - - uni[unicnt] = keycode; - unicnt++; - - if (keycode == KC_BSPC) { - if (unicnt >= 2) { - unicnt-= 2; - return true; - } else { - unicnt--; - return false; - } - } - - if (keycode == KC_ENT || keycode == KC_SPC) { - bool symbol_found = false; - - for (i = unicnt; i > 0; i--) { - register_code (KC_BSPC); - unregister_code (KC_BSPC); - wait_ms(10); - } - - ang_do_unicode(); - wait_ms(10); - for (i = 0; ucis_symbol_table[i].symbol; i++) { - if (is_uni_seq (ucis_symbol_table[i].symbol)) { - symbol_found = true; - for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) { - register_hex(ucis_symbol_table[i].codes[j]); - } - break; - } - } - if (!symbol_found) { - for (i = 0; i < unicnt - 1; i++) { - uint8_t code; - - if (uni[i] > KF_1) - code = uni[i] - KF_1 + KC_1; - else - code = uni[i]; - TAP_ONCE(code); - wait_ms (10); - } - } - - unimagic = false; - return true; - } - return true; -} +const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE +( + UCIS_SYM("poop", 0x1f4a9), + UCIS_SYM("rofl", 0x1f923), + UCIS_SYM("kiss", 0x1f619), + UCIS_SYM("snowman", 0x2603), + UCIS_SYM("coffee", 0x2615), + UCIS_SYM("heart", 0x2764), + UCIS_SYM("bolt", 0x26a1) +); bool process_record_user (uint16_t keycode, keyrecord_t *record) { #if KEYLOGGER_ENABLE if (log_enable) { - xprintf ("KL: col=%d, row=%d\n", record->event.key.col, - record->event.key.row); + 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"); } #endif - if (!process_record_ucis (keycode, record)) - return false; + if (keycode == KC_ESC && record->event.pressed) { + bool queue = true; + + if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { + clear_oneshot_mods (); + queue = false; + } + if (layer_state & (1UL<event.pressed) { uint8_t p; @@ -1188,15 +1028,13 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) { last4[3] = keycode; if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) { - uint16_t codes[] = {KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0}; - ang_tap (codes); + ang_tap (KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0); register_code (KC_RSFT); register_code (KC_EQL); unregister_code (KC_EQL); unregister_code (KC_RSFT); - uint16_t codes2[] = {KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0}; - ang_tap (codes2); + ang_tap (KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0); return false; } @@ -1204,3 +1042,17 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) { return true; } + +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; + else + code = qk_ucis_state.codes[i]; + register_code(code); + unregister_code(code); + wait_ms (10); + } +} diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 26dfddbe6a..5e7adb3320 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -3,11 +3,15 @@ algernon's layout ======================= -This is an unconventional layout for the ErgoDox EZ. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox]. +This is an unconventional layout for the [ErgoDox EZ][ez]. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox]. + [ez]: https://ergodox-ez.com/ [blog-ergodox]: https://asylum.madhouse-project.org/blog/tags/ergodox/ -Some of the things in the layout only work when one uses Spacemacs and GNOME under Linux. Your mileage may vary. +Some of the things in the layout only work when one uses [Spacemacs][spacemacs] and [GNOME][gnome] under Linux. Your mileage may vary. + + [spacemacs]: http://spacemacs.org/ + [gnome]: https://www.gnome.org/ ## Table of Contents @@ -40,10 +44,10 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest * 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. * The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. -* When holding any of the **Arrow** layer keys, the arrow layer activates while the layer key is held. Tapping the key produces the normal key. +* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap. * Tapping the `:` key once yields `:`, tapping it twice yields `;`. +* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`. * The **Lead** key allows me to type in a sequence of keys, and trigger some actions: - - `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that does this. - `LEAD l` uses the unicode input method to enter a `λ`. - `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯` - `LEAD y` types `\o/`. @@ -52,7 +56,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest - `LEAD v` prints the firmware version, the keyboard and the keymap. - `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 LEAD u` enters the [Unicode symbol input][#unicode-symbol-input] mode. + - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. ## ADORE layer @@ -91,6 +95,7 @@ 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 **ARROW** layer is active, the *red* and *blue* ones are on. * For the [Steno layer](#steno-layer), all LEDs will be turned on. Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers use a stronger one, and modifiers override any layer preferences. For example, when on the one-handed layer, with the left side active (*red* light blinking), if `Shift` is on, the *red* light will be constantly on. @@ -116,7 +121,7 @@ This is an experimental feature, and may or may not work reliably. When the keypress logging functionality is enabled (by `LEAD d`), the keyboard will output a line every time a key is pressed, containing the position of the key in the matrix. This allows one to collect this information, and build analytics over it, such as a heat map, including dead keys too. -Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, simply point `tools/log-to-heatmap.py` to a base layout file (one is included in the `tools/` directory), and the key position log. The latter one can create by running `hid-listen`, and redirecting its output to a file. +Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, either pipe the output of `hid_listen` into it, or pipe it an already saved log, and it will save the results into files in an output directory (given on the command-line). See the output of `tools/log-to-heatmap.py --help` for more information. [kle]: http://www.keyboard-layout-editor.com/ @@ -151,7 +156,35 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the # Changelog -## v1.5 - 2016-08-12 +## v1.6 + +*2016-08-24* + +### Base layer changes + +* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. +* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. +* The `Apps` key has been replaced by `F12`. +* The `-`/`_` is no longer a tap-dance key. + +### ADORE layer changes + +* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. + +### 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. +* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. + +### Heatmap + +* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. +* The heatmap generator received a lot of updates. + +## v1.5 + +*2016-08-12* * The **1HAND** layer has been removed. * A `Delete` key is now available on the right thumb cluster. @@ -161,7 +194,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * On the **ARROW** layer, `Backspace` has been replaced by `Enter`. * There is some experimental support for entering Unicode symbols. -## v1.4 - 2016-07-29 +## v1.4 + +*2016-07-29* * When toggling the key logging on or off, the LEDs will do a little dance. * The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. @@ -169,14 +204,18 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * The `-`/`_` key was turned into a tap-dance key too. * There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. -## v1.3 - 2016-07-06 +## v1.3 + +*2016-07-06* * Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. * The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. * The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. * Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. -## v1.2 - 2016-06-22 +## v1.2 + +*2016-06-22* * The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). * The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. @@ -187,7 +226,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * 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. -## v1.1 - 2016-06-14 +## v1.1 + +*2016-06-14* * The keyboard starts in NKRO mode, bootmagic and other things are disabled. * A [Steno](#steno-layer) layer was added, to be used with Plover. @@ -201,7 +242,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the - `:` now inputs `;` when shifted. * `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers. -## v1.0 - 2016-05-26 +## v1.0 + +*2016-05-26* Initial version. diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json deleted file mode 100644 index 544f61ce87..0000000000 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json +++ /dev/null @@ -1,533 +0,0 @@ -[ - { - "backcolor": "#ffffff", - "name": "ErgoDox - algernon's layout: Heatmap", - "author": "Gergely Nagy ", - "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", - "switchMount": "cherry", - "switchBrand": "gateron", - "switchType": "KS-3-Tea", - "pcb": true, - "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" - }, - [ - { - "x": 3.5, - "c": "#a7d0db", - "fa": [ - 0, - 0, - 2 - ] - }, - "#\n3\nF3", - { - "x": 10.5, - "c": "#a7d0db", - "t": "#000000", - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - "*\n8\nF8" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "@\n2\nF2", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "$\n4\nF4", - { - "x": 8.5 - }, - "&\n7\nF7", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "(\n9\nF9" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "%\n5\nF5", - { - "c": "#f9cd31", - "a": 7, - "f": 2 - }, - "STENO", - { - "x": 4.5, - "f": 6 - }, - "", - { - "c": "#7adabd", - "a": 4, - "f": 3, - "fa": [ - 0, - 0, - 2 - ] - }, - "^\n6\nF6" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "f": 3, - "w": 1.5 - }, - "\n\n~\n`", - { - "t": "#0d0d0b" - }, - "!\n1\nF1", - { - "x": 14.5 - }, - ")\n0\nF10", - { - "a": 7, - "w": 1.5 - }, - "F11" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 6 - }, - "L", - { - "x": 10.5 - }, - "C" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", - "a": 4 - }, - ">\n.", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "a": 6 - }, - "W", - { - "x": 8.5 - }, - "H", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "P" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "M", - { - "c": "#93c9b7", - "a": 4, - "h": 1.5 - }, - "{\n[", - { - "x": 4.5, - "h": 1.5 - }, - "}\n]", - { - "c": "#7adabd", - "a": 6 - }, - "F" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", - "f": 6, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "a": 4, - "f": 3 - }, - "<\n,", - { - "x": 14.5, - "a": 6 - }, - "Y", - { - "a": 4, - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 6 - }, - "E", - { - "x": 10.5 - }, - "T" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "O", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "n": true - }, - "I", - { - "x": 8.5, - "n": true - }, - "R", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "N" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "U", - { - "x": 6.5 - }, - "D" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", - "fa": [ - 6 - ], - "w": 1.5 - }, - "\n\nTab", - { - "f": 3 - }, - "A", - { - "x": 14.5, - "f": 3 - }, - "S", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 6 - ], - "w": 1.5 - }, - "+\n=" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#93c9b7", - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "(", - { - "x": 4.5, - "h": 1.5 - }, - ")" - ], - [ - { - "y": -0.75, - "x": 3.5, - "c": "#a7d0db", - "a": 4, - "f": 3 - }, - "\"\n'", - { - "x": 10.5 - }, - "V" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "Z", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "K", - { - "x": 8.5 - }, - "G", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "J" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "X", - { - "x": 6.5 - }, - "B" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "f": 9, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "t": "#0d0d0b", - "a": 4, - "f": 3 - }, - "?\n/", - { - "x": 14.5, - "a": 6 - }, - "Q", - { - "c": "#ffb07b", - "t": "#000000", - "f": 9, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#d9dae0", - "g": true, - "a": 7, - "f": 3 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "", - { - "x": 1, - "c": "#d4872a", - "g": false, - "a": 5 - }, - ";\n:", - { - "x": 8.5 - }, - "_\n-", - { - "x": 1, - "c": "#d9dae0", - "g": true, - "a": 7 - }, - "" - ], - [ - { - "y": -0.75, - "x": 0.5 - }, - "", - {}, - "", - { - "x": 14.5 - }, - "", - {}, - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#f9cd31", - "g": false - }, - "Alt", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 9 - ] - }, - "\n\n\n" - ], - [ - { - "c": "#d4872a", - "a": 7, - "f": 9, - "h": 2 - }, - "", - { - "h": 2 - }, - "", - { - "c": "#f9cd31", - "f": 3 - }, - "Ctrl" - ], - [ - { - "x": 2, - "c": "#e26757" - }, - "ESC" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "MEDIA", - {}, - "1HAND" - ], - [ - { - "x": -3 - }, - "LEAD", - { - "c": "#d4872a", - "f": 9, - "h": 2 - }, - "", - { - "f": 3, - "h": 2 - }, - "SPC" - ], - [ - { - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "HUN" - ] -] diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json deleted file mode 100644 index 148bb1f23b..0000000000 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json +++ /dev/null @@ -1,533 +0,0 @@ -[ - { - "backcolor": "#ffffff", - "name": "ErgoDox - algernon's layout: Heatmap", - "author": "Gergely Nagy ", - "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", - "switchMount": "cherry", - "switchBrand": "gateron", - "switchType": "KS-3-Tea", - "pcb": true, - "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" - }, - [ - { - "x": 3.5, - "c": "#a7d0db", - "fa": [ - 0, - 0, - 2 - ] - }, - "#\n3\nF3", - { - "x": 10.5, - "c": "#a7d0db", - "t": "#000000", - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - "*\n8\nF8" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "@\n2\nF2", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "$\n4\nF4", - { - "x": 8.5 - }, - "&\n7\nF7", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "(\n9\nF9" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "%\n5\nF5", - { - "c": "#f9cd31", - "a": 7, - "f": 2 - }, - "STENO", - { - "x": 4.5, - "f": 6 - }, - "", - { - "c": "#7adabd", - "a": 4, - "f": 3, - "fa": [ - 0, - 0, - 2 - ] - }, - "^\n6\nF6" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "f": 3, - "w": 1.5 - }, - "\n\n~\n`", - { - "t": "#0d0d0b" - }, - "!\n1\nF1", - { - "x": 14.5 - }, - ")\n0\nF10", - { - "a": 7, - "w": 1.5 - }, - "F11" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 4 - }, - ">\n.", - { - "x": 10.5, - "a": 6 - }, - "C" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", - "a": 4 - }, - "<\n,", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "a": 6 - }, - "P", - { - "x": 8.5 - }, - "G", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "R" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "Y", - { - "c": "#93c9b7", - "a": 4, - "h": 1.5 - }, - "{\n[", - { - "x": 4.5, - "h": 1.5 - }, - "}\n]", - { - "c": "#7adabd", - "a": 6 - }, - "F" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", - "f": 6, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "a": 4, - "f": 3 - }, - "\"\n'", - { - "x": 14.5, - "a": 6 - }, - "L", - { - "a": 4, - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 6 - }, - "E", - { - "x": 10.5 - }, - "T" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "O", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "n": true - }, - "U", - { - "x": 8.5, - "n": true - }, - "H", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "N" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "I", - { - "x": 6.5 - }, - "D" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", - "fa": [ - 6 - ], - "w": 1.5 - }, - "\n\nTab", - { - "f": 3 - }, - "A", - { - "x": 14.5, - "f": 3 - }, - "S", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 6 - ], - "w": 1.5 - }, - "+\n=" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#93c9b7", - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "(", - { - "x": 4.5, - "h": 1.5 - }, - ")" - ], - [ - { - "y": -0.75, - "x": 3.5, - "c": "#a7d0db", - "a": 6 - }, - "J", - { - "x": 10.5 - }, - "W" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "Q", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "K", - { - "x": 8.5 - }, - "M", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "V" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "X", - { - "x": 6.5 - }, - "B" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "f": 9, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "t": "#0d0d0b", - "a": 4, - "f": 3 - }, - "?\n/", - { - "x": 14.5, - "a": 6 - }, - "Z", - { - "c": "#ffb07b", - "t": "#000000", - "f": 9, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#d9dae0", - "g": true, - "a": 7, - "f": 3 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "", - { - "x": 1, - "c": "#d4872a", - "g": false, - "a": 5 - }, - ";\n:", - { - "x": 8.5 - }, - "_\n-", - { - "x": 1, - "c": "#d9dae0", - "g": true, - "a": 7 - }, - "" - ], - [ - { - "y": -0.75, - "x": 0.5 - }, - "", - {}, - "", - { - "x": 14.5 - }, - "", - {}, - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#f9cd31", - "g": false - }, - "Alt", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 9 - ] - }, - "\n\n\n" - ], - [ - { - "c": "#d4872a", - "a": 7, - "f": 9, - "h": 2 - }, - "", - { - "h": 2 - }, - "", - { - "c": "#f9cd31", - "f": 3 - }, - "Ctrl" - ], - [ - { - "x": 2, - "c": "#e26757" - }, - "ESC" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "MEDIA", - {}, - "1HAND" - ], - [ - { - "x": -3 - }, - "LEAD", - { - "c": "#d4872a", - "f": 9, - "h": 2 - }, - "", - { - "f": 3, - "h": 2 - }, - "SPC" - ], - [ - { - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "HUN" - ] -] diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json new file mode 100644 index 0000000000..4dfa877a78 --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -0,0 +1,553 @@ +[ + { + "backcolor": "#ffffff", + "name": "ErgoDox - algernon's layout: Heatmap", + "author": "Gergely Nagy ", + "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", + "switchMount": "cherry", + "switchBrand": "gateron", + "switchType": "KS-3-Tea", + "pcb": true, + "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" + }, + [ + { + "x": 3.5, + "c": "#a7d0db", + "fa": [ + 0, + 0, + 2 + ] + }, + "#\n3\nF3", + { + "x": 10.5, + "c": "#a7d0db", + "t": "#000000", + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + }, + "*\n8\nF8" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "@\n2\nF2", + { + "x": 1, + "c": "#7adabd", + "t": "#000000" + }, + "$\n4\nF4", + { + "x": 8.5 + }, + "&\n7\nF7", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "(\n9\nF9" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "%\n5\nF5", + { + "c": "#f9cd31", + "a": 7, + "f": 2 + }, + "STENO", + { + "x": 4.5, + "f": 3 + }, + "F12", + { + "c": "#7adabd", + "a": 4, + "f": 3, + "fa": [ + 0, + 0, + 2 + ] + }, + "^\n6\nF6" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "f": 9, + "a": 6, + "w": 1.5 + }, + "\n\n", + { + "t": "#0d0d0b", + "f": 3, + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + }, + "!\n1\nF1", + { + "x": 14.5 + }, + ")\n0\nF10", + { + "a": 7, + "w": 1.5 + }, + "F11" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 6 + }, + "G", + { + "x": 10.5 + }, + "C" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b", + "a": 6 + }, + "W", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "a": 6 + }, + "L", + { + "x": 8.5 + }, + "H", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "P" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "M", + { + "c": "#93c9b7", + "a": 4, + "fa": [0, 0, 0], + "h": 1.5 + }, + "{\n(\n[", + { + "x": 4.5, + "h": 1.5 + }, + "}\n)\n]", + { + "c": "#7adabd", + "a": 6 + }, + "F" + ], + [ + { + "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": 14.5, + "a": 6 + }, + "X", + { + "a": 4, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 6 + }, + "E", + { + "x": 10.5 + }, + "T" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "O", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "n": true + }, + "I", + { + "x": 8.5, + "n": true + }, + "R", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "N" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "U", + { + "x": 6.5 + }, + "D" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "t": "#0d0d0b", + "fa": [ + 6 + ], + "w": 1.5 + }, + "\n\nTab", + { + "f": 3 + }, + "A", + { + "x": 14.5, + "f": 3 + }, + "S", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6 + ], + "w": 1.5 + }, + "+\n=" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#93c9b7", + "t": "#000000", + "h": 1.5 + }, + ";\n:", + { + "x": 4.5, + "h": 1.5 + }, + "_\n-" + ], + [ + { + "y": -0.75, + "x": 3.5, + "c": "#a7d0db", + "a": 4, + "f": 3 + }, + "\"\n'", + { + "x": 10.5, + "a": 6, + "f": 3 + }, + "V" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b", + "a": 6 + }, + "Q", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "a": 4 + }, + "<\n,", + { + "x": 8.5, + "a": 6 + }, + "K", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "J" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000", + "a": 4 + }, + ">\n.", + { + "x": 6.5, + "a": 6 + }, + "B" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "f": 9, + "w": 1.5, + "g": true + }, + "", + { + "c": "#ffb2d2", + "t": "#0d0d0b", + "a": 6, + "f": 3, + "g": false + }, + "Z", + { + "x": 14.5, + "a": 4 + }, + "?\n/", + { + "c": "#ffb07b", + "t": "#000000", + "f": 9, + "g": true, + "w": 1.5, + "a": 4 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#d9dae0", + "g": true, + "a": 7, + "f": 3 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "", + { + "x": 1, + "c": "#d4872a", + "g": true, + "a": 5 + }, + "", + { + "x": 8.5 + }, + "", + { + "x": 1, + "c": "#d9dae0", + "g": true, + "a": 7 + }, + "" + ], + [ + { + "y": -0.75, + "x": 0.5 + }, + "", + {}, + "", + { + "x": 14.5 + }, + "", + {}, + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#f9cd31", + "g": false + }, + "Alt", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 9 + ] + }, + "\n\n\n" + ], + [ + { + "c": "#d4872a", + "a": 7, + "f": 9, + "h": 2 + }, + "", + { + "h": 2 + }, + "", + { + "c": "#f9cd31", + "f": 3 + }, + "Ctrl" + ], + [ + { + "x": 2, + "c": "#e26757" + }, + "ESC" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "MEDIA", + {}, + "DEL" + ], + [ + { + "x": -3 + }, + "HUN", + { + "c": "#d4872a", + "f": 9, + "h": 2 + }, + "", + { + "f": 3, + "h": 2 + }, + "SPC" + ], + [ + { + "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 new file mode 100644 index 0000000000..1248d36af7 --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json @@ -0,0 +1,542 @@ +[ + { + "backcolor": "#ffffff", + "name": "ErgoDox - algernon's layout: Heatmap", + "author": "Gergely Nagy ", + "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", + "switchMount": "cherry", + "switchBrand": "gateron", + "switchType": "KS-3-Tea", + "pcb": true, + "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" + }, + [ + { + "x": 3.5, + "c": "#a7d0db", + "fa": [ + 0, + 0, + 2 + ] + }, + "#\n3\nF3", + { + "x": 10.5, + "c": "#a7d0db", + "t": "#000000", + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + }, + "*\n8\nF8" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "@\n2\nF2", + { + "x": 1, + "c": "#7adabd", + "t": "#000000" + }, + "$\n4\nF4", + { + "x": 8.5 + }, + "&\n7\nF7", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "(\n9\nF9" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "%\n5\nF5", + { + "c": "#f9cd31", + "a": 7, + "f": 2 + }, + "STENO", + { + "x": 4.5, + "f": 3 + }, + "F12", + { + "c": "#7adabd", + "a": 4, + "f": 3, + "fa": [ + 0, + 0, + 2 + ] + }, + "^\n6\nF6" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "f": 6, + "a": 6, + "w": 1.5 + }, + "\n\n", + { + "f": 3, + "t": "#0d0d0b", + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + + }, + "!\n1\nF1", + { + "x": 14.5 + }, + ")\n0\nF10", + { + "a": 7, + "w": 1.5 + }, + "F11" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 4 + }, + ">\n.", + { + "x": 10.5, + "a": 6 + }, + "C" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b", + "a": 4 + }, + "<\n,", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "a": 6 + }, + "P", + { + "x": 8.5 + }, + "G", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "R" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "Y", + { + "c": "#93c9b7", + "a": 4, + "h": 1.5 + }, + "{\n(\n[", + { + "x": 4.5, + "h": 1.5 + }, + "}\n)\n]", + { + "c": "#7adabd", + "a": 6 + }, + "F" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "t": "#0d0d0b", + "f": 3, + "w": 1.5 + }, + "\n\n~\n`", + { + "c": "#ffb2d2", + "a": 4, + "f": 3 + }, + "\"\n'", + { + "x": 14.5, + "a": 6 + }, + "L", + { + "a": 4, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 6 + }, + "E", + { + "x": 10.5 + }, + "T" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "O", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "n": true + }, + "U", + { + "x": 8.5, + "n": true + }, + "H", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "N" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "I", + { + "x": 6.5 + }, + "D" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "t": "#0d0d0b", + "fa": [ + 6 + ], + "w": 1.5 + }, + "\n\nTab", + { + "f": 3 + }, + "A", + { + "x": 14.5, + "f": 3 + }, + "S", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6 + ], + "w": 1.5 + }, + "+\n=" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#93c9b7", + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "(", + { + "x": 4.5, + "h": 1.5 + }, + ")" + ], + [ + { + "y": -0.75, + "x": 3.5, + "c": "#a7d0db", + "a": 6 + }, + "J", + { + "x": 10.5 + }, + "W" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "Q", + { + "x": 1, + "c": "#7adabd", + "t": "#000000" + }, + "K", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "V" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "X", + { + "x": 6.5 + }, + "B" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "f": 9, + "w": 1.5 + }, + "\n\n", + { + "c": "#ffb2d2", + "t": "#0d0d0b", + "a": 4, + "f": 3 + }, + "?\n/", + { + "x": 14.5, + "a": 6 + }, + "Z", + { + "c": "#ffb07b", + "t": "#000000", + "f": 9, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#d9dae0", + "g": true, + "a": 7, + "f": 3 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "", + { + "x": 1, + "c": "#d4872a", + "g": false, + "a": 5 + }, + ";\n:", + { + "x": 8.5 + }, + "_\n-", + { + "x": 1, + "c": "#d9dae0", + "g": true, + "a": 7 + }, + "" + ], + [ + { + "y": -0.75, + "x": 0.5 + }, + "", + {}, + "", + { + "x": 14.5 + }, + "", + {}, + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#f9cd31", + "g": false + }, + "Alt", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 9 + ] + }, + "\n\n\n" + ], + [ + { + "c": "#d4872a", + "a": 7, + "f": 9, + "h": 2 + }, + "", + { + "h": 2 + }, + "", + { + "c": "#f9cd31", + "f": 3 + }, + "Ctrl" + ], + [ + { + "x": 2, + "c": "#e26757" + }, + "ESC" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "MEDIA", + {}, + "DEL" + ], + [ + { + "x": -3 + }, + "LEAD", + { + "c": "#d4872a", + "f": 9, + "h": 2 + }, + "", + { + "f": 3, + "h": 2 + }, + "SPC" + ], + [ + { + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "HUN" + ] +] diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py index a13d12e81a..68585843be 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py +++ b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py @@ -3,143 +3,247 @@ import json import os import sys import re +import argparse from math import floor +from os.path import dirname + +class Heatmap(object): + coords = [ + [ + # Row 0 + [ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2], + [ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6], + ], + [ + # Row 1 + [ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2], + [ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6], + ], + [ + # Row 2 + [12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ], + [ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6], + ], + [ + # Row 3 + [17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0], + [13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6], + ], + [ + # Row 4 + [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], + [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], + ], + [ + # Row 5 + [ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2], + [24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ], + ], + ] + + def set_attr_at(self, block, n, attr, fn, val): + blk = self.heatmap[block][n] + if attr in blk: + blk[attr] = fn(blk[attr], val) + else: + blk[attr] = fn(None, val) + + def coord(self, col, row): + return self.coords[row][col] + + @staticmethod + def set_attr(orig, new): + return new + + def set_bg(self, (block, n), color): + 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(o, _count, _cap): + ns = 4 - o.count ("\n") + return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) + + if not cap: + cap = 1 + self.heatmap[block][n + 1] = _set_tap_info (self.heatmap[block][n + 1], count, cap) + + @staticmethod + def heatmap_color (v): + colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]] + fb = 0 + if v <= 0: + idx1, idx2 = 0, 0 + elif v >= 1: + idx1, idx2 = len(colors) - 1, len(colors) - 1 + else: + val = v * (len(colors) - 1) + idx1 = int(floor(val)) + idx2 = idx1 + 1 + fb = val - float(idx1) + + r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0] + 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) + + def __init__(self, layout): + self.log = {} + self.total = 0 + self.max_cnt = 0 + self.layout = layout + + def update_log(self, (c, r)): + if not (c, r) in self.log: + self.log[(c, r)] = 0 + self.log[(c, r)] = self.log[(c, r)] + 1 + self.total = self.total + 1 + if self.max_cnt < self.log[(c, r)]: + self.max_cnt = self.log[(c, r)] + + def get_heatmap(self): + with open("%s/heatmap-layout.%s.json" % (dirname(sys.argv[0]), self.layout), "r") as f: + self.heatmap = json.load (f) + + ## Reset colors + for row in self.coords: + for coord in row: + if coord != []: + self.set_bg (coord, "#d9dae0") + + for (c, r) in self.log: + coords = self.coord(c, r) + b, n = coords + cap = self.max_cnt + if cap == 0: + cap = 1 + v = float(self.log[(c, r)]) / cap + self.set_bg (coords, self.heatmap_color (v)) + self.set_tap_info (coords, self.log[(c, r)], self.total) + return self.heatmap + + def get_stats(self): + usage = [ + # left hand + [0, 0, 0, 0, 0], + # right hand + [0, 0, 0, 0, 0] + ] + finger_map = [0, 0, 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)] + 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)] + hand_usage = [0, 0] + for f in usage[0]: + hand_usage[0] = hand_usage[0] + f + for f in usage[1]: + hand_usage[1] = hand_usage[1] + f + + total = self.total + if total == 0: + total = 1 + stats = { + "hands": { + "left": { + "usage": float(hand_usage[0]) / total * 100, + "fingers": { + "0 - pinky": 0, + "1 - ring": 0, + "2 - middle": 0, + "3 - index": 0, + "4 - thumb": 0, + } + }, + "right": { + "usage": float(hand_usage[1]) / total * 100, + "fingers": { + "0 - thumb": 0, + "1 - index": 0, + "2 - middle": 0, + "3 - ring": 0, + "4 - 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'] + 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 + return stats + +def dump_all(out_dir, heatmaps): + for layer in heatmaps.keys(): + if len(heatmaps[layer].log) == 0: + continue -cr_coord_map = [ - [ - # Row 0 - [ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2], - [ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6], - ], - [ - # Row 1 - [ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2], - [ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6], - ], - [ - # Row 2 - [12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ], - [ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6], - ], - [ - # Row 3 - [17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0], - [13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6], - ], - [ - # Row 4 - [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], - [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], - ], - [ - # Row 5 - [ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2], - [24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ], - ], -] - -def set_attr_at(j, b, n, attr, fn, val): - blk = j[b][n] - if attr in blk: - blk[attr] = fn(blk[attr], val) - else: - blk[attr] = fn(None, val) - -def coord(col, row): - return cr_coord_map[row][col] - -def set_attr(orig, new): - return new - -def set_bg(j, (b, n), color): - set_attr_at(j, b, n, "c", set_attr, color) - #set_attr_at(j, b, n, "g", set_attr, False) - -def _set_tap_info(o, count, cap): - ns = 4 - o.count ("\n") - return o + "\n" * ns + "%.02f%%" % (float(count) / float(cap) * 100) - -def set_tap_info(j, (b, n), count, cap): - j[b][n + 1] = _set_tap_info (j[b][n + 1], count, cap) - -def heatmap_color (v): - colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]] - fb = 0 - if v <= 0: - idx1, idx2 = 0, 0 - elif v >= 1: - idx1, idx2 = len(colors) - 1, len(colors) - 1 - else: - val = v * (len(colors) - 1) - idx1 = int(floor(val)) - idx2 = idx1 + 1 - fb = val - float(idx1) - - r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0] - 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) - -# Load the keylog -def load_keylog(fname, restrict_row): - keylog = {} - total = 0 - with open(fname, "r") as f: - lines = f.readlines() - for line in lines: - m = re.search ('KL: col=(\d+), row=(\d+)', line) + 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, "" + +def main(opts): + + heatmaps = {"Dvorak": Heatmap("Dvorak"), + "ADORE": Heatmap("ADORE") + } + cnt = 0 + restrict_row = opts.restrict_row + out_dir = opts.outdir + + 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: continue - (c, r) = (int(m.group (2)), int(m.group (1))) - if restrict_row != None and r != int(restrict_row): + + 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 - if (c, r) in keylog: - keylog[(c, r)] = keylog[(c, r)] + 1 - else: - keylog[(c, r)] = 1 - total = total + 1 - return total / 2, keylog - -def l_flat(s): - f = s.split("\n") - return ", ".join (f) - -def main(base_fn, log_fn, restrict_row = None): - - with open(base_fn, "r") as f: - layout = json.load (f) - - ## Reset colors - for row in cr_coord_map: - for col in row: - if col != []: - set_bg (layout, col, "#d9dae0") - #set_attr_at (layout, col[0], col[1], "g", set_attr, True) - - total, log = load_keylog (log_fn, restrict_row) - max_cnt = 0 - for (c, r) in log: - max_cnt = max(max_cnt, log[(c, r)]) - - # Create the heatmap - for (c, r) in log: - coords = coord(c, r) - b, n = coords - cap = max_cnt - v = float(log[(c, r)]) / cap - print >> sys.stderr, "%s => %d/%d => %f = %s" % (l_flat(layout[b][n+1]), log[(c,r)], cap, v, heatmap_color(v)) - set_bg (layout, coord(c, r), heatmap_color (v)) - set_tap_info (layout, coord (c, r), log[(c, r)], total) - - print json.dumps(layout) -if __name__ == "__main__": - if len(sys.argv) < 3: - print """Log to Heatmap -- creates a heatmap out of keyboard logs + heatmaps[l].update_log ((c, r)) + + if opts.dump_interval != -1 and cnt >= opts.dump_interval: + cnt = 0 + dump_all(out_dir, heatmaps) -Usage: log-to-heatmap.py base-layout.json logfile [row] >layout.json""" - sys.exit (1) - main(*sys.argv[1:]) + dump_all (out_dir, heatmaps) + +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') + args = parser.parse_args() + main(args) -- cgit v1.2.3 From 9778349c4bfb6723ef056eb3473a7fc15c45c435 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Wed, 24 Aug 2016 17:47:01 -0400 Subject: More notes --- keyboards/planck/keymaps/cbbrowne/readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index fdb0997001..5af688bb17 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -67,12 +67,13 @@ doing sundry experimentation: * I use tmux quite a lot; the mollat keymap seems to have some interesting helpers. It might be interesting to add a "tmux - layer" + layer," or to have a few keys in a layer oriented towards that * The mollat tmux layer also suggests some thoughts about Emacs helpers. * I do not presently have anything that handles X11 screen switching, as with Control-Alt-various * I ought to probably look into KC_LEAD, to have some key combos that do not need to be concurrent - - + * The jeebak keymap seems to have some neat ideas: + - Number layer which is aggressive about having numbers in several places + - Touch layer seems interesting -- cgit v1.2.3 From 5b58d7d1458502ad52b7a8e2be52afab17dc51a5 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 21 Aug 2016 19:31:34 +0200 Subject: =?UTF-8?q?Disable=20debugging=20for=20Ergodox=20keymap=20?= =?UTF-8?q?=E2=80=9Ccoderkun=5Fneo2=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ergodox/keymaps/coderkun_neo2/Makefile | 1 + keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/Makefile b/keyboards/ergodox/keymaps/coderkun_neo2/Makefile index 6c0a79b110..b0fe90ab1d 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/Makefile +++ b/keyboards/ergodox/keymaps/coderkun_neo2/Makefile @@ -1,2 +1,3 @@ SLEEP_LED_ENABLE = no UNICODE_ENABLE = yes +COMMAND_ENABLE = no diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index 2ac06eef85..90651956af 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -1,5 +1,4 @@ #include "ergodox.h" -#include "debug.h" #include "action_layer.h" #include "led.h" #include "keymap_extras/keymap_neo2.h" -- cgit v1.2.3 From c78b44fb18194fb130ec3c49c38abc5afb6fee34 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 21 Aug 2016 20:39:09 +0200 Subject: =?UTF-8?q?Set=20Unicode=20input=20mode=20and=20override=20unicode?= =?UTF-8?q?=5Finput=5Fstart()=20method=20to=20keymap=20=E2=80=9Ccoderkun?= =?UTF-8?q?=5Fneo2=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index 90651956af..b665a5f3ae 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -155,8 +155,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [FMU] = KEYMAP( // left hand KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2713),KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2715),KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2715),KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2713),KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_MS_L, KC_MS_U, @@ -244,6 +244,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // Runs just one time when the keyboard initializes. void matrix_init_user(void) { + set_unicode_input_mode(UC_LNX); }; @@ -278,3 +279,14 @@ void matrix_scan_user(void) } }; + + +// Override Unicode start method to use NEO_U instead of KC_U +void unicode_input_start (void) { + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(NEO_U); + unregister_code(NEO_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); +}; -- cgit v1.2.3 From 137eb118e352201f7d324743e34ed57e6885b689 Mon Sep 17 00:00:00 2001 From: coderkun Date: Fri, 26 Aug 2016 13:26:16 +0200 Subject: =?UTF-8?q?Add=20box-drawing=20Unicode=20characters=20to=20keymap?= =?UTF-8?q?=20=E2=80=9Ccoderkun=5Fneo2=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index b665a5f3ae..0eedecf3dd 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -137,11 +137,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤ - * │ │ │ │ │ ✕ │ │ │ │ │ │ F9 │ F10 │ F11 │ F12 │ │ + * │ │ ┌ │ ┬ │ ┐ │ ─ │ │ │ │ │ │ │ F9 │ F10 │ F11 │ F12 │ │ * ├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤ - * │ │ │ │ │ ✓ │ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │ + * │ │ ├ │ ┼ │ ┤ │ ✓ │ ✕ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │ * ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤ - * │ │ │ │ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ + * │ │ └ │ ┴ │ ┘ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ * └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘ * │ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │ * └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘ @@ -155,9 +155,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [FMU] = KEYMAP( // left hand KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2715),KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,UC(0x2713),KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS, + KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715), + KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_MS_L, KC_MS_U, KC_BTN1, -- cgit v1.2.3 From 8b2a235c8de7123187e0aa1dd950947f20a51f07 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 1 Sep 2016 18:14:39 +0100 Subject: changed order of modifiers after experimentation, updated readme --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- keyboards/planck/keymaps/callum/readme.md | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 494ed30b06..572756a383 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -38,14 +38,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | + * | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | * `-----------------------------------------------------------------------------------' */ [_BASE] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} + {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} }, /* MOVE diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 030def7f77..c7ad5d163c 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,24 +2,19 @@ This is a layout for the grid planck, built with a few ideals in mind. These ideals are just my opinion mind! The great thing about *qmk* is that we can all afford to have different opinions about what makes a good layout: -- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided --- since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. +- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), since otherwise certain long key combinations become hard to make. - Backspace should be in the “capslock position” as God intended. -- The keyboard should be usable without any firmware changes on any operating system. In my case that means it should work on *Windows* and *Linux* without any software modifications, while I can change the behaviour slightly on *macOS* in software since that’s my home OS. The images reflect the intended use on *macOS* **after** minor software tweaks; which will be noted. We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. ## The `BASE` layer -![](http://i.imgur.com/aEXOlWl.png) +![](http://i.imgur.com/tVNI3SE.png) This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. -The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneosly, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. - -The `ctrl`, `alt`, `cmd` cluster is asymmetric around the centre so that at least one of each of the modifiers can be reached with the thumbs. The intended use is to always hit the left `cmd` and the right `ctrl`, unless an awkward key combination dictates otherwise. - -In firmware `ctrl` and `cmd`/`GUI` are swapped with respect to the image above --- I swap them to the illustrated location when using *macOS* and leave them be for *Windows* and *Linux*. (so that `cmd-z,x,c,v,...` becomes `ctrl-z,x,c,v,...` saving me some confusion) +The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. ## The `MOVE` layer ![](http://i.imgur.com/KXRSuHT.png) @@ -40,9 +35,9 @@ The symbol layer has all the numbers and their usual corresponding symbols in th Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected. ## The `FUNC` layer -![](http://i.imgur.com/skxRZiH.png) +![](http://i.imgur.com/1VKFBBU.png) -The only thing of note here is that `bl+` and `bl-` are short for *backlight up* and *backlight down* respectively, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. +The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-cmd-power`.) ## Other changes from the default I have LEDs and sound disabled, simply because I have no need of them. \ No newline at end of file -- cgit v1.2.3 From 4c67ccc81ee8006190438c5f54cda871bcb2afa6 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 1 Sep 2016 18:30:49 +0100 Subject: changed some of the wording in the readme --- keyboards/planck/keymaps/callum/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index c7ad5d163c..2d38e6355a 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -1,11 +1,11 @@ # callum’s planck layout -This is a layout for the grid planck, built with a few ideals in mind. These ideals are just my opinion mind! The great thing about *qmk* is that we can all afford to have different opinions about what makes a good layout: +This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. +- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. -- There should be two of every modifier (one on each side), since otherwise certain long key combinations become hard to make. -- Backspace should be in the “capslock position” as God intended. +- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. +- Backspace should be in the “capslock position” in the colemak tradition. We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. -- cgit v1.2.3 From e4167c8c53b0cf7c68192bbe4db368785f24b970 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 2 Sep 2016 09:03:39 +0100 Subject: fixed incorrect key combination for locking screen on macOS --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- keyboards/planck/keymaps/callum/readme.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 572756a383..6c34311339 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -137,11 +137,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOCK: if (record->event.pressed) { register_code(KC_RSFT); - register_code(KC_RGUI); + register_code(KC_RCTL); register_code(KC_POWER); } else { unregister_code(KC_POWER); - unregister_code(KC_RGUI); + unregister_code(KC_RCTL); unregister_code(KC_RSFT); } return false; diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 2d38e6355a..b70de3f1e2 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -14,7 +14,7 @@ We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. -The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. +The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. ## The `MOVE` layer ![](http://i.imgur.com/KXRSuHT.png) @@ -37,7 +37,7 @@ Again none of the modifiers are overwritten so that shortcuts involving numbers ## The `FUNC` layer ![](http://i.imgur.com/1VKFBBU.png) -The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-cmd-power`.) +The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) ## Other changes from the default -I have LEDs and sound disabled, simply because I have no need of them. \ No newline at end of file +I have LEDs and sound disabled, simply because I have no need of them. -- cgit v1.2.3 From a485e13afeb06ae96616ef381b03ba213efc574c Mon Sep 17 00:00:00 2001 From: profet23 Date: Fri, 2 Sep 2016 16:16:06 -0400 Subject: Adding 80 Key Ergodox Support --- keyboards/ergodox80/Makefile | 5 + keyboards/ergodox80/config.h | 31 + keyboards/ergodox80/ergodox80.c | 0 keyboards/ergodox80/ergodox80.h | 5 + keyboards/ergodox80/ergodox80/190hotfix.sh | 19 + keyboards/ergodox80/ergodox80/Makefile | 3 + keyboards/ergodox80/ergodox80/config.h | 65 ++ keyboards/ergodox80/ergodox80/ergodox80.c | 85 +++ keyboards/ergodox80/ergodox80/ergodox80.h | 122 ++++ keyboards/ergodox80/ergodox80/i2cmaster.h | 178 ++++++ keyboards/ergodox80/ergodox80/matrix.c | 382 +++++++++++ keyboards/ergodox80/ergodox80/rules.mk | 76 +++ keyboards/ergodox80/ergodox80/twimaster.c | 208 ++++++ .../ergodox80/ergodox80/util/compile_keymap.py | 710 +++++++++++++++++++++ keyboards/ergodox80/ergodox80/util/readme.md | 3 + keyboards/ergodox80/keymaps/default/default.png | Bin 0 -> 193672 bytes .../ergodox80/keymaps/default/default_highres.png | Bin 0 -> 1459389 bytes keyboards/ergodox80/keymaps/default/keymap.c | 183 ++++++ keyboards/ergodox80/keymaps/default/readme.md | 10 + keyboards/ergodox80/readme.md | 165 +++++ keyboards/ergodox80/rules.mk | 28 + 21 files changed, 2278 insertions(+) create mode 100644 keyboards/ergodox80/Makefile create mode 100644 keyboards/ergodox80/config.h create mode 100644 keyboards/ergodox80/ergodox80.c create mode 100644 keyboards/ergodox80/ergodox80.h create mode 100755 keyboards/ergodox80/ergodox80/190hotfix.sh create mode 100644 keyboards/ergodox80/ergodox80/Makefile create mode 100644 keyboards/ergodox80/ergodox80/config.h create mode 100644 keyboards/ergodox80/ergodox80/ergodox80.c create mode 100644 keyboards/ergodox80/ergodox80/ergodox80.h create mode 100644 keyboards/ergodox80/ergodox80/i2cmaster.h create mode 100644 keyboards/ergodox80/ergodox80/matrix.c create mode 100644 keyboards/ergodox80/ergodox80/rules.mk create mode 100644 keyboards/ergodox80/ergodox80/twimaster.c create mode 100644 keyboards/ergodox80/ergodox80/util/compile_keymap.py create mode 100644 keyboards/ergodox80/ergodox80/util/readme.md create mode 100644 keyboards/ergodox80/keymaps/default/default.png create mode 100644 keyboards/ergodox80/keymaps/default/default_highres.png create mode 100644 keyboards/ergodox80/keymaps/default/keymap.c create mode 100644 keyboards/ergodox80/keymaps/default/readme.md create mode 100644 keyboards/ergodox80/readme.md create mode 100644 keyboards/ergodox80/rules.mk (limited to 'keyboards') diff --git a/keyboards/ergodox80/Makefile b/keyboards/ergodox80/Makefile new file mode 100644 index 0000000000..94fa847ff8 --- /dev/null +++ b/keyboards/ergodox80/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = ergodox80 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/ergodox80/config.h b/keyboards/ergodox80/config.h new file mode 100644 index 0000000000..5dd6daa15f --- /dev/null +++ b/keyboards/ergodox80/config.h @@ -0,0 +1,31 @@ +#ifndef KEYBOARDS_ERGODOX_CONFIG_H_ +#define KEYBOARDS_ERGODOX_CONFIG_H_ + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +#include "ergodox80/config.h" + + +#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80.h new file mode 100644 index 0000000000..ea40f4d455 --- /dev/null +++ b/keyboards/ergodox80/ergodox80.h @@ -0,0 +1,5 @@ +#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_ +#define KEYBOARDS_ERGODOX_ERGODOX_H_ +#include "ergodox80.h" + +#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */ diff --git a/keyboards/ergodox80/ergodox80/190hotfix.sh b/keyboards/ergodox80/ergodox80/190hotfix.sh new file mode 100755 index 0000000000..bdc3adce22 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/190hotfix.sh @@ -0,0 +1,19 @@ +#!/bin/bash +#a tool to fix broken keymaps as a result of pull request #190 +#changing the declaration of matrix_scan_user() and matrix_init_user() +# +#This script will save a copy of the specified keymap as keymap.c.bak +#and then create a new keymap.c with the definion corrected. +#this script must be run from the ergodox_ez directory +if [ $# -ne 1 ]; then + echo $0: usage: ./190hotfix keymap_name + exit 1 +fi + +echo Saving backup as ./keymaps/$1/keymap.c.bak ... +mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak + +echo Modifying ./keymaps/$1/keymap.c ... +cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c + +echo Complete! diff --git a/keyboards/ergodox80/ergodox80/Makefile b/keyboards/ergodox80/ergodox80/Makefile new file mode 100644 index 0000000000..191c6bb664 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/ergodox80/ergodox80/config.h b/keyboards/ergodox80/ergodox80/config.h new file mode 100644 index 0000000000..084a044ee1 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 ERGODOX_EZ_CONFIG_H +#define ERGODOX_EZ_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDox EZ +#define PRODUCT ErgoDox EZ +#define DESCRIPTION QMK keyboard firmware for Ergodox EZ + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_COLS 6 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* + * 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 +//#define DEBUG_MATRIX_SCAN_RATE + +#endif diff --git a/keyboards/ergodox80/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80/ergodox80.c new file mode 100644 index 0000000000..b21b1073b4 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/ergodox80.c @@ -0,0 +1,85 @@ +#include "ergodox80.h" +#include "i2cmaster.h" + +bool i2c_initialized = 0; +uint8_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") + TCCR1A = 0b10101001; // set and configure fast PWM + TCCR1B = 0b00001001; // set and configure fast PWM + + // (tied to Vcc for hardware convenience) + DDRB &= ~(1<<4); // set B(4) as input + PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins - C7, D4, D5, D7, E6 + // set as input with internal pull-ip enabled + DDRC &= ~(1<<7); + DDRD &= ~(1<<7 | 1<<5 | 1<<4); + DDRE &= ~(1<<6); + PORTC |= (1<<7); + PORTD |= (1<<7 | 1<<5 | 1<<4); + PORTE |= (1<<6); + + ergodox_blink_all_leds(); + + matrix_init_user(); +} + +void ergodox_blink_all_leds(void) +{ + ergodox_led_all_off(); + ergodox_led_all_set(LED_BRIGHTNESS_HI); + ergodox_right_led_1_on(); + _delay_ms(50); + ergodox_right_led_2_on(); + _delay_ms(50); + ergodox_right_led_3_on(); + _delay_ms(50); + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); + //ergodox_led_all_on(); + //_delay_ms(333); + ergodox_led_all_off(); +} + +uint8_t init_mcp23018(void) { + mcp23018_status = 0x20; + + // I2C subsystem + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized++; + _delay_ms(1000); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; + +out: + i2c_stop(); + + return mcp23018_status; +} + + diff --git a/keyboards/ergodox80/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80/ergodox80.h new file mode 100644 index 0000000000..8012b0a749 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/ergodox80.h @@ -0,0 +1,122 @@ +#ifndef ERGODOX_EZ_H +#define ERGODOX_EZ_H + +#include "quantum.h" +#include +#include +#include "i2cmaster.h" +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +extern uint8_t mcp23018_status; + +void init_ergodox(void); +void ergodox_blink_all_leds(void); +uint8_t init_mcp23018(void); +uint8_t ergodox_left_leds_update(void); + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + + +inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } +inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } +inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } +inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } +inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); } + +inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } +inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } +inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } +inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); } + +inline void ergodox_led_all_on(void) +{ + ergodox_board_led_on(); + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); +} + +inline void ergodox_led_all_off(void) +{ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +} + +inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } +inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } +inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } +inline void ergodox_right_led_set(uint8_t led, uint8_t n) { + (led == 1) ? (OCR1A = n) : + (led == 2) ? (OCR1B = n) : + (OCR1C = n); +} + +inline void ergodox_led_all_set(uint8_t n) +{ + ergodox_right_led_1_set(n); + ergodox_right_led_2_set(n); + ergodox_right_led_3_set(n); +} + +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k10, k20, k30, k40, KC_NO }, \ + { k01, k11, k21, k31, k41, k51 }, \ + { k02, k12, k22, k32, k42, k52 }, \ + { k03, k13, k23, k33, k43, k53 }, \ + { k04, k14, k24, k34, k44, k54 }, \ + { k05, k15, k25, k35, k45, k55 }, \ + { k06, k16, KC_NO, k36, k46, k56 }, \ + \ + { k07, k17, KC_NO, k37, k47, k57 }, \ + { k08, k18, k28, k38, k48, k58 }, \ + { k09, k19, k29, k39, k49, k59 }, \ + { k0A, k1A, k2A, k3A, k4A, k5A }, \ + { k0B, k1B, k2B, k3B, k4B, k5B }, \ + { k0C, k1C, k2C, k3C, k4C, k5C }, \ + { k0D, k1D, k2D, k3D, k4D, KC_NO } \ + } + +#endif diff --git a/keyboards/ergodox80/ergodox80/i2cmaster.h b/keyboards/ergodox80/ergodox80/i2cmaster.h new file mode 100644 index 0000000000..3917b9e6c0 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/i2cmaster.h @@ -0,0 +1,178 @@ +#ifndef _I2CMASTER_H +#define _I2CMASTER_H 1 +/************************************************************************* +* Title: C include file for the I2C master interface +* (i2cmaster.S or twimaster.c) +* Author: Peter Fleury http://jump.to/fleury +* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device +* Usage: see Doxygen manual +**************************************************************************/ + +#ifdef DOXYGEN +/** + @defgroup pfleury_ic2master I2C Master library + @code #include @endcode + + @brief I2C (TWI) Master Software Library + + Basic routines for communicating with I2C slave devices. This single master + implementation is limited to one bus master on the I2C bus. + + This I2c library is implemented as a compact assembler software implementation of the I2C protocol + which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). + Since the API for these two implementations is exactly the same, an application can be linked either against the + software I2C implementation or the hardware I2C implementation. + + Use 4.7k pull-up resistor on the SDA and SCL pin. + + Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module + i2cmaster.S to your target when using the software I2C implementation ! + + Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. + + @note + The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted + to GNU assembler and AVR-GCC C call interface. + Replaced the incorrect quarter period delays found in AVR300 with + half period delays. + + @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury + + @par API Usage Example + The following code shows typical usage of this library, see example test_i2cmaster.c + + @code + + #include + + + #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet + + int main(void) + { + unsigned char ret; + + i2c_init(); // initialize I2C library + + // write 0x75 to EEPROM address 5 (Byte Write) + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + i2c_write(0x05); // write address = 5 + i2c_write(0x75); // write value 0x75 to EEPROM + i2c_stop(); // set stop conditon = release bus + + + // read previously written value back from EEPROM address 5 + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + + i2c_write(0x05); // write address = 5 + i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode + + ret = i2c_readNak(); // read one byte from EEPROM + i2c_stop(); + + for(;;); + } + @endcode + +*/ +#endif /* DOXYGEN */ + +/**@{*/ + +#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 +#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" +#endif + +#include + +/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_READ 1 + +/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_WRITE 0 + + +/** + @brief initialize the I2C master interace. Need to be called only once + @param void + @return none + */ +extern void i2c_init(void); + + +/** + @brief Terminates the data transfer and releases the I2C bus + @param void + @return none + */ +extern void i2c_stop(void); + + +/** + @brief Issues a start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_start(unsigned char addr); + + +/** + @brief Issues a repeated start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_rep_start(unsigned char addr); + + +/** + @brief Issues a start condition and sends address and transfer direction + + If device is busy, use ack polling to wait until device ready + @param addr address and transfer direction of I2C device + @return none + */ +extern void i2c_start_wait(unsigned char addr); + + +/** + @brief Send one byte to I2C device + @param data byte to be transfered + @retval 0 write successful + @retval 1 write failed + */ +extern unsigned char i2c_write(unsigned char data); + + +/** + @brief read one byte from the I2C device, request more data from device + @return byte read from I2C device + */ +extern unsigned char i2c_readAck(void); + +/** + @brief read one byte from the I2C device, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_readNak(void); + +/** + @brief read one byte from the I2C device + + Implemented as a macro, which calls either i2c_readAck or i2c_readNak + + @param ack 1 send ack, request more data from device
+ 0 send nak, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_read(unsigned char ack); +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + + +/**@}*/ +#endif diff --git a/keyboards/ergodox80/ergodox80/matrix.c b/keyboards/ergodox80/ergodox80/matrix.c new file mode 100644 index 0000000000..c352924b52 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/matrix.c @@ -0,0 +1,382 @@ +/* + +Note for ErgoDox EZ customizers: Here be dragons! +This is not a file you want to be messing with. +All of the interesting stuff for you is under keymaps/ :) +Love, Erez + +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "ergodox80.h" +#include "i2cmaster.h" +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // initialize row and col + + mcp23018_status = init_mcp23018(); + + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + + matrix_init_kb(); + +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + +} + +uint8_t matrix_scan(void) +{ + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + wait_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(i); + if (matrix_debouncing[i] != cols) { + matrix_debouncing[i] = cols; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + wait_us(1); + // this should be wait_ms(1) but has been left as-is at EZ's request + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< http://jump.to/fleury +* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device with hardware TWI +* Usage: API compatible with I2C Software Library i2cmaster.h +**************************************************************************/ +#include +#include + +#include + + +/* define CPU frequency in Mhz here if not defined in Makefile */ +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +/* I2C clock in Hz */ +#define SCL_CLOCK 400000L + + +/************************************************************************* + Initialization of the I2C bus interface. Need to be called only once +*************************************************************************/ +void i2c_init(void) +{ + /* initialize TWI clock + * minimal values in Bit Rate Register (TWBR) and minimal Prescaler + * bits in the TWI Status Register should give us maximal possible + * I2C bus speed - about 444 kHz + * + * for more details, see 20.5.2 in ATmega16/32 secification + */ + + TWSR = 0; /* no prescaler */ + TWBR = 10; /* must be >= 10 for stable operation */ + +}/* i2c_init */ + + +/************************************************************************* + Issues a start condition and sends address and transfer direction. + return 0 = device accessible, 1= failed to access device +*************************************************************************/ +unsigned char i2c_start(unsigned char address) +{ + uint8_t twst; + + // send START condition + TWCR = (1<= 0: + if section['name'] == 'layout_config': + config.update(loads("\n".join( + section['code_lines'] + ))) + elif section['sub_name'].startswith('layer'): + layer_name = section['sub_name'] + config['layer_lines'][layer_name] = section['code_lines'] + + reset_section() + + def amend_section(line_index, line): + section['end_line'] = line_index + section['code_lines'].append(line) + + config = DEFAULT_CONFIG.copy() + config.update({ + 'layer_lines': collections.OrderedDict(), + 'macro_ids': {'UM'}, + 'unicode_macros': {}, + }) + + section = {} + reset_section() + + with io.open(path, encoding="utf-8") as fh: + for i, line in enumerate(fh): + if line.startswith("#"): + start_section(i, line) + elif line.startswith(" "): + amend_section(i, line[4:]) + else: + # TODO: maybe parse description + pass + + end_section() + assert 'layout' in config + return config + +# header file parsing + +IF0_RE = re.compile(r""" + ^ + #if 0 + $.*? + #endif +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +COMMENT_RE = re.compile(r""" + /\* + .*? + \*/" +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +def read_header_file(path): + with io.open(path, encoding="utf-8") as fh: + data = fh.read() + data, _ = COMMENT_RE.subn("", data) + data, _ = IF0_RE.subn("", data) + return data + + +def regex_partial(re_str_fmt, flags): + def partial(*args, **kwargs): + re_str = re_str_fmt.format(*args, **kwargs) + return re.compile(re_str, flags) + return partial + + +KEYDEF_REP = regex_partial(r""" + #define + \s + ( + (?:{}) # the prefixes + (?:\w+) # the key name + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +ENUM_RE = re.compile(r""" + ( + enum + \s\w+\s + \{ + .*? # the enum content + \} + ; + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +ENUM_KEY_REP = regex_partial(r""" + ( + {} # the prefixes + \w+ # the key name + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +def parse_keydefs(config, data): + prefix_options = "|".join(config['key_prefixes']) + keydef_re = KEYDEF_REP(prefix_options) + enum_key_re = ENUM_KEY_REP(prefix_options) + for match in keydef_re.finditer(data): + yield match.groups()[0] + + for enum_match in ENUM_RE.finditer(data): + enum = enum_match.groups()[0] + for key_match in enum_key_re.finditer(enum): + yield key_match.groups()[0] + + +def parse_valid_keys(config, out_path): + basepath = os.path.abspath(os.path.join(os.path.dirname(out_path))) + dirpaths = [] + subpaths = [] + while len(subpaths) < 6: + path = os.path.join(basepath, *subpaths) + dirpaths.append(path) + dirpaths.append(os.path.join(path, "tmk_core", "common")) + dirpaths.append(os.path.join(path, "quantum")) + subpaths.append('..') + + includes = set(config['keymaps_includes']) + includes.add("keycode.h") + + valid_keycodes = set() + for dirpath, include in it.product(dirpaths, includes): + include_path = os.path.join(dirpath, include) + if os.path.exists(include_path): + header_data = read_header_file(include_path) + valid_keycodes.update( + parse_keydefs(config, header_data) + ) + return valid_keycodes + + +# Keymap Parsing + +def iter_raw_codes(layer_lines, filler, separator): + filler_re = re.compile("[" + filler + " ]") + for line in layer_lines: + line, _ = filler_re.subn("", line.strip()) + if not line: + continue + codes = line.split(separator) + for code in codes[1:-1]: + yield code + + +def iter_indexed_codes(raw_codes, key_indexes): + key_rows = {} + key_indexes_flat = [] + + for row_index, key_indexes in enumerate(key_indexes): + for key_index in key_indexes: + key_rows[key_index] = row_index + key_indexes_flat.extend(key_indexes) + assert len(raw_codes) == len(key_indexes_flat) + for raw_code, key_index in zip(raw_codes, key_indexes_flat): + # we keep track of the row mostly for layout purposes + yield raw_code, key_index, key_rows[key_index] + + +LAYER_CHANGE_RE = re.compile(r""" + (DF|TG|MO)\(\d+\) +""", re.VERBOSE) + + +MACRO_RE = re.compile(r""" + M\(\w+\) +""", re.VERBOSE) + + +UNICODE_RE = re.compile(r""" + U[0-9A-F]{4} +""", re.VERBOSE) + + +NON_CODE = re.compile(r""" + ^[^A-Z0-9_]$ +""", re.VERBOSE) + + +def parse_uni_code(raw_code): + macro_id = "UC_" + ( + unicodedata.name(raw_code) + .replace(" ", "_") + .replace("-", "_") + ) + code = "M({})".format(macro_id) + uc_hex = "{:04X}".format(ord(raw_code)) + return code, macro_id, uc_hex + + +def parse_key_code(raw_code, key_prefixes, valid_keycodes): + if raw_code in valid_keycodes: + return raw_code + + for prefix in key_prefixes: + code = prefix + raw_code + if code in valid_keycodes: + return code + + +def parse_code(raw_code, key_prefixes, valid_keycodes): + if not raw_code: + return 'KC_TRNS', None, None + + if LAYER_CHANGE_RE.match(raw_code): + return raw_code, None, None + + if MACRO_RE.match(raw_code): + macro_id = raw_code[2:-1] + return raw_code, macro_id, None + + if UNICODE_RE.match(raw_code): + hex_code = raw_code[1:] + return parse_uni_code(chr(int(hex_code, 16))) + + if NON_CODE.match(raw_code): + return parse_uni_code(raw_code) + + code = parse_key_code(raw_code, key_prefixes, valid_keycodes) + return code, None, None + + +def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): + keymap = {} + raw_codes = list(iter_raw_codes( + layer_lines, config['filler'], config['separator'] + )) + indexed_codes = iter_indexed_codes(raw_codes, key_indexes) + key_prefixes = config['key_prefixes'] + for raw_code, key_index, row_index in indexed_codes: + code, macro_id, uc_hex = parse_code( + raw_code, key_prefixes, valid_keycodes + ) + # TODO: line numbers for invalid codes + err_msg = "Could not parse key '{}' on row {}".format( + raw_code, row_index + ) + assert code is not None, err_msg + # print(repr(raw_code), repr(code), macro_id, uc_hex) + if macro_id: + config['macro_ids'].add(macro_id) + if uc_hex: + config['unicode_macros'][macro_id] = uc_hex + keymap[key_index] = (code, row_index) + return keymap + + +def parse_keymaps(config, valid_keycodes): + keymaps = collections.OrderedDict() + key_indexes = config.get( + 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] + ) + # TODO: maybe validate key_indexes + + for layer_name, layer_lines, in config['layer_lines'].items(): + keymaps[layer_name] = parse_keymap( + config, key_indexes, layer_lines, valid_keycodes + ) + return keymaps + +# keymap.c output + +USERCODE = """ +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case L1: + ergodox_right_led_1_on(); + break; + case L2: + ergodox_right_led_2_on(); + break; + case L3: + ergodox_right_led_3_on(); + break; + case L4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case L5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + // case L6: + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + // case L7: + // ergodox_right_led_1_on(); + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + default: + ergodox_board_led_off(); + break; + } +}; +""" + +MACROCODE = """ +#define UC_MODE_WIN 0 +#define UC_MODE_LINUX 1 +#define UC_MODE_OSX 2 + +// TODO: allow default mode to be configured +static uint16_t unicode_mode = UC_MODE_WIN; + +uint16_t hextokeycode(uint8_t hex) {{ + if (hex == 0x0) {{ + return KC_P0; + }} + if (hex < 0xA) {{ + return KC_P1 + (hex - 0x1); + }} + return KC_A + (hex - 0xA); +}} + +void unicode_action_function(uint16_t hi, uint16_t lo) {{ + switch (unicode_mode) {{ + case UC_MODE_WIN: + register_code(KC_LALT); + + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LALT); + break; + case UC_MODE_LINUX: + register_code(KC_LCTL); + register_code(KC_LSFT); + + register_code(KC_U); + unregister_code(KC_U); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + case UC_MODE_OSX: + break; + }} +}} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ + if (!record->event.pressed) {{ + return MACRO_NONE; + }} + // MACRODOWN only works in this function + switch(id) {{ + case UM: + unicode_mode = (unicode_mode + 1) % 2; + break; +{macro_cases} +{unicode_macro_cases} + default: + break; + }} + return MACRO_NONE; +}}; +""" + + +UNICODE_MACRO_TEMPLATE = """ +case {macro_id}: + unicode_action_function(0x{hi:02x}, 0x{lo:02x}); + break; +""".strip() + + +def unicode_macro_cases(config): + for macro_id, uc_hex in config['unicode_macros'].items(): + hi = int(uc_hex, 16) >> 8 + lo = int(uc_hex, 16) & 0xFF + unimacro_keys = ", ".join( + "T({})".format( + "KP_" + digit if digit.isdigit() else digit + ) for digit in uc_hex + ) + yield UNICODE_MACRO_TEMPLATE.format( + macro_id=macro_id, hi=hi, lo=lo + ) + + +def iter_keymap_lines(keymap, row_indents=None): + col_widths = {} + col = 0 + # first pass, figure out the column widths + prev_row_index = None + for code, row_index in keymap.values(): + if row_index != prev_row_index: + col = 0 + if row_indents: + col = row_indents[row_index] + col_widths[col] = max(len(code), col_widths.get(col, 0)) + prev_row_index = row_index + col += 1 + + # second pass, yield the cell values + col = 0 + prev_row_index = None + for key_index in sorted(keymap): + code, row_index = keymap[key_index] + if row_index != prev_row_index: + col = 0 + yield "\n" + if row_indents: + for indent_col in range(row_indents[row_index]): + pad = " " * (col_widths[indent_col] - 4) + yield (" /*-*/" + pad) + col = row_indents[row_index] + else: + yield pad + yield " {}".format(code) + if key_index < len(keymap) - 1: + yield "," + # This will be yielded on the next iteration when + # we know that we're not at the end of a line. + pad = " " * (col_widths[col] - len(code)) + prev_row_index = row_index + col += 1 + + +def iter_keymap_parts(config, keymaps): + # includes + for include_path in config['keymaps_includes']: + yield '#include "{}"\n'.format(include_path) + + yield "\n" + + # definitions + for i, macro_id in enumerate(sorted(config['macro_ids'])): + yield "#define {} {}\n".format(macro_id, i) + + yield "\n" + + for i, layer_name in enumerate(config['layer_lines']): + yield '#define L{0:<3} {0:<5} // {1}\n'.format(i, layer_name) + + yield "\n" + + # keymaps + yield "const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n" + + for i, layer_name in enumerate(config['layer_lines']): + # comment + layer_lines = config['layer_lines'][layer_name] + prefixed_lines = " * " + " * ".join(layer_lines) + yield "/*\n{} */\n".format(prefixed_lines) + + # keymap codes + keymap = keymaps[layer_name] + row_indents = ROW_INDENTS.get(config['layout']) + keymap_lines = "".join(iter_keymap_lines(keymap, row_indents)) + yield "[L{0}] = KEYMAP({1}\n),\n".format(i, keymap_lines) + + yield "};\n\n" + + # no idea what this is for + yield "const uint16_t PROGMEM fn_actions[] = {};\n" + + # macros + yield MACROCODE.format( + macro_cases="", + unicode_macro_cases="\n".join(unicode_macro_cases(config)), + ) + + # TODO: dynamically create blinking lights + yield USERCODE + + +def main(argv=sys.argv[1:]): + if not argv or '-h' in argv or '--help' in argv: + print(__doc__) + return 0 + + in_path = os.path.abspath(argv[0]) + if not os.path.exists(in_path): + print("No such file '{}'".format(in_path)) + return 1 + + if len(argv) > 1: + out_path = os.path.abspath(argv[1]) + else: + dirname = os.path.dirname(in_path) + out_path = os.path.join(dirname, "keymap.c") + + config = parse_config(in_path) + valid_keys = parse_valid_keys(config, out_path) + keymaps = parse_keymaps(config, valid_keys) + + with io.open(out_path, mode="w", encoding="utf-8") as fh: + for part in iter_keymap_parts(config, keymaps): + fh.write(part) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/keyboards/ergodox80/ergodox80/util/readme.md b/keyboards/ergodox80/ergodox80/util/readme.md new file mode 100644 index 0000000000..26c5e5d99c --- /dev/null +++ b/keyboards/ergodox80/ergodox80/util/readme.md @@ -0,0 +1,3 @@ +# ErgoDox EZ Utilities + +The Python script in this directory, by [mbarkhau](https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. diff --git a/keyboards/ergodox80/keymaps/default/default.png b/keyboards/ergodox80/keymaps/default/default.png new file mode 100644 index 0000000000..6575f7b5e3 Binary files /dev/null and b/keyboards/ergodox80/keymaps/default/default.png differ diff --git a/keyboards/ergodox80/keymaps/default/default_highres.png b/keyboards/ergodox80/keymaps/default/default_highres.png new file mode 100644 index 0000000000..7d9f045f43 Binary files /dev/null and b/keyboards/ergodox80/keymaps/default/default_highres.png differ diff --git a/keyboards/ergodox80/keymaps/default/keymap.c b/keyboards/ergodox80/keymaps/default/keymap.c new file mode 100644 index 0000000000..2da2c5b0e4 --- /dev/null +++ b/keyboards/ergodox80/keymaps/default/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox80.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox80/keymaps/default/readme.md b/keyboards/ergodox80/keymaps/default/readme.md new file mode 100644 index 0000000000..8f6dba45e9 --- /dev/null +++ b/keyboards/ergodox80/keymaps/default/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ Default Configuration + +## Changelog + +* 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). + +This is what we ship with out of the factory. :) The image says it all: + +![Default](default_highres.png) diff --git a/keyboards/ergodox80/readme.md b/keyboards/ergodox80/readme.md new file mode 100644 index 0000000000..3bbe98fd69 --- /dev/null +++ b/keyboards/ergodox80/readme.md @@ -0,0 +1,165 @@ +# The Easy Way + +If you can find firmware someone else has made that does what you want, that +is the easiest way to customize your ErgoDox. It requires no programming +experience or the setup of a build environment. + +Quickstart: + + - Find and download an existing firmware + [from Other Firmware Options](#other-firmware-options) + + - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) + or [ErgoDox Infinity](#ergodox-infinity) + +# Customizing Keymaps + +There are many existing keymaps in the "keymaps" directory. If you just want +to use one of them, you don't need to modify keymaps and can just build and +flash the firmware as described below. These directories each have a +"readme.md" file which describe them. + +If none of the existing keymaps suit you, you can create your own custom +keymap. This will require some experience with coding. Follow these steps +to customize a keymap: + + - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + + - Clone the qmk_firmware repository + + - Set up your build environment (see below). + + - Make a new directory under "keymaps" to hold your customizations. + + - Copy an existing keymap that is close to what you want, such as + "keymaps/default/keymap.c". + + - Use an editor to modify the new "keymap.c". See "Finding the keycodes you + need" below). Try to edit the comments as well, so the "text graphics" + represent your layout correctly. + + - Compile your new firmware (see below) + + - Flash your firmware (see below) + + - Test the changes. + + - Submit your keymap as a pull request to the qmk_firmware repository so + others can use it. You will want to add a "readme.md" that describes the + keymap. + +# Build Dependencies + +Before you can build, you will need the build dependencies. There is a script +to try to do this for Linux: + + - Run the `util/install_dependencies.sh` script as root. + +For the Infinity, you need the chibios submodules to be checked out or you +will receive errors about the build process being unable to find the chibios +files. Check them out with: + + - Go to the top level repo directory and run: `git submodule update --init --recursive` + +# Flashing Firmware + +## ErgoDox Ez + +The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). + +Linux users need to modify udev rules as described on the Teensy Linux page. +Some distributions provide a binary, maybe called `teensy-loader-cli`). + +To flash the firmware: + + - Build the firmware with `make keymapname`, for example `make default` + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. + `ergodox_ez_default.hex` + + - Start the teensy loader. + + - Load the .hex file into it. + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. + + - Click the button in the Teensy app to download the firmware. + +## ErgoDox Infinity + +The Infinity is two completely independent keyboards, and needs to be flashed +for the left and right halves seperately. To flash them: + + - Build the firmware with `make infinity-keymapname` + + - Plug in the left hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make infinity-keymapname-dfu-util` + + - Build left hand firmware with `make infinity-keymapname MASTER=right` + + - Plug in the right hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make infinity-keymapname-dfu-util MASTER=right` + +More information on the Infinity firmware is available in the [TMK/chibios for +Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) + +### Infinity Master/Two Halves + +The Infinity is two completely independent keyboards, that can connect together. +You have a few options in how you flash the firmware: + +- Flash the left half, rebuild the firmware with "MASTER=right" and then flash + the right half. This allows you to plug in either half directly to the + computer and is what the above instructions do. + +- Flash the left half, then flash the same firmware on the right. This only + works when the left half is plugged directly to the computer and the keymap + is mirrored. It saves the small extra step of rebuilding with + "MASTER=right". + +- The same as the previous one but with "MASTER=right" when you build the + firmware, then flash the same firmware to both halves. You just have to + directly connect the right half to the computer. + +- For minor changes such as changing only the keymap without having updated + any part of the firmware code itself, you can program only the MASTER half. + It is safest to program both halves though. + +# Contributing your keymap + +The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. + +1. All work goes inside your keymap subdirectory (`keymaps/german` in this example). +2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did. +3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) +4. Any graphics you wish to add. This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link, just like I did with the default layout. + +# Finding the keycodes you need + +Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. + +That file contains a big list of all of the special, fancy keys (like, being able to send % on its own and whatnot). + +If you want to send a plain vanilla key, you can look up its code under `doc/keycode.txt`. That's where all the boring keys hang out. + +# Other Firmware Options + +There are external tools for customizing the layout, but those do not use +the featurs of this qmk firmware. These sites include: + + - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez + - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files + +You can also find an existing firmware that you like, for example from: + + - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) + +This qmk firmware also provides the ability to customize keymaps, but requires +a toolchain to build the firmware. See below for instructions on building +firmware and customizing keymaps. diff --git a/keyboards/ergodox80/rules.mk b/keyboards/ergodox80/rules.mk new file mode 100644 index 0000000000..ac63d4eff2 --- /dev/null +++ b/keyboards/ergodox80/rules.mk @@ -0,0 +1,28 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make = Make software. +# +# make clean = Clean out built project files. +# +# That's pretty much all you need. To compile, always go make clean, +# followed by make. +# +# For advanced users only: +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +#---------------------------------------------------------------------------- +# Build Options +# comment out to disable the options. +# +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 +CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ +SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= yes # Unicode -- cgit v1.2.3 From 36e16b46e37b3bcc1753ff0a2006179f0dd005e7 Mon Sep 17 00:00:00 2001 From: profet23 Date: Fri, 2 Sep 2016 17:18:39 -0400 Subject: Removing/editing non applicable readme --- keyboards/ergodox80/keymaps/default/default.png | Bin 193672 -> 0 bytes .../ergodox80/keymaps/default/default_highres.png | Bin 1459389 -> 0 bytes keyboards/ergodox80/keymaps/default/readme.md | 10 -- keyboards/ergodox80/readme.md | 163 +-------------------- 4 files changed, 2 insertions(+), 171 deletions(-) delete mode 100644 keyboards/ergodox80/keymaps/default/default.png delete mode 100644 keyboards/ergodox80/keymaps/default/default_highres.png delete mode 100644 keyboards/ergodox80/keymaps/default/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox80/keymaps/default/default.png b/keyboards/ergodox80/keymaps/default/default.png deleted file mode 100644 index 6575f7b5e3..0000000000 Binary files a/keyboards/ergodox80/keymaps/default/default.png and /dev/null differ diff --git a/keyboards/ergodox80/keymaps/default/default_highres.png b/keyboards/ergodox80/keymaps/default/default_highres.png deleted file mode 100644 index 7d9f045f43..0000000000 Binary files a/keyboards/ergodox80/keymaps/default/default_highres.png and /dev/null differ diff --git a/keyboards/ergodox80/keymaps/default/readme.md b/keyboards/ergodox80/keymaps/default/readme.md deleted file mode 100644 index 8f6dba45e9..0000000000 --- a/keyboards/ergodox80/keymaps/default/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox EZ Default Configuration - -## Changelog - -* 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). - -This is what we ship with out of the factory. :) The image says it all: - -![Default](default_highres.png) diff --git a/keyboards/ergodox80/readme.md b/keyboards/ergodox80/readme.md index 3bbe98fd69..b5c09f9222 100644 --- a/keyboards/ergodox80/readme.md +++ b/keyboards/ergodox80/readme.md @@ -1,165 +1,6 @@ -# The Easy Way +# Ergodox 80 key support -If you can find firmware someone else has made that does what you want, that -is the easiest way to customize your ErgoDox. It requires no programming -experience or the setup of a build environment. +This is based on the ergodox-ez qmk firmware but is for ergodoxes with 80 keys. -Quickstart: - - Find and download an existing firmware - [from Other Firmware Options](#other-firmware-options) - - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) - or [ErgoDox Infinity](#ergodox-infinity) - -# Customizing Keymaps - -There are many existing keymaps in the "keymaps" directory. If you just want -to use one of them, you don't need to modify keymaps and can just build and -flash the firmware as described below. These directories each have a -"readme.md" file which describe them. - -If none of the existing keymaps suit you, you can create your own custom -keymap. This will require some experience with coding. Follow these steps -to customize a keymap: - - - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) - - - Clone the qmk_firmware repository - - - Set up your build environment (see below). - - - Make a new directory under "keymaps" to hold your customizations. - - - Copy an existing keymap that is close to what you want, such as - "keymaps/default/keymap.c". - - - Use an editor to modify the new "keymap.c". See "Finding the keycodes you - need" below). Try to edit the comments as well, so the "text graphics" - represent your layout correctly. - - - Compile your new firmware (see below) - - - Flash your firmware (see below) - - - Test the changes. - - - Submit your keymap as a pull request to the qmk_firmware repository so - others can use it. You will want to add a "readme.md" that describes the - keymap. - -# Build Dependencies - -Before you can build, you will need the build dependencies. There is a script -to try to do this for Linux: - - - Run the `util/install_dependencies.sh` script as root. - -For the Infinity, you need the chibios submodules to be checked out or you -will receive errors about the build process being unable to find the chibios -files. Check them out with: - - - Go to the top level repo directory and run: `git submodule update --init --recursive` - -# Flashing Firmware - -## ErgoDox Ez - -The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). - -Linux users need to modify udev rules as described on the Teensy Linux page. -Some distributions provide a binary, maybe called `teensy-loader-cli`). - -To flash the firmware: - - - Build the firmware with `make keymapname`, for example `make default` - - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. - `ergodox_ez_default.hex` - - - Start the teensy loader. - - - Load the .hex file into it. - - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. - - - Click the button in the Teensy app to download the firmware. - -## ErgoDox Infinity - -The Infinity is two completely independent keyboards, and needs to be flashed -for the left and right halves seperately. To flash them: - - - Build the firmware with `make infinity-keymapname` - - - Plug in the left hand keyboard only. - - - Press the program button (back of keyboard, above thumb pad). - - - Install the firmware with `sudo make infinity-keymapname-dfu-util` - - - Build left hand firmware with `make infinity-keymapname MASTER=right` - - - Plug in the right hand keyboard only. - - - Press the program button (back of keyboard, above thumb pad). - - - Install the firmware with `sudo make infinity-keymapname-dfu-util MASTER=right` - -More information on the Infinity firmware is available in the [TMK/chibios for -Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) - -### Infinity Master/Two Halves - -The Infinity is two completely independent keyboards, that can connect together. -You have a few options in how you flash the firmware: - -- Flash the left half, rebuild the firmware with "MASTER=right" and then flash - the right half. This allows you to plug in either half directly to the - computer and is what the above instructions do. - -- Flash the left half, then flash the same firmware on the right. This only - works when the left half is plugged directly to the computer and the keymap - is mirrored. It saves the small extra step of rebuilding with - "MASTER=right". - -- The same as the previous one but with "MASTER=right" when you build the - firmware, then flash the same firmware to both halves. You just have to - directly connect the right half to the computer. - -- For minor changes such as changing only the keymap without having updated - any part of the firmware code itself, you can program only the MASTER half. - It is safest to program both halves though. - -# Contributing your keymap - -The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. - -1. All work goes inside your keymap subdirectory (`keymaps/german` in this example). -2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did. -3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) -4. Any graphics you wish to add. This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link, just like I did with the default layout. - -# Finding the keycodes you need - -Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. - -That file contains a big list of all of the special, fancy keys (like, being able to send % on its own and whatnot). - -If you want to send a plain vanilla key, you can look up its code under `doc/keycode.txt`. That's where all the boring keys hang out. - -# Other Firmware Options - -There are external tools for customizing the layout, but those do not use -the featurs of this qmk firmware. These sites include: - - - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez - - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files - -You can also find an existing firmware that you like, for example from: - - - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) - -This qmk firmware also provides the ability to customize keymaps, but requires -a toolchain to build the firmware. See below for instructions on building -firmware and customizing keymaps. -- cgit v1.2.3 From 295ef0d9649b7482c380f38dd6157879df4af91d Mon Sep 17 00:00:00 2001 From: Major Koos Date: Fri, 2 Sep 2016 16:14:40 -0700 Subject: Add support for JD40 MKII PCB RGB Included. --- keyboards/jd40/Makefile | 74 ++++++++++++++ keyboards/jd40/config.h | 79 +++++++++++++++ keyboards/jd40/jd40.c | 26 +++++ keyboards/jd40/jd40.h | 45 +++++++++ keyboards/jd40/keymaps/default/keymap.c | 164 ++++++++++++++++++++++++++++++++ keyboards/jd40/readme.md | 17 ++++ 6 files changed, 405 insertions(+) create mode 100644 keyboards/jd40/Makefile create mode 100644 keyboards/jd40/config.h create mode 100644 keyboards/jd40/jd40.c create mode 100644 keyboards/jd40/jd40.h create mode 100644 keyboards/jd40/keymaps/default/keymap.c create mode 100644 keyboards/jd40/readme.md (limited to 'keyboards') diff --git a/keyboards/jd40/Makefile b/keyboards/jd40/Makefile new file mode 100644 index 0000000000..242748111c --- /dev/null +++ b/keyboards/jd40/Makefile @@ -0,0 +1,74 @@ + + +# 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 ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB 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 ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow + +ifndef QUANTUM_DIR + include ../../Makefile +endif + diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h new file mode 100644 index 0000000000..e2594f4b37 --- /dev/null +++ b/keyboards/jd40/config.h @@ -0,0 +1,79 @@ +/* +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 0x0001 +#define MANUFACTURER geekhack +#define PRODUCT jd40v2 +#define DESCRIPTION t.m.k. keyboard firmware for JD40 MKII + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F5, B4 } +#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/jd40/jd40.c b/keyboards/jd40/jd40.c new file mode 100644 index 0000000000..fa06356d97 --- /dev/null +++ b/keyboards/jd40/jd40.c @@ -0,0 +1,26 @@ +#include "jd40.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + + // if (usb_led & (1<event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + +// Layer LED indicators +// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + uint32_t layer = layer_state; + if (layer & (1<<1)) { + //gh60_wasd_leds_on(); + } else { + //gh60_wasd_leds_off(); + } + + if (layer & (1<<2)) { + //gh60_esc_led_on(); + } else { + //gh60_esc_led_off(); + } +}; + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + case RGBLED_INCREASE_HUE: + if (record->event.pressed) { + rgblight_increase_hue(); + } + break; + case RGBLED_DECREASE_HUE: + if (record->event.pressed) { + rgblight_decrease_hue(); + } + break; + case RGBLED_INCREASE_SAT: + if (record->event.pressed) { + rgblight_increase_sat(); + } + break; + case RGBLED_DECREASE_SAT: + if (record->event.pressed) { + rgblight_decrease_sat(); + } + break; + case RGBLED_INCREASE_VAL: + if (record->event.pressed) { + rgblight_increase_val(); + } + break; + case RGBLED_DECREASE_VAL: + if (record->event.pressed) { + rgblight_decrease_val(); + } + break; + case RGBLED_STEP_MODE: + if (record->event.pressed) { + rgblight_step(); + } + break; + static uint8_t shift_esc_shift_mask; + // Shift + ESC = ~ + 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/jd40/readme.md b/keyboards/jd40/readme.md new file mode 100644 index 0000000000..7daa0980eb --- /dev/null +++ b/keyboards/jd40/readme.md @@ -0,0 +1,17 @@ +## jd40 mkii keyboard firmware + + Pins: + MATRIX_ROW_PINS { F0, F1, F5, B4 } + MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } + RGB_DI_PIN D3 + +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/jd40 folder. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Amtel Flip to program your .hex file. -- cgit v1.2.3 From 11224a00fe79bcba8ed596847000b7ad8118b95f Mon Sep 17 00:00:00 2001 From: Major Koos Date: Fri, 2 Sep 2016 16:42:40 -0700 Subject: Add rules.mk file --- keyboards/jd40/rules.mk | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 keyboards/jd40/rules.mk (limited to 'keyboards') diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk new file mode 100644 index 0000000000..2f18fdf10d --- /dev/null +++ b/keyboards/jd40/rules.mk @@ -0,0 +1,69 @@ + + +# 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 ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB 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 ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow \ No newline at end of file -- cgit v1.2.3 From f6cb08a5bd0d3c34c64691c7f51911742b562c05 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 4 Sep 2016 01:07:36 -0500 Subject: Added diagonal mice macros, breathing ala Atomic --- keyboards/planck/keymaps/pvc/config.h | 9 +- keyboards/planck/keymaps/pvc/keymap.c | 428 +++++++++++++++++++--------------- 2 files changed, 238 insertions(+), 199 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index c857a3e89d..1113372b0a 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -59,13 +59,8 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* ws2812 RGB LED */ -#define RGB_DI_PIN D1 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 28 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING /* * Feature disable options diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 0bb7f0def2..8ff40f377c 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -2,48 +2,50 @@ #include "action_layer.h" #include "eeconfig.h" #include "led.h" +#include "mousekey.h" #ifdef AUDIO_ENABLE #include "audio.h" #include "song_list.h" #endif -#define LAYER_QWERTY 0 -#define LAYER_COLEMAK 1 -#define LAYER_DVORAK 2 -#define LAYER_UPPER 3 -#define LAYER_LOWER 4 -#define LAYER_FUNCTION 5 -#define LAYER_MOUSE 6 -#define LAYER_ADJUST 7 - -#define MACRO_QWERTY 0 -#define MACRO_COLEMAK 1 -#define MACRO_DVORAK 2 -#define MACRO_UPPER 3 -#define MACRO_LOWER 4 -#define MACRO_FUNCTION 5 -#define MACRO_MOUSE 6 -#define MACRO_TIMBRE_1 7 -#define MACRO_TIMBRE_2 8 -#define MACRO_TIMBRE_3 9 -#define MACRO_TIMBRE_4 10 -#define MACRO_TEMPO_U 11 -#define MACRO_TEMPO_D 12 -#define MACRO_TONE_DEFAULT 13 -#define MACRO_MUSIC_TOGGLE 14 -#define MACRO_AUDIO_TOGGLE 16 -#define MACRO_INC_VOICE 18 -#define MACRO_DEC_VOICE 19 -#define MACRO_BACKLIGHT 20 -#define MACRO_BREATH_TOGGLE 21 -#define MACRO_BREATH_SPEED_INC 23 -#define MACRO_BREATH_SPEED_DEC 24 -#define MACRO_BREATH_DEFAULT 25 +enum keyboard_layers { + LAYER_QWERTY = 0, + LAYER_UPPER, + LAYER_LOWER, + LAYER_FUNCTION, + LAYER_MOUSE, + LAYER_ADJUST, +}; +enum keyboard_macros { + MACRO_QWERTY = 0, + MACRO_UPPER, + MACRO_LOWER, + MACRO_FUNCTION, + MACRO_MOUSE, + MACRO_TIMBRE_1, + MACRO_TIMBRE_2, + MACRO_TIMBRE_3, + MACRO_TIMBRE_4, + MACRO_TEMPO_U, + MACRO_TEMPO_D, + MACRO_TONE_DEFAULT, + MACRO_MUSIC_TOGGLE, + MACRO_AUDIO_TOGGLE, + MACRO_INC_VOICE, + MACRO_DEC_VOICE, + MACRO_BACKLIGHT, + MACRO_BREATH_TOGGLE, + MACRO_BREATH_SPEED_INC, + MACRO_BREATH_SPEED_DEC, + MACRO_BREATH_DEFAULT, + MACRO_MOUSE_MOVE_UL, + MACRO_MOUSE_MOVE_UR, + MACRO_MOUSE_MOVE_DL, + MACRO_MOUSE_MOVE_DR, +}; #define M_QWRTY M(MACRO_QWERTY) -#define M_COLMK M(MACRO_COLEMAK) -#define M_DVORK M(MACRO_DVORAK) #define M_UPPER M(MACRO_UPPER) #define M_LOWER M(MACRO_LOWER) #define M_FUNCT M(MACRO_FUNCTION) @@ -60,6 +62,10 @@ #define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BDFLT M(MACRO_BREATH_DEFAULT) +#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) +#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) +#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) +#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) #define VC_UP M(MACRO_INC_VOICE) @@ -86,147 +92,124 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - * .-----------------------------------------------------------------------------------------------------------. - * | TAB | Q | W | E | R | T | Y | U | I | O | P | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | UP | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | SHIFT | LEFT | DOWN | RIGHT | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_QWERTY] = { // 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_UP, KC_ENT }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* COLEMAK - * .-----------------------------------------------------------------------------------------------------------. - * | TAB | Q | W | F | P | G | J | L | U | Y | ; | ESC | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LSHIFT | Z | X | C | V | B | K | M | , | . | UP | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | SHIFT | LEFT | DOWN | RIGHT | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_COLEMAK] = { // COLEMAK - { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC }, - { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* DVORAK - * .-----------------------------------------------------------------------------------------------------------. - * | TAB | ' | , | . | P | Y | F | G | C | R | L | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ESC | A | O | E | U | I | D | H | T | N | S | / | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | UP | DOWN | LEFT | RIGHT | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_DVORAK] = { // 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 }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT }, - }, - -/* UPPER - * .-----------------------------------------------------------------------------------------------------------. - * | PRINT | F1 | F2 | F3 | F4 | NUM LK | / | 7 | 8 | 9 | - | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | CAP LK | F5 | F6 | F7 | F8 | SCR LK | * | 4 | 5 | 6 | + | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | F9 | F10 | F11 | F12 | PAUSE | | 1 | 2 | 3 | ENTER | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | 0 | 0 | | RALT | . | ENTER | END | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_UPPER] = { // UPPER - { KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, - { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS }, - { _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME }, - { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END }, - }, - -/* LOWER - * .-----------------------------------------------------------------------------------------------------------. - * | | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | ^ | * | + | - | / | \ | _ | ' | " | ` | PG DN | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | & | ! | ~ | ; | : | = | < | > | ? | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | | | | | | | END | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_LOWER] = { // LOWER - { _______, KC_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, KC_PGUP }, - { _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, KC_PGDN }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, KC_HOME }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END }, - }, - - -/* FUNCTION - * .-----------------------------------------------------------------------------------------------------------. - * | NUM LK | F13 | F14 | F15 | F16 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | PAUSE | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | CAP LK | F17 | F18 | F19 | F20 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | PRINT | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | SCR LK | F21 | F22 | F23 | F24 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MUTE | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | PLAY | PLAY | LOWER | VOL UP | VOL DN | NEXT | PREV | - * '-----------------------------------------------------------------------------------------------------------' - */ - [LAYER_FUNCTION] = { // FUNCTION - { KC_NLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS }, - { KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR }, - { KC_SLCK, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE }, - { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT }, - }, +/* LAYER = LAYER_QWERTY + .-----------------------------------------------------------------------------------------------------------. + | TAB | Q | W | E | R | T | Y | U | I | O | P | BACKSP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ESC | A | S | D | F | G | H | J | K | L | ; | ' | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LSHIFT | Z | X | C | V | B | N | M | , | . | UP | ENTER | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_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_UP , KC_ENT }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT } +}, + +/* LAYER = LAYER_UPPER + .-----------------------------------------------------------------------------------------------------------. + | PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | PAUSE | F5 | F6 | F7 | F8 | SCR LK | KP * | KP 4 | KP 5 | KP 6 | KP + | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F9 | F10 | F11 | F12 | PAUSE | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_UPPER] = { + { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, + { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS }, + { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME }, + { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END } +}, + +/* LAYER = LAYER_LOWER + .-----------------------------------------------------------------------------------------------------------. + | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | PG DN | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_LOWER] = { + { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP }, + { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN }, + { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME }, + { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END } +}, + +/* LAYER = LAYER_FUNCTION + .-----------------------------------------------------------------------------------------------------------. + | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | VOL UP | MUTE | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_FUNCTION] = { + { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE }, + { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } +}, #ifdef MOUSEKEY_ENABLE - [LAYER_MOUSE] = { // MOUSE - { KC_ESC, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { _______, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_MS_U, KC_MS_D, KC_MS_L, KC_MS_R }, - }, +/* LAYER = LAYER_MOUSE + .-----------------------------------------------------------------------------------------------------------. + | ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | MS WHU | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | MS U | MS WHD | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_MOUSE] = { + { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R }, + { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U }, + { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D }, + { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } +}, #endif - [LAYER_ADJUST] = { // ADJUST - { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, MU_TOG, AU_TOG }, - { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, MUV_IN, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, _______ }, - }, - -/* - [LAYER_EMPTY] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, }, - }, +/* LAYER = LAYER_ADJUST + .-----------------------------------------------------------------------------------------------------------. + | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MUSIC | AUDIO | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | VOICE+ | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | XXXXXX | TEMPO- | VOICE- | TEMPO+ | + '-----------------------------------------------------------------------------------------------------------' */ +[LAYER_ADJUST] = { + { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG , AU_TOG }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } +}, + }; #ifdef AUDIO_ENABLE @@ -234,10 +217,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_my_startup[][2] = SONG(ODE_TO_JOY); float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE); float tone_music_on[][2] = SONG(DOE_A_DEER); float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); @@ -267,46 +246,38 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) switch(id) { - case MACRO_QWERTY: + case MACRO_BREATH_TOGGLE: if (record->event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - layer_on(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + breathing_defaults(); } - else + break; + + case MACRO_QWERTY: + if (record->event.pressed) { - layer_off(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + persistant_default_layer_set(1UL<event.pressed) { layer_on(LAYER_UPPER); + breathing_speed_set(2); + breathing_pulse(); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); } else @@ -323,13 +296,32 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(LAYER_LOWER); + breathing_speed_set(2); + breathing_pulse(); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + else + { + layer_off(LAYER_LOWER); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + break; + case MACRO_FUNCTION: if (record->event.pressed) { + breathing_speed_set(3); + breathing_enable(); layer_on(LAYER_FUNCTION); } else { + breathing_speed_set(1); + breathing_self_disable(); layer_off(LAYER_FUNCTION); } break; @@ -352,6 +344,58 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + case MACRO_MOUSE_MOVE_UL: + 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); + } + break; + + case MACRO_MOUSE_MOVE_UR: + 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); + } + break; + + case MACRO_MOUSE_MOVE_DL: + 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); + } + break; + + case MACRO_MOUSE_MOVE_DR: + 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); + } + break; + #endif /* MOUSEKEY_ENABLE */ #ifdef AUDIO_ENABLE -- cgit v1.2.3 From bf5941b335268748ee7877fc24cdd538a9faacd0 Mon Sep 17 00:00:00 2001 From: Samuel Ryan Goodwin Date: Mon, 5 Sep 2016 15:53:52 +0200 Subject: Add my keymap. --- keyboards/planck/keymaps/sgoodwin/Makefile | 25 +++ keyboards/planck/keymaps/sgoodwin/keymap.c | 233 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/sgoodwin/readme.md | 10 ++ 3 files changed, 268 insertions(+) create mode 100644 keyboards/planck/keymaps/sgoodwin/Makefile create mode 100644 keyboards/planck/keymaps/sgoodwin/keymap.c create mode 100644 keyboards/planck/keymaps/sgoodwin/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/sgoodwin/Makefile b/keyboards/planck/keymaps/sgoodwin/Makefile new file mode 100644 index 0000000000..581e08cd02 --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/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/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c new file mode 100644 index 0000000000..4d5d3d7ef6 --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c @@ -0,0 +1,233 @@ +// This is sgoodwin's layout file for the Quantum project. +// It doesn't have Plover or Dvorak layers because he doesn't use that. +// It Also doesn't allow for swapping alt with CMD because that only happens in error. + +#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 _QWERTY 1 +#define _COLEMAK 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + BACKLIT, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 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 | , | . | / |SHEnt | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Hyper| 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, MT(MOD_RSFT, KC_ENT) }, + {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* 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 | , | . | / |SHEnt | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Hyper| 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, MT(MOD_RSFT, KC_ENT) }, + {ALL_T(KC_NO), 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),_______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff| | |Qwerty|Colemk| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______}, + {_______, 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_colemak[][2] = SONG(COLEMAK_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 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; + } + 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/sgoodwin/readme.md b/keyboards/planck/keymaps/sgoodwin/readme.md new file mode 100644 index 0000000000..dfa88f380d --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/readme.md @@ -0,0 +1,10 @@ +# sgoodwin's Planck Layout + +Includes: + +1. No Dvorak or Plover +2. No alt-swapping +3. Right enter is shift when held down, enter when tapped. +4. Bottom left corner in normal layers is Hyper and not brightness control. +5. Brightness is instead in the bottom corner on raise/lower. + -- cgit v1.2.3 From e9ce4960c15066c14c775b1d769f1f89ec450787 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Mon, 5 Sep 2016 17:40:03 -0400 Subject: Add new ErgoDox EZ keymap, YORUIAN --- .../keymaps/yoruian/90-ergodox-yoruian.conf | 6 ++ keyboards/ergodox/keymaps/yoruian/Makefile | 13 +++ keyboards/ergodox/keymaps/yoruian/README | 102 +++++++++++++++++++++ keyboards/ergodox/keymaps/yoruian/ergodox_yoruian | 34 +++++++ keyboards/ergodox/keymaps/yoruian/keymap.c | 61 ++++++++++++ keyboards/ergodox/keymaps/yoruian/yoruian.h | 61 ++++++++++++ 6 files changed, 277 insertions(+) create mode 100644 keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf create mode 100644 keyboards/ergodox/keymaps/yoruian/Makefile create mode 100644 keyboards/ergodox/keymaps/yoruian/README create mode 100644 keyboards/ergodox/keymaps/yoruian/ergodox_yoruian create mode 100644 keyboards/ergodox/keymaps/yoruian/keymap.c create mode 100644 keyboards/ergodox/keymaps/yoruian/yoruian.h (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf new file mode 100644 index 0000000000..c8a92c5c5b --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "ErgoDox EZ" + MatchIsKeyboard "on" + MatchProduct "ErgoDox EZ ErgoDox EZ" + Option "XkbLayout" "ergodox_ez_yoruian" +EndSection diff --git a/keyboards/ergodox/keymaps/yoruian/Makefile b/keyboards/ergodox/keymaps/yoruian/Makefile new file mode 100644 index 0000000000..b43a24c611 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/Makefile @@ -0,0 +1,13 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +install-xorg-configuration: + install -m 0664 90-$(KEYBOARD)-$(KEYMAP).conf \ + /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf + install -m 0644 $(KEYBOARD)_$(KEYMAP) \ + /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP) + +uninstall-xorg-configuration: + -rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf + -rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP) diff --git a/keyboards/ergodox/keymaps/yoruian/README b/keyboards/ergodox/keymaps/yoruian/README new file mode 100644 index 0000000000..99b41434ef --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/README @@ -0,0 +1,102 @@ + Snarfangel's YORUIAN for the ErgoDox EZ + ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +DEFAULT +┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ +┃ ` │ ; │ : │ - │ / │ ( │ < ┃ ┃ > │ ) │ ^ │ * │ ~ │ Γ │ σ ┃ +┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨ +┃ ⎋ │ . │ y │ o │ r │ ? │ ✦ ┃ ┃ ✦ │ j │ v │ d │ f │ w │ q ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ ⎈ │ u │ i │ a │ n │ ! ├───┨ ┠───┤ m │ h │ t │ s │ c │ ⎈ ┃ +┠───┼───┼───┼───┼───┼───┤ ❖ ┃ ┃ ❖ ├───┼───┼───┼───┼───┼───┨ +┃ λ │ ' │ " │ , │ _ │ = │ ┃ ┃ │ k │ l │ p │ g │ b │ x ┃ +┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨ +┃ ⎀ │ E │ │ │ ◆ ┃ ┃ ◆ │ │ │ z │ ⎙ ┃ +┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛ + ┏━━━┯━━━┓ ┏━━━┯━━━┓ + ┃ ⌫ │ ⌥ ┃ ┃ ⎄ │ ↹ ┃ + ┏━━━╃───┼───┨ ┠───┼───╄━━━┓ + ┃ │ │ ┃ ┃ │ │ ┃ + ┃ e │ ⇧ ├───┨ ┠───┤ ⏎ │ ␣ ┃ + ┃ │ │ ┃ ┃ │ │ ┃ + ┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛ +SHIFTED +┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ +┃ 9 │ 7 │ 5 │ 3 │ 1 │ [ │ { ┃ ┃ } │ ] │ 0 │ 2 │ 4 │ 6 │ 8 ┃ +┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨ +┃ │ * │ Y │ O │ R │ \ │ ┃ ┃ │ J │ V │ D │ F │ W │ Q ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ │ U │ I │ A │ N │ | ├───┨ ┠───┤ M │ H │ T │ S │ C │ ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ │ # │ $ │ @ │ & │ + │ ┃ ┃ │ K │ L │ P │ G │ B │ X ┃ +┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨ +┃ │ │ │ │ ┃ ┃ │ │ │ Z │ ┃ +┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛ + ┏━━━┯━━━┓ ┏━━━┯━━━┓ + ┃ │ ┃ ┃ │ ┃ + ┏━━━╃───┼───┨ ┠───┼───╄━━━┓ + ┃ │ │ ┃ ┃ │ │ ┃ + ┃ │ ├───┨ ┠───┤ │ ┃ + ┃ │ │ ┃ ┃ │ │ ┃ + ┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛ +λ LAYER +┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ +┃ │ │ │ │ │ │ ┃ ┃ │ │ ⑤ │ ⑥ │ ⑦ │ ⑧ │ ⑨ ┃ +┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨ +┃ │ │ │ │ │ │ ┃ ┃ │ │ ① │ ② │ ③ │ ④ │ ⑩ ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ │ │ │ │ │ ├───┨ ┠───┤ ⎉ │ ← │ ↓ │ ↑ │ → │ ⑪ ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ λ │ │ │ │ │ │ ┃ ┃ │ │ ⇱ │ ⎘ │ ⎗ │ ⇲ │ ⑫ ┃ +┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨ +┃ │ │ │ │ ┃ ┃ │ │ │ │ ┃ +┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛ + ┏━━━┯━━━┓ ┏━━━┯━━━┓ + ┃ │ ┃ ┃ │ ┃ + ┏━━━╃───┼───┨ ┠───┼───╄━━━┓ + ┃ │ │ ┃ ┃ │ │ ┃ + ┃ │ ├───┨ ┠───┤ │ ┃ + ┃ │ │ ┃ ┃ │ │ ┃ + ┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛ + +Installation (X only) +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + 1. Build and flash firmware as usual + + 2. sudo make install-xorg-configuration + + 3. Restart X + +Features +‾‾‾‾‾‾‾‾ + • E on the thumb + + • Emacs-friendly + + • Symmetric control keys for finger wear levelling + + • Greek and subscript dead keys + + • Compose key for arbitrary Unicode input via ~/.XCompose + +Don't Cares +‾‾‾‾‾‾‾‾‾‾‾ + • Easy migration from QWERTY + + • Compatbility with non-XKB systems + + • Mouse emulation + + • Media keys + +Acknowledgements +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +Snarfangel, for designing the layout. + +The GNU FreeFont project and Steve White, for adding new keyboard +symbols. + +Xah Lee, for http://xahlee.info/comp/unicode_computing_symbols.html + +Colophon +‾‾‾‾‾‾‾‾ +This file is best-viewed with an SVN version of GNU FreeFont Mono. diff --git a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian new file mode 100644 index 0000000000..7343143948 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian @@ -0,0 +1,34 @@ +partial alphanumeric_keys modifier_keys +xkb_symbols "ergodox_ez_yoruian" { + include "us" + name[Group1]= "English (yoruian-1.0.0)"; + + replace key { [ Multi_key, Multi_key ] }; + replace key { [ Hyper_L, Hyper_L ] }; + replace key { [ grave, 9 ] }; + replace key { [ semicolon, 7 ] }; + replace key { [ colon, 5 ] }; + replace key { [ minus, 3 ] }; + replace key { [ slash, 1 ] }; + replace key { [ asciicircum, 0 ] }; + replace key { [ percent, 2 ] }; + replace key { [ asciitilde, 4 ] }; + replace key { [ dead_greek, 6 ] }; + replace key { [ dead_caron, 8 ] }; + replace key { [ E, E ] }; + replace key { [ period, asterisk ] }; + replace key { [ question, backslash ] }; + replace key { [ exclam, bar ] }; + replace key { [ apostrophe, numbersign ] }; + replace key { [ quotedbl, dollar ] }; + replace key { [ comma, at ] }; + replace key { [ underscore, ampersand ] }; + replace key { [ equal, plus ] }; + replace key { [ parenleft, bracketleft ] }; + replace key { [ less, braceleft ] }; + replace key { [ greater, braceright ] }; + replace key { [ parenright, bracketright ] }; + + modifier_map none { }; + modifier_map Mod3 { }; +}; diff --git a/keyboards/ergodox/keymaps/yoruian/keymap.c b/keyboards/ergodox/keymaps/yoruian/keymap.c new file mode 100644 index 0000000000..d3635ddf3f --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/keymap.c @@ -0,0 +1,61 @@ +/* + * Copyright 2016 Thomas Fitzsimmons + * + * 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 3 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 . + */ +#include "yoruian.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP\ +(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, + ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, + LC, U, I, A, N, SCLN, M, H, T, S, C, RC, + FF, QUOT, COMM, DOT, SLSH, P0, LGUI, LGUI, K, L, P, G, B, X, + IN, P1, NO, NO, LALT, LALT, NO, NO, Z, PS, + BSPC, RALT, P2, TAB, + NO, NO, + E, LSFT, NO, NO, ENT, SPC), +[1] = KEYMAP\ +(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, + TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, + TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, + TR, TR, TR, TR, TR, TR, TR, TR, TR, HOME, PGDN, PGUP, END, FW, + TR, TR, TR, TR, TR, TR, TR, TR, TR, TR, + TR, TR, TR, TR, + TR, TR, + TR, TR, TR, TR, TR, TR), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + +void matrix_init_user(void) { +}; + +void matrix_scan_user(void) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +}; + +/* + * Local Variables: + * electric-indent-mode: nil + * End: + */ diff --git a/keyboards/ergodox/keymaps/yoruian/yoruian.h b/keyboards/ergodox/keymaps/yoruian/yoruian.h new file mode 100644 index 0000000000..1adcb7fd3f --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/yoruian.h @@ -0,0 +1,61 @@ +/* + * Copyright 2016 Thomas Fitzsimmons + * + * 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 3 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 . + */ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +#undef KEYMAP +#define KEYMAP\ +( \ + /* Spacial positions. */ \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \ + k55, k56, k57, k58, \ + k54, k59, \ + k53, k52, k51, k5C, k5B, k5A) \ + \ + /* Matrix positions. */ \ + { \ + { KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \ + { KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \ + { KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \ + { KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \ + { KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \ + { KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \ + { KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \ + { KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \ + { KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \ + { KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \ + { KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \ + { KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \ + { KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \ + { KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \ + } + +#define KC_ES KC_ESC +#define KC_LC KC_LCTL +#define KC_RC KC_RCTL +#define KC_FF MO(1) +#define KC_IN KC_INS +#define KC_PS KC_PSCR +#define KC_TR KC_TRNS +#define KC_FT KC_F10 +#define KC_FE KC_F11 +#define KC_FW KC_F12 -- cgit v1.2.3 From ce53c0643d4eaf8f13ac1140d3bd91dfa5f90e22 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Tue, 6 Sep 2016 00:09:14 -0400 Subject: Fix ergodox_yoruian XKB naming --- keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf | 2 +- keyboards/ergodox/keymaps/yoruian/ergodox_yoruian | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf index c8a92c5c5b..ce4fce3b1d 100644 --- a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf +++ b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf @@ -2,5 +2,5 @@ Section "InputClass" Identifier "ErgoDox EZ" MatchIsKeyboard "on" MatchProduct "ErgoDox EZ ErgoDox EZ" - Option "XkbLayout" "ergodox_ez_yoruian" + Option "XkbLayout" "ergodox_yoruian" EndSection diff --git a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian index 7343143948..0d13fbfd4c 100644 --- a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian +++ b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian @@ -1,5 +1,5 @@ partial alphanumeric_keys modifier_keys -xkb_symbols "ergodox_ez_yoruian" { +xkb_symbols "ergodox_yoruian" { include "us" name[Group1]= "English (yoruian-1.0.0)"; -- cgit v1.2.3 From a3e7042084ac2a117cea129e4dd4995904f247e8 Mon Sep 17 00:00:00 2001 From: joar Date: Tue, 6 Sep 2016 16:00:08 +0200 Subject: norwegian programmer-friendly layout --- .../keyboard-layout.png | Bin 0 -> 140077 bytes .../keymaps/norwegian_programmer_osx_pc/keymap.c | 180 +++++++++++++++++++++ .../keymaps/norwegian_programmer_osx_pc/readme.md | 30 ++++ .../keyboard-layout.png | Bin 0 -> 97519 bytes .../norwegian_programmer_osx_pc_colemak/keymap.c | 180 +++++++++++++++++++++ .../norwegian_programmer_osx_pc_colemak/readme.md | 30 ++++ 6 files changed, 420 insertions(+) create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png new file mode 100644 index 0000000000..544b5658e9 Binary files /dev/null and b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c new file mode 100644 index 0000000000..1d505f8e38 --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c @@ -0,0 +1,180 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_norwegian.h" + +#define BASE 0 // default layer +#define BASE_MAC 1 // default layer mac +#define NUMB_FUNC 2 // numbers and function keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Basic layer PC + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | * | [ | ] | { | } | ~ |Mac/PC| | ^ | $ | ( | ) | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | + | Q | W | E | R | T | " | | ' | Y | U | I | O | P | Å | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | / | A | S | D | F | G |------| |------| H | J | K | L | Ø | Æ | + * |--------+------+------+------+------+------| ; | | = |------+------+------+------+------+--------| + * | - | Z | X | C | V | B | | | | N | M | RIGHT| DOWN | UP | _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Alt/esc| ! | ? | : | TAB | | LEFT | _ | & | | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | # | ` | |Insert| % | + * ,------|------|------| |------+-------+------. + * | | | ´ | | Del | | | + * | Shift|Ctrl/.|------| |------| Enter |Space | + * | | |GUI/, | | Bspc | | | + * `--------------------' `---------------------' + */ +[BASE] = KEYMAP( + // left hand + KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), + KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_QUO2, + KC_PSLS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, + ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, + KC_HASH, KC_FN7, + KC_FN6, + KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA), + // right hand + KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, + NO_APOS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA , + KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, + NO_EQL, KC_N, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, + KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), + KC_INSERT, KC_PERC, + KC_DELT, + KC_BSPC,KC_ENT,KC_SPC + ), +/* Keymap 1: Basic layer MACS (Same as pc, except for cmd/ctrl, which are swapped) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | \ | | | { | } | | | | | $ | | | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | ' |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | |,/Ctrl| | | | ` | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | ` | | | | + * ,------|------|------| |------+------+------. + * | | | ´ | | | | | + * | |GUI/. |------| |------| | | + * | | |crtl/,| | | | | + * `--------------------' `--------------------' + */ +[BASE_MAC] = KEYMAP( + KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, NO_GRV_MAC, + KC_FN10, + KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA), + // right hand + KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, + NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_BSLS_MAC, + KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Number ++´ánd Fn layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 8 | 7 | 6 | 5 | 9 | | | | | F5 | F6 | F7 | F8 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | 4 | 3 | 2 | 1 | 0 |------| |------| | F1 | F2 | F3 | F4 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | END | PGDWN| PGUP | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | HOME | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMB_FUNC] = KEYMAP( + NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS, + NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0, + NO_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_F5, KC_F6 , KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, + KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_PGDN, KC_PGUP, KC_TRNS, + KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +) +}; + +enum macro_id { + TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. + [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. + [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. + [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. + [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. + [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. + [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. + [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly + [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly + [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed +}; + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + keyevent_t event = record->event; + + switch (id) { + case TILDE_NO: + return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + case LESS_NO: + return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + case GRTR_NO: + return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + case CIRC_NO: + return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + case ACUT_NO: + return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + case GRV_NO: + return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + case LESS_NO_MAC: + return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + case GRTR_NO_MAC: + return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + case ACUT_NO_MAC: + return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md new file mode 100644 index 0000000000..f7e8baf56a --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md @@ -0,0 +1,30 @@ +# Norwegian setup with osx/pc toggle + +## Motivation +I wanted a Norwegian setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup. + +## Overview +The setup is created to be programmer friendly. +- Most of the symbols used in code can be activated without using layers or shift key. +- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist. +- Navigation is prioritized, arrows below the home row. + +## PC/Mac toggle +The default setup is for Norwegian keyboard setting(on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard. + +## Layers +Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys. + +## Tap-shift +Tap for the next character to be shifted, hold down for regular shift. + +## Comma dot and escape +Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys. + +## Numpad symbols ++-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0. +If you really need the norwegian symbols in a program, you can access them using the number toggle button. + +## Layout + +![keyboard-layout](keyboard-layout.png) diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png new file mode 100644 index 0000000000..462de5c56b Binary files /dev/null and b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c new file mode 100644 index 0000000000..acf74a47d2 --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c @@ -0,0 +1,180 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_norwegian.h" + +#define BASE 0 // default layer +#define BASE_MAC 1 // default layer mac +#define NUMB_FUNC 2 // numbers and function keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Basic layer PC + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | * | [ | ] | { | } | ~ |Mac/PC| | ^ | $ | ( | ) | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | + | Q | W | F | P | G | " | | ' | J | L | U | Y | Å | Æ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | / | A | R | S | T | D |------| |------| H | N | E | I | O | Ø | + * |--------+------+------+------+------+------| ; | | = |------+------+------+------+------+--------| + * | - | Z | X | C | V | B | | | | K | M | RIGHT| DOWN | UP | _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Alt/esc| ! | ? | : | TAB | | LEFT | _ | & | | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | # | ` | |Insert| % | + * ,------|------|------| |------+-------+------. + * | | | ´ | | Del | | | + * | Shift|Ctrl/.|------| |------| Enter |Space | + * | | |GUI/, | | Bspc | | | + * `--------------------' `---------------------' + */ +[BASE] = KEYMAP( + // left hand + KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), + KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2, + KC_PSLS, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, + ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, + KC_HASH, KC_FN7, + KC_FN6, + KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA), + // right hand + KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, + NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE , + KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH, + NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, + KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), + KC_INSERT, KC_PERC, + KC_DELT, + KC_BSPC,KC_ENT,KC_SPC + ), +/* Keymap 1: Basic layer MAC (Same as pc, except for cmd/ctrl, which are swapped) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | \ | | | { | } | | | | | $ | | | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | ' |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | |,/Ctrl| | | | ` | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | ` | | | | + * ,------|------|------| |------+------+------. + * | | | ´ | | | | | + * | |GUI/. |------| |------| | | + * | | |crtl/,| | | | | + * `--------------------' `--------------------' + */ +[BASE_MAC] = KEYMAP( + KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, NO_GRV_MAC, + KC_FN10, + KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA), + // right hand + KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, + NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_BSLS_MAC, + KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Number ++´ánd Fn layer pc + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 8 | 7 | 6 | 5 | 9 | | | | | F5 | F6 | F7 | F8 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | 4 | 3 | 2 | 1 | 0 |------| |------| | F1 | F2 | F3 | F4 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | END | PGDWN| PGUP | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | HOME | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMB_FUNC] = KEYMAP( + NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS, + NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0, + NO_MINS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_F5, KC_F6 , KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, + KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_PGDN, KC_PGUP, KC_TRNS, + KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +) +}; + +enum macro_id { + TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. + [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. + [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. + [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. + [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. + [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. + [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. + [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly + [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly + [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed +}; + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + keyevent_t event = record->event; + + switch (id) { + case TILDE_NO: + return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + case LESS_NO: + return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + case GRTR_NO: + return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + case CIRC_NO: + return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + case ACUT_NO: + return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + case GRV_NO: + return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + case LESS_NO_MAC: + return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + case GRTR_NO_MAC: + return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + case ACUT_NO_MAC: + return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md new file mode 100644 index 0000000000..aaaec3e534 --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md @@ -0,0 +1,30 @@ +# Norwegian Colemak setup with osx/pc toggle + +## Motivation +I wanted a Norwegian Colemak setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup. + +## Overview +The setup is created to be programmer friendly. +- Most of the symbols used in code can be activated without using layers or shift key. +- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist. +- Navigation is prioritized, arrows below the home row. + +## PC/Mac toggle +The default setup is for Norwegian keyboard setting(not colemak software variants) on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard. + +## Layers +Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys. + +## Tap-shift +Tap for the next character to be shifted, hold down for regular shift. + +## Comma dot and escape +Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys. + +## Numpad symbols ++-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0. +If you really need the norwegian symbols in a program, you can access them using the number toggle button. + +## Layout + +![keyboard-layout](keyboard-layout.png) -- cgit v1.2.3 From da16733e7ab66ebd27fde21312990f5733966a52 Mon Sep 17 00:00:00 2001 From: Roman Zolotarev Date: Wed, 7 Sep 2016 07:55:22 +0800 Subject: Change CTL_T(KC_ESC) to KC_LCTRL and update readme --- .../keymaps/romanzolotarev-norman-osx/keymap.c | 30 +++++++++--------- .../keymaps/romanzolotarev-norman-osx/readme.md | 37 +++++++++++++++------- 2 files changed, 40 insertions(+), 27 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c index 24d0c4ecb7..2c64304404 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c +++ b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c @@ -6,23 +6,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, - KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS, - CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, - KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, + KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS, + KC_LCTRL, KC_A, KC_S, KC_E, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT, // - /*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, - /*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, - /*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT, - /*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - /*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - KC_MPLY, KC_MNXT, + /*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + /*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, + /*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT, + /*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + /*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_MPLY, KC_MNXT, KC_MPRV, - KC_RALT, KC_QUOT, KC_SPC + KC_RALT, KC_QUOT, KC_SPC ) }; diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md index 80475ab21e..a86061285a 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md +++ b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md @@ -1,28 +1,41 @@ # Roman's Layout -There is only one layer based on [Norman layout](https://normanlayout.info/). +There is only one layer, and it is based on [Norman +layout](https://normanlayout.info/). Looking for multiple-layer layouts? -- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/) +- [Symbols, arrows, plover, HJKL + arrows](../romanzolotarev-norman-plover-osx-hjkl/) - [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/) [![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195) -## Functional Keys +## How to use Vim key -- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/). -- Tap `F2` to copy screenshot to the clipboard. -- Hold `SHIFT` and tap `F2` to save screenshot as a file. -- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/). - -## CTRL/ESC - -CTRL and ESC are frequently used in Vim. +It is `CTL_T(KC_ESC)` and it works this way: - Tap `CTRL/ESC` to send `ESC`. - Hold `CTRL/ESC` to use as `CTRL`. -## Activate N-rollover +## How to activate N-rollover - Hold left `SHIFT` and right `SHIRT` and then tap `N`. + +## How to make and flash on OS X + +First you need to install few brew packages. + +```bash +brew tap osx-cross/avr +brew install dfu-programmer avr-libc teensy_loader_cli +``` + +Then you can clone this repository, make and flash your ErgoDox. + +```bash +git clone https://github.com/romanzolotarev/qmk_firmware +cd qmk_firmware/keyboards/ergodox +# Optionally tweak ./keymaps/romanzolotarev-norman-osx/keymap.c +SLEEP_LED_ENABLED=no KEYMAP=romanzolotarev-norman-osx make teensy +``` -- cgit v1.2.3 From 1406118c7123359cd66d589d22d6ecfa268e3a24 Mon Sep 17 00:00:00 2001 From: profet23 Date: Tue, 6 Sep 2016 21:59:23 -0400 Subject: Removing separate ergodox80 project. Created KEYMAP_80 in ez.h to support 80 key ergodoxes. Creating default_80 keymap as ez keymap. --- keyboards/ergodox/ez/ez.h | 41 ++ .../ergodox/ez/keymaps/default_80/ergodox80.png | Bin 0 -> 20663 bytes keyboards/ergodox/ez/keymaps/default_80/keymap.c | 183 ++++++ keyboards/ergodox/ez/keymaps/default_80/readme.md | 10 + keyboards/ergodox80/Makefile | 5 - keyboards/ergodox80/config.h | 31 - keyboards/ergodox80/ergodox80.c | 0 keyboards/ergodox80/ergodox80.h | 5 - keyboards/ergodox80/ergodox80/190hotfix.sh | 19 - keyboards/ergodox80/ergodox80/Makefile | 3 - keyboards/ergodox80/ergodox80/config.h | 65 -- keyboards/ergodox80/ergodox80/ergodox80.c | 85 --- keyboards/ergodox80/ergodox80/ergodox80.h | 122 ---- keyboards/ergodox80/ergodox80/i2cmaster.h | 178 ------ keyboards/ergodox80/ergodox80/matrix.c | 382 ----------- keyboards/ergodox80/ergodox80/rules.mk | 76 --- keyboards/ergodox80/ergodox80/twimaster.c | 208 ------ .../ergodox80/ergodox80/util/compile_keymap.py | 710 --------------------- keyboards/ergodox80/ergodox80/util/readme.md | 3 - keyboards/ergodox80/keymaps/default/keymap.c | 183 ------ keyboards/ergodox80/readme.md | 6 - keyboards/ergodox80/rules.mk | 28 - 22 files changed, 234 insertions(+), 2109 deletions(-) create mode 100644 keyboards/ergodox/ez/keymaps/default_80/ergodox80.png create mode 100644 keyboards/ergodox/ez/keymaps/default_80/keymap.c create mode 100644 keyboards/ergodox/ez/keymaps/default_80/readme.md delete mode 100644 keyboards/ergodox80/Makefile delete mode 100644 keyboards/ergodox80/config.h delete mode 100644 keyboards/ergodox80/ergodox80.c delete mode 100644 keyboards/ergodox80/ergodox80.h delete mode 100755 keyboards/ergodox80/ergodox80/190hotfix.sh delete mode 100644 keyboards/ergodox80/ergodox80/Makefile delete mode 100644 keyboards/ergodox80/ergodox80/config.h delete mode 100644 keyboards/ergodox80/ergodox80/ergodox80.c delete mode 100644 keyboards/ergodox80/ergodox80/ergodox80.h delete mode 100644 keyboards/ergodox80/ergodox80/i2cmaster.h delete mode 100644 keyboards/ergodox80/ergodox80/matrix.c delete mode 100644 keyboards/ergodox80/ergodox80/rules.mk delete mode 100644 keyboards/ergodox80/ergodox80/twimaster.c delete mode 100644 keyboards/ergodox80/ergodox80/util/compile_keymap.py delete mode 100644 keyboards/ergodox80/ergodox80/util/readme.md delete mode 100644 keyboards/ergodox80/keymaps/default/keymap.c delete mode 100644 keyboards/ergodox80/readme.md delete mode 100644 keyboards/ergodox80/rules.mk (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/ez.h b/keyboards/ergodox/ez/ez.h index db4ec867bc..124bf850e7 100644 --- a/keyboards/ergodox/ez/ez.h +++ b/keyboards/ergodox/ez/ez.h @@ -119,4 +119,45 @@ inline void ergodox_led_all_set(uint8_t n) { k0D, k1D, k2D, k3D, k4D, KC_NO } \ } +#define KEYMAP_80( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k10, k20, k30, k40, KC_NO }, \ + { k01, k11, k21, k31, k41, k51 }, \ + { k02, k12, k22, k32, k42, k52 }, \ + { k03, k13, k23, k33, k43, k53 }, \ + { k04, k14, k24, k34, k44, k54 }, \ + { k05, k15, k25, k35, k45, k55 }, \ + { k06, k16, KC_NO, k36, k46, k56 }, \ + \ + { k07, k17, KC_NO, k37, k47, k57 }, \ + { k08, k18, k28, k38, k48, k58 }, \ + { k09, k19, k29, k39, k49, k59 }, \ + { k0A, k1A, k2A, k3A, k4A, k5A }, \ + { k0B, k1B, k2B, k3B, k4B, k5B }, \ + { k0C, k1C, k2C, k3C, k4C, k5C }, \ + { k0D, k1D, k2D, k3D, k4D, KC_NO } \ + } + #endif diff --git a/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png b/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png new file mode 100644 index 0000000000..66b9752ebc Binary files /dev/null and b/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png differ diff --git a/keyboards/ergodox/ez/keymaps/default_80/keymap.c b/keyboards/ergodox/ez/keymaps/default_80/keymap.c new file mode 100644 index 0000000000..505ff29722 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/default_80/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP_80( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP_80( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP_80( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/ez/keymaps/default_80/readme.md b/keyboards/ergodox/ez/keymaps/default_80/readme.md new file mode 100644 index 0000000000..b6bbb86d2c --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/default_80/readme.md @@ -0,0 +1,10 @@ +# ErgoDox 80 Default Configuration + +This is based on the default Ergodox EZ keymap. +The difference is that this keymap supports 80 key layouts. +If you own an 80 key Ergodox, use this as an example to get your desired keymap. + +**NOTE:** This layout is not physically supported by the Ergodox EZ. + + +![Default80](ergodox80.png) diff --git a/keyboards/ergodox80/Makefile b/keyboards/ergodox80/Makefile deleted file mode 100644 index 94fa847ff8..0000000000 --- a/keyboards/ergodox80/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SUBPROJECT_DEFAULT = ergodox80 - -ifndef MAKEFILE_INCLUDED - include ../../Makefile -endif diff --git a/keyboards/ergodox80/config.h b/keyboards/ergodox80/config.h deleted file mode 100644 index 5dd6daa15f..0000000000 --- a/keyboards/ergodox80/config.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef KEYBOARDS_ERGODOX_CONFIG_H_ -#define KEYBOARDS_ERGODOX_CONFIG_H_ - -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 3 -#define MOUSEKEY_TIME_TO_MAX 10 - -#define TAPPING_TOGGLE 1 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) - -/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - -#include "ergodox80/config.h" - - -#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keyboards/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80.h deleted file mode 100644 index ea40f4d455..0000000000 --- a/keyboards/ergodox80/ergodox80.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_ -#define KEYBOARDS_ERGODOX_ERGODOX_H_ -#include "ergodox80.h" - -#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */ diff --git a/keyboards/ergodox80/ergodox80/190hotfix.sh b/keyboards/ergodox80/ergodox80/190hotfix.sh deleted file mode 100755 index bdc3adce22..0000000000 --- a/keyboards/ergodox80/ergodox80/190hotfix.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -#a tool to fix broken keymaps as a result of pull request #190 -#changing the declaration of matrix_scan_user() and matrix_init_user() -# -#This script will save a copy of the specified keymap as keymap.c.bak -#and then create a new keymap.c with the definion corrected. -#this script must be run from the ergodox_ez directory -if [ $# -ne 1 ]; then - echo $0: usage: ./190hotfix keymap_name - exit 1 -fi - -echo Saving backup as ./keymaps/$1/keymap.c.bak ... -mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak - -echo Modifying ./keymaps/$1/keymap.c ... -cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c - -echo Complete! diff --git a/keyboards/ergodox80/ergodox80/Makefile b/keyboards/ergodox80/ergodox80/Makefile deleted file mode 100644 index 191c6bb664..0000000000 --- a/keyboards/ergodox80/ergodox80/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifndef MAKEFILE_INCLUDED - include ../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/ergodox80/ergodox80/config.h b/keyboards/ergodox80/ergodox80/config.h deleted file mode 100644 index 084a044ee1..0000000000 --- a/keyboards/ergodox80/ergodox80/config.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2013 Oleg Kostyuk - -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 ERGODOX_EZ_CONFIG_H -#define ERGODOX_EZ_CONFIG_H - -#include "../config.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1307 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDox EZ -#define PRODUCT ErgoDox EZ -#define DESCRIPTION QMK keyboard firmware for Ergodox EZ - -/* key matrix size */ -#define MATRIX_ROWS 14 -#define MATRIX_COLS 6 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -#define LED_BRIGHTNESS_LO 15 -#define LED_BRIGHTNESS_HI 255 - - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* - * 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 -//#define DEBUG_MATRIX_SCAN_RATE - -#endif diff --git a/keyboards/ergodox80/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80/ergodox80.c deleted file mode 100644 index b21b1073b4..0000000000 --- a/keyboards/ergodox80/ergodox80/ergodox80.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "ergodox80.h" -#include "i2cmaster.h" - -bool i2c_initialized = 0; -uint8_t mcp23018_status = 0x20; - -void matrix_init_kb(void) { - // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") - TCCR1A = 0b10101001; // set and configure fast PWM - TCCR1B = 0b00001001; // set and configure fast PWM - - // (tied to Vcc for hardware convenience) - DDRB &= ~(1<<4); // set B(4) as input - PORTB &= ~(1<<4); // set B(4) internal pull-up disabled - - // unused pins - C7, D4, D5, D7, E6 - // set as input with internal pull-ip enabled - DDRC &= ~(1<<7); - DDRD &= ~(1<<7 | 1<<5 | 1<<4); - DDRE &= ~(1<<6); - PORTC |= (1<<7); - PORTD |= (1<<7 | 1<<5 | 1<<4); - PORTE |= (1<<6); - - ergodox_blink_all_leds(); - - matrix_init_user(); -} - -void ergodox_blink_all_leds(void) -{ - ergodox_led_all_off(); - ergodox_led_all_set(LED_BRIGHTNESS_HI); - ergodox_right_led_1_on(); - _delay_ms(50); - ergodox_right_led_2_on(); - _delay_ms(50); - ergodox_right_led_3_on(); - _delay_ms(50); - ergodox_right_led_1_off(); - _delay_ms(50); - ergodox_right_led_2_off(); - _delay_ms(50); - ergodox_right_led_3_off(); - //ergodox_led_all_on(); - //_delay_ms(333); - ergodox_led_all_off(); -} - -uint8_t init_mcp23018(void) { - mcp23018_status = 0x20; - - // I2C subsystem - if (i2c_initialized == 0) { - i2c_init(); // on pins D(1,0) - i2c_initialized++; - _delay_ms(1000); - } - - // set pin direction - // - unused : input : 1 - // - input : input : 1 - // - driving : output : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; - i2c_stop(); - - // set pull-up - // - unused : on : 1 - // - input : on : 1 - // - driving : off : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; - -out: - i2c_stop(); - - return mcp23018_status; -} - - diff --git a/keyboards/ergodox80/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80/ergodox80.h deleted file mode 100644 index 8012b0a749..0000000000 --- a/keyboards/ergodox80/ergodox80/ergodox80.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef ERGODOX_EZ_H -#define ERGODOX_EZ_H - -#include "quantum.h" -#include -#include -#include "i2cmaster.h" -#include - -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define CPU_16MHz 0x00 - -// I2C aliases and register addresses (see "mcp23018.md") -#define I2C_ADDR 0b0100000 -#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) -#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) -#define IODIRA 0x00 // i/o direction register -#define IODIRB 0x01 -#define GPPUA 0x0C // GPIO pull-up resistor register -#define GPPUB 0x0D -#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) -#define GPIOB 0x13 -#define OLATA 0x14 // output latch register -#define OLATB 0x15 - -extern uint8_t mcp23018_status; - -void init_ergodox(void); -void ergodox_blink_all_leds(void); -uint8_t init_mcp23018(void); -uint8_t ergodox_left_leds_update(void); - -#define LED_BRIGHTNESS_LO 15 -#define LED_BRIGHTNESS_HI 255 - - -inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } -inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } -inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } -inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } -inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); } - -inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } -inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } -inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } -inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } -inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); } - -inline void ergodox_led_all_on(void) -{ - ergodox_board_led_on(); - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); -} - -inline void ergodox_led_all_off(void) -{ - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); -} - -inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } -inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } -inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } -inline void ergodox_right_led_set(uint8_t led, uint8_t n) { - (led == 1) ? (OCR1A = n) : - (led == 2) ? (OCR1B = n) : - (OCR1C = n); -} - -inline void ergodox_led_all_set(uint8_t n) -{ - ergodox_right_led_1_set(n); - ergodox_right_led_2_set(n); - ergodox_right_led_3_set(n); -} - -#define KEYMAP( \ - \ - /* left hand, spatial positions */ \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k45,k46,k54, \ - k53,k52,k51, \ - \ - /* right hand, spatial positions */ \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59,k47,k48, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k10, k20, k30, k40, KC_NO }, \ - { k01, k11, k21, k31, k41, k51 }, \ - { k02, k12, k22, k32, k42, k52 }, \ - { k03, k13, k23, k33, k43, k53 }, \ - { k04, k14, k24, k34, k44, k54 }, \ - { k05, k15, k25, k35, k45, k55 }, \ - { k06, k16, KC_NO, k36, k46, k56 }, \ - \ - { k07, k17, KC_NO, k37, k47, k57 }, \ - { k08, k18, k28, k38, k48, k58 }, \ - { k09, k19, k29, k39, k49, k59 }, \ - { k0A, k1A, k2A, k3A, k4A, k5A }, \ - { k0B, k1B, k2B, k3B, k4B, k5B }, \ - { k0C, k1C, k2C, k3C, k4C, k5C }, \ - { k0D, k1D, k2D, k3D, k4D, KC_NO } \ - } - -#endif diff --git a/keyboards/ergodox80/ergodox80/i2cmaster.h b/keyboards/ergodox80/ergodox80/i2cmaster.h deleted file mode 100644 index 3917b9e6c0..0000000000 --- a/keyboards/ergodox80/ergodox80/i2cmaster.h +++ /dev/null @@ -1,178 +0,0 @@ -#ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 -/************************************************************************* -* Title: C include file for the I2C master interface -* (i2cmaster.S or twimaster.c) -* Author: Peter Fleury http://jump.to/fleury -* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device -* Usage: see Doxygen manual -**************************************************************************/ - -#ifdef DOXYGEN -/** - @defgroup pfleury_ic2master I2C Master library - @code #include @endcode - - @brief I2C (TWI) Master Software Library - - Basic routines for communicating with I2C slave devices. This single master - implementation is limited to one bus master on the I2C bus. - - This I2c library is implemented as a compact assembler software implementation of the I2C protocol - which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). - Since the API for these two implementations is exactly the same, an application can be linked either against the - software I2C implementation or the hardware I2C implementation. - - Use 4.7k pull-up resistor on the SDA and SCL pin. - - Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module - i2cmaster.S to your target when using the software I2C implementation ! - - Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. - - @note - The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted - to GNU assembler and AVR-GCC C call interface. - Replaced the incorrect quarter period delays found in AVR300 with - half period delays. - - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - - @par API Usage Example - The following code shows typical usage of this library, see example test_i2cmaster.c - - @code - - #include - - - #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet - - int main(void) - { - unsigned char ret; - - i2c_init(); // initialize I2C library - - // write 0x75 to EEPROM address 5 (Byte Write) - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - i2c_write(0x05); // write address = 5 - i2c_write(0x75); // write value 0x75 to EEPROM - i2c_stop(); // set stop conditon = release bus - - - // read previously written value back from EEPROM address 5 - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - - i2c_write(0x05); // write address = 5 - i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode - - ret = i2c_readNak(); // read one byte from EEPROM - i2c_stop(); - - for(;;); - } - @endcode - -*/ -#endif /* DOXYGEN */ - -/**@{*/ - -#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 -#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" -#endif - -#include - -/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_READ 1 - -/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_WRITE 0 - - -/** - @brief initialize the I2C master interace. Need to be called only once - @param void - @return none - */ -extern void i2c_init(void); - - -/** - @brief Terminates the data transfer and releases the I2C bus - @param void - @return none - */ -extern void i2c_stop(void); - - -/** - @brief Issues a start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_start(unsigned char addr); - - -/** - @brief Issues a repeated start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_rep_start(unsigned char addr); - - -/** - @brief Issues a start condition and sends address and transfer direction - - If device is busy, use ack polling to wait until device ready - @param addr address and transfer direction of I2C device - @return none - */ -extern void i2c_start_wait(unsigned char addr); - - -/** - @brief Send one byte to I2C device - @param data byte to be transfered - @retval 0 write successful - @retval 1 write failed - */ -extern unsigned char i2c_write(unsigned char data); - - -/** - @brief read one byte from the I2C device, request more data from device - @return byte read from I2C device - */ -extern unsigned char i2c_readAck(void); - -/** - @brief read one byte from the I2C device, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_readNak(void); - -/** - @brief read one byte from the I2C device - - Implemented as a macro, which calls either i2c_readAck or i2c_readNak - - @param ack 1 send ack, request more data from device
- 0 send nak, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_read(unsigned char ack); -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - - -/**@}*/ -#endif diff --git a/keyboards/ergodox80/ergodox80/matrix.c b/keyboards/ergodox80/ergodox80/matrix.c deleted file mode 100644 index c352924b52..0000000000 --- a/keyboards/ergodox80/ergodox80/matrix.c +++ /dev/null @@ -1,382 +0,0 @@ -/* - -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - -Copyright 2013 Oleg Kostyuk - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "wait.h" -#include "action_layer.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "ergodox80.h" -#include "i2cmaster.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif - -/* - * This constant define not debouncing time in msecs, but amount of matrix - * scan loops which should be made to get stable debounced results. - * - * On Ergodox matrix scan rate is relatively low, because of slow I2C. - * Now it's only 317 scans/second, or about 3.15 msec/scan. - * According to Cherry specs, debouncing time is 5 msec. - * - * And so, there is no sense to have DEBOUNCE higher than 2. - */ - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(uint8_t row); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - -static uint8_t mcp23018_reset_loop; - -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - - mcp23018_status = init_mcp23018(); - - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - - matrix_init_kb(); - -} - -void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - -} - -uint8_t matrix_scan(void) -{ - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); - } - } - } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - wait_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(i); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - wait_us(1); - // this should be wait_ms(1) but has been left as-is at EZ's request - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1< http://jump.to/fleury -* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device with hardware TWI -* Usage: API compatible with I2C Software Library i2cmaster.h -**************************************************************************/ -#include -#include - -#include - - -/* define CPU frequency in Mhz here if not defined in Makefile */ -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -/* I2C clock in Hz */ -#define SCL_CLOCK 400000L - - -/************************************************************************* - Initialization of the I2C bus interface. Need to be called only once -*************************************************************************/ -void i2c_init(void) -{ - /* initialize TWI clock - * minimal values in Bit Rate Register (TWBR) and minimal Prescaler - * bits in the TWI Status Register should give us maximal possible - * I2C bus speed - about 444 kHz - * - * for more details, see 20.5.2 in ATmega16/32 secification - */ - - TWSR = 0; /* no prescaler */ - TWBR = 10; /* must be >= 10 for stable operation */ - -}/* i2c_init */ - - -/************************************************************************* - Issues a start condition and sends address and transfer direction. - return 0 = device accessible, 1= failed to access device -*************************************************************************/ -unsigned char i2c_start(unsigned char address) -{ - uint8_t twst; - - // send START condition - TWCR = (1<= 0: - if section['name'] == 'layout_config': - config.update(loads("\n".join( - section['code_lines'] - ))) - elif section['sub_name'].startswith('layer'): - layer_name = section['sub_name'] - config['layer_lines'][layer_name] = section['code_lines'] - - reset_section() - - def amend_section(line_index, line): - section['end_line'] = line_index - section['code_lines'].append(line) - - config = DEFAULT_CONFIG.copy() - config.update({ - 'layer_lines': collections.OrderedDict(), - 'macro_ids': {'UM'}, - 'unicode_macros': {}, - }) - - section = {} - reset_section() - - with io.open(path, encoding="utf-8") as fh: - for i, line in enumerate(fh): - if line.startswith("#"): - start_section(i, line) - elif line.startswith(" "): - amend_section(i, line[4:]) - else: - # TODO: maybe parse description - pass - - end_section() - assert 'layout' in config - return config - -# header file parsing - -IF0_RE = re.compile(r""" - ^ - #if 0 - $.*? - #endif -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -COMMENT_RE = re.compile(r""" - /\* - .*? - \*/" -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -def read_header_file(path): - with io.open(path, encoding="utf-8") as fh: - data = fh.read() - data, _ = COMMENT_RE.subn("", data) - data, _ = IF0_RE.subn("", data) - return data - - -def regex_partial(re_str_fmt, flags): - def partial(*args, **kwargs): - re_str = re_str_fmt.format(*args, **kwargs) - return re.compile(re_str, flags) - return partial - - -KEYDEF_REP = regex_partial(r""" - #define - \s - ( - (?:{}) # the prefixes - (?:\w+) # the key name - ) # capture group end -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -ENUM_RE = re.compile(r""" - ( - enum - \s\w+\s - \{ - .*? # the enum content - \} - ; - ) # capture group end -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -ENUM_KEY_REP = regex_partial(r""" - ( - {} # the prefixes - \w+ # the key name - ) # capture group end -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -def parse_keydefs(config, data): - prefix_options = "|".join(config['key_prefixes']) - keydef_re = KEYDEF_REP(prefix_options) - enum_key_re = ENUM_KEY_REP(prefix_options) - for match in keydef_re.finditer(data): - yield match.groups()[0] - - for enum_match in ENUM_RE.finditer(data): - enum = enum_match.groups()[0] - for key_match in enum_key_re.finditer(enum): - yield key_match.groups()[0] - - -def parse_valid_keys(config, out_path): - basepath = os.path.abspath(os.path.join(os.path.dirname(out_path))) - dirpaths = [] - subpaths = [] - while len(subpaths) < 6: - path = os.path.join(basepath, *subpaths) - dirpaths.append(path) - dirpaths.append(os.path.join(path, "tmk_core", "common")) - dirpaths.append(os.path.join(path, "quantum")) - subpaths.append('..') - - includes = set(config['keymaps_includes']) - includes.add("keycode.h") - - valid_keycodes = set() - for dirpath, include in it.product(dirpaths, includes): - include_path = os.path.join(dirpath, include) - if os.path.exists(include_path): - header_data = read_header_file(include_path) - valid_keycodes.update( - parse_keydefs(config, header_data) - ) - return valid_keycodes - - -# Keymap Parsing - -def iter_raw_codes(layer_lines, filler, separator): - filler_re = re.compile("[" + filler + " ]") - for line in layer_lines: - line, _ = filler_re.subn("", line.strip()) - if not line: - continue - codes = line.split(separator) - for code in codes[1:-1]: - yield code - - -def iter_indexed_codes(raw_codes, key_indexes): - key_rows = {} - key_indexes_flat = [] - - for row_index, key_indexes in enumerate(key_indexes): - for key_index in key_indexes: - key_rows[key_index] = row_index - key_indexes_flat.extend(key_indexes) - assert len(raw_codes) == len(key_indexes_flat) - for raw_code, key_index in zip(raw_codes, key_indexes_flat): - # we keep track of the row mostly for layout purposes - yield raw_code, key_index, key_rows[key_index] - - -LAYER_CHANGE_RE = re.compile(r""" - (DF|TG|MO)\(\d+\) -""", re.VERBOSE) - - -MACRO_RE = re.compile(r""" - M\(\w+\) -""", re.VERBOSE) - - -UNICODE_RE = re.compile(r""" - U[0-9A-F]{4} -""", re.VERBOSE) - - -NON_CODE = re.compile(r""" - ^[^A-Z0-9_]$ -""", re.VERBOSE) - - -def parse_uni_code(raw_code): - macro_id = "UC_" + ( - unicodedata.name(raw_code) - .replace(" ", "_") - .replace("-", "_") - ) - code = "M({})".format(macro_id) - uc_hex = "{:04X}".format(ord(raw_code)) - return code, macro_id, uc_hex - - -def parse_key_code(raw_code, key_prefixes, valid_keycodes): - if raw_code in valid_keycodes: - return raw_code - - for prefix in key_prefixes: - code = prefix + raw_code - if code in valid_keycodes: - return code - - -def parse_code(raw_code, key_prefixes, valid_keycodes): - if not raw_code: - return 'KC_TRNS', None, None - - if LAYER_CHANGE_RE.match(raw_code): - return raw_code, None, None - - if MACRO_RE.match(raw_code): - macro_id = raw_code[2:-1] - return raw_code, macro_id, None - - if UNICODE_RE.match(raw_code): - hex_code = raw_code[1:] - return parse_uni_code(chr(int(hex_code, 16))) - - if NON_CODE.match(raw_code): - return parse_uni_code(raw_code) - - code = parse_key_code(raw_code, key_prefixes, valid_keycodes) - return code, None, None - - -def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): - keymap = {} - raw_codes = list(iter_raw_codes( - layer_lines, config['filler'], config['separator'] - )) - indexed_codes = iter_indexed_codes(raw_codes, key_indexes) - key_prefixes = config['key_prefixes'] - for raw_code, key_index, row_index in indexed_codes: - code, macro_id, uc_hex = parse_code( - raw_code, key_prefixes, valid_keycodes - ) - # TODO: line numbers for invalid codes - err_msg = "Could not parse key '{}' on row {}".format( - raw_code, row_index - ) - assert code is not None, err_msg - # print(repr(raw_code), repr(code), macro_id, uc_hex) - if macro_id: - config['macro_ids'].add(macro_id) - if uc_hex: - config['unicode_macros'][macro_id] = uc_hex - keymap[key_index] = (code, row_index) - return keymap - - -def parse_keymaps(config, valid_keycodes): - keymaps = collections.OrderedDict() - key_indexes = config.get( - 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] - ) - # TODO: maybe validate key_indexes - - for layer_name, layer_lines, in config['layer_lines'].items(): - keymaps[layer_name] = parse_keymap( - config, key_indexes, layer_lines, valid_keycodes - ) - return keymaps - -# keymap.c output - -USERCODE = """ -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - case L1: - ergodox_right_led_1_on(); - break; - case L2: - ergodox_right_led_2_on(); - break; - case L3: - ergodox_right_led_3_on(); - break; - case L4: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case L5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - // case L6: - // ergodox_right_led_2_on(); - // ergodox_right_led_3_on(); - // break; - // case L7: - // ergodox_right_led_1_on(); - // ergodox_right_led_2_on(); - // ergodox_right_led_3_on(); - // break; - default: - ergodox_board_led_off(); - break; - } -}; -""" - -MACROCODE = """ -#define UC_MODE_WIN 0 -#define UC_MODE_LINUX 1 -#define UC_MODE_OSX 2 - -// TODO: allow default mode to be configured -static uint16_t unicode_mode = UC_MODE_WIN; - -uint16_t hextokeycode(uint8_t hex) {{ - if (hex == 0x0) {{ - return KC_P0; - }} - if (hex < 0xA) {{ - return KC_P1 + (hex - 0x1); - }} - return KC_A + (hex - 0xA); -}} - -void unicode_action_function(uint16_t hi, uint16_t lo) {{ - switch (unicode_mode) {{ - case UC_MODE_WIN: - register_code(KC_LALT); - - register_code(KC_PPLS); - unregister_code(KC_PPLS); - - register_code(hextokeycode((hi & 0xF0) >> 4)); - unregister_code(hextokeycode((hi & 0xF0) >> 4)); - register_code(hextokeycode((hi & 0x0F))); - unregister_code(hextokeycode((hi & 0x0F))); - register_code(hextokeycode((lo & 0xF0) >> 4)); - unregister_code(hextokeycode((lo & 0xF0) >> 4)); - register_code(hextokeycode((lo & 0x0F))); - unregister_code(hextokeycode((lo & 0x0F))); - - unregister_code(KC_LALT); - break; - case UC_MODE_LINUX: - register_code(KC_LCTL); - register_code(KC_LSFT); - - register_code(KC_U); - unregister_code(KC_U); - - register_code(hextokeycode((hi & 0xF0) >> 4)); - unregister_code(hextokeycode((hi & 0xF0) >> 4)); - register_code(hextokeycode((hi & 0x0F))); - unregister_code(hextokeycode((hi & 0x0F))); - register_code(hextokeycode((lo & 0xF0) >> 4)); - unregister_code(hextokeycode((lo & 0xF0) >> 4)); - register_code(hextokeycode((lo & 0x0F))); - unregister_code(hextokeycode((lo & 0x0F))); - - unregister_code(KC_LCTL); - unregister_code(KC_LSFT); - break; - case UC_MODE_OSX: - break; - }} -}} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ - if (!record->event.pressed) {{ - return MACRO_NONE; - }} - // MACRODOWN only works in this function - switch(id) {{ - case UM: - unicode_mode = (unicode_mode + 1) % 2; - break; -{macro_cases} -{unicode_macro_cases} - default: - break; - }} - return MACRO_NONE; -}}; -""" - - -UNICODE_MACRO_TEMPLATE = """ -case {macro_id}: - unicode_action_function(0x{hi:02x}, 0x{lo:02x}); - break; -""".strip() - - -def unicode_macro_cases(config): - for macro_id, uc_hex in config['unicode_macros'].items(): - hi = int(uc_hex, 16) >> 8 - lo = int(uc_hex, 16) & 0xFF - unimacro_keys = ", ".join( - "T({})".format( - "KP_" + digit if digit.isdigit() else digit - ) for digit in uc_hex - ) - yield UNICODE_MACRO_TEMPLATE.format( - macro_id=macro_id, hi=hi, lo=lo - ) - - -def iter_keymap_lines(keymap, row_indents=None): - col_widths = {} - col = 0 - # first pass, figure out the column widths - prev_row_index = None - for code, row_index in keymap.values(): - if row_index != prev_row_index: - col = 0 - if row_indents: - col = row_indents[row_index] - col_widths[col] = max(len(code), col_widths.get(col, 0)) - prev_row_index = row_index - col += 1 - - # second pass, yield the cell values - col = 0 - prev_row_index = None - for key_index in sorted(keymap): - code, row_index = keymap[key_index] - if row_index != prev_row_index: - col = 0 - yield "\n" - if row_indents: - for indent_col in range(row_indents[row_index]): - pad = " " * (col_widths[indent_col] - 4) - yield (" /*-*/" + pad) - col = row_indents[row_index] - else: - yield pad - yield " {}".format(code) - if key_index < len(keymap) - 1: - yield "," - # This will be yielded on the next iteration when - # we know that we're not at the end of a line. - pad = " " * (col_widths[col] - len(code)) - prev_row_index = row_index - col += 1 - - -def iter_keymap_parts(config, keymaps): - # includes - for include_path in config['keymaps_includes']: - yield '#include "{}"\n'.format(include_path) - - yield "\n" - - # definitions - for i, macro_id in enumerate(sorted(config['macro_ids'])): - yield "#define {} {}\n".format(macro_id, i) - - yield "\n" - - for i, layer_name in enumerate(config['layer_lines']): - yield '#define L{0:<3} {0:<5} // {1}\n'.format(i, layer_name) - - yield "\n" - - # keymaps - yield "const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n" - - for i, layer_name in enumerate(config['layer_lines']): - # comment - layer_lines = config['layer_lines'][layer_name] - prefixed_lines = " * " + " * ".join(layer_lines) - yield "/*\n{} */\n".format(prefixed_lines) - - # keymap codes - keymap = keymaps[layer_name] - row_indents = ROW_INDENTS.get(config['layout']) - keymap_lines = "".join(iter_keymap_lines(keymap, row_indents)) - yield "[L{0}] = KEYMAP({1}\n),\n".format(i, keymap_lines) - - yield "};\n\n" - - # no idea what this is for - yield "const uint16_t PROGMEM fn_actions[] = {};\n" - - # macros - yield MACROCODE.format( - macro_cases="", - unicode_macro_cases="\n".join(unicode_macro_cases(config)), - ) - - # TODO: dynamically create blinking lights - yield USERCODE - - -def main(argv=sys.argv[1:]): - if not argv or '-h' in argv or '--help' in argv: - print(__doc__) - return 0 - - in_path = os.path.abspath(argv[0]) - if not os.path.exists(in_path): - print("No such file '{}'".format(in_path)) - return 1 - - if len(argv) > 1: - out_path = os.path.abspath(argv[1]) - else: - dirname = os.path.dirname(in_path) - out_path = os.path.join(dirname, "keymap.c") - - config = parse_config(in_path) - valid_keys = parse_valid_keys(config, out_path) - keymaps = parse_keymaps(config, valid_keys) - - with io.open(out_path, mode="w", encoding="utf-8") as fh: - for part in iter_keymap_parts(config, keymaps): - fh.write(part) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/keyboards/ergodox80/ergodox80/util/readme.md b/keyboards/ergodox80/ergodox80/util/readme.md deleted file mode 100644 index 26c5e5d99c..0000000000 --- a/keyboards/ergodox80/ergodox80/util/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# ErgoDox EZ Utilities - -The Python script in this directory, by [mbarkhau](https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. diff --git a/keyboards/ergodox80/keymaps/default/keymap.c b/keyboards/ergodox80/keymaps/default/keymap.c deleted file mode 100644 index 2da2c5b0e4..0000000000 --- a/keyboards/ergodox80/keymaps/default/keymap.c +++ /dev/null @@ -1,183 +0,0 @@ -#include "ergodox80.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | 1 | 2 | Home | | PgUp | 3 | 4 | - * |------|------|------| |------|--------|------| - * | Space| BkSp | End | | PgDn | Tab |Enter | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_1, KC_2, KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP,KC_3, KC_4, - KC_PGDN,KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * |------|------|------| |------|------|------| - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+----------. - * | | | | | | | | - * |------|------|------| |------|------|----------| - * | | | | | | |BrwserBack| - * `--------------------' `------------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox80/readme.md b/keyboards/ergodox80/readme.md deleted file mode 100644 index b5c09f9222..0000000000 --- a/keyboards/ergodox80/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# Ergodox 80 key support - -This is based on the ergodox-ez qmk firmware but is for ergodoxes with 80 keys. - - - diff --git a/keyboards/ergodox80/rules.mk b/keyboards/ergodox80/rules.mk deleted file mode 100644 index ac63d4eff2..0000000000 --- a/keyboards/ergodox80/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- -# Build Options -# comment out to disable the options. -# -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 -CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ -SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= yes # Unicode -- cgit v1.2.3 From 558f3ec1eb325caf706efc15e2fab26121aba442 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 6 Sep 2016 23:19:01 -0500 Subject: Use keyboard config for nkro (#7) * removing nkro references - wip * changed NKRO to be defined by keymap_config --- keyboards/planck/keymaps/pvc/Makefile | 4 ++-- keyboards/planck/keymaps/pvc/keymap.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/pvc/Makefile b/keyboards/planck/keymaps/pvc/Makefile index 0b2f060de4..19c3abc6c6 100644 --- a/keyboards/planck/keymaps/pvc/Makefile +++ b/keyboards/planck/keymaps/pvc/Makefile @@ -1,9 +1,9 @@ # 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 = yes # Virtual DIP switch configuration(+1000) +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) diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 8ff40f377c..23aedfc998 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -83,6 +83,7 @@ enum keyboard_macros { #define SC_ACLS LALT(KC_F4) #define SC_CCLS LCTL(KC_F4) +#define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 #define _______ KC_TRNS @@ -206,7 +207,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_ADJUST] = { { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG , AU_TOG }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, + { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , TG_NKRO, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } }, @@ -236,7 +237,7 @@ void persistant_default_layer_set(uint16_t default_layer) } const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [0] = ACTION_MODS_ONESHOT(MOD_RSFT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -- cgit v1.2.3 From 54214b3abcae2189341d124c29336b911d88da41 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Wed, 7 Sep 2016 13:29:29 -0400 Subject: Borrowed joint Shift/Enter idea from sgoodwin mapping --- keyboards/planck/keymaps/cbbrowne/keymap.c | 2 +- keyboards/planck/keymaps/cbbrowne/readme.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 63566f862d..898f6f0e0a 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,7 +84,7 @@ enum macro_id { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 5af688bb17..51979f6300 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -77,3 +77,4 @@ doing sundry experimentation: * The jeebak keymap seems to have some neat ideas: - Number layer which is aggressive about having numbers in several places - Touch layer seems interesting + * Trying out sgoodwin's "hold Enter down to get Shift" \ No newline at end of file -- cgit v1.2.3 From e5396ca9e5ccb714a757b6559c9f7e95bf372e3f Mon Sep 17 00:00:00 2001 From: Nathan Sharfi Date: Wed, 7 Sep 2016 18:23:01 -0700 Subject: zweihander: rename to Makefile --- keyboards/ergodox/keymaps/zweihander-osx/Makefile | 2 ++ keyboards/ergodox/keymaps/zweihander-osx/makefile.mk | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 keyboards/ergodox/keymaps/zweihander-osx/Makefile delete mode 100644 keyboards/ergodox/keymaps/zweihander-osx/makefile.mk (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/zweihander-osx/Makefile b/keyboards/ergodox/keymaps/zweihander-osx/Makefile new file mode 100644 index 0000000000..6e3d088a43 --- /dev/null +++ b/keyboards/ergodox/keymaps/zweihander-osx/Makefile @@ -0,0 +1,2 @@ +# Don’t do a tricolor wave when the computer is shut down in Windows +SLEEP_LED_ENABLE = no diff --git a/keyboards/ergodox/keymaps/zweihander-osx/makefile.mk b/keyboards/ergodox/keymaps/zweihander-osx/makefile.mk deleted file mode 100644 index 6e3d088a43..0000000000 --- a/keyboards/ergodox/keymaps/zweihander-osx/makefile.mk +++ /dev/null @@ -1,2 +0,0 @@ -# Don’t do a tricolor wave when the computer is shut down in Windows -SLEEP_LED_ENABLE = no -- cgit v1.2.3 From 273a6cc688ef4c8f7964d8c62147c8697db42cde Mon Sep 17 00:00:00 2001 From: Nathan Sharfi Date: Wed, 7 Sep 2016 20:28:31 -0700 Subject: =?UTF-8?q?-=20Make=20thumb-accessible=20=E2=8C=A5=20and=20?= =?UTF-8?q?=E2=8C=83=20into=20right-=E2=8C=A5=20and=20right-=E2=8C=83=20-?= =?UTF-8?q?=20remove=20media-space=20and=20media-shift-space;=20put=20a=20?= =?UTF-8?q?play/pause=20key=20at=20media-m=20instead=20-=20add=20print=20s?= =?UTF-8?q?creen,=20scroll=20lock,=20and=20pause/break=20to=20the=20media?= =?UTF-8?q?=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And in the readme: - don't say we don't have any Windows-specific keys - add mnemonics for thumb-alt and thumb-ctrl positioning --- keyboards/ergodox/keymaps/zweihander-osx/keymap.c | 14 +++++++------- keyboards/ergodox/keymaps/zweihander-osx/readme.markdown | 8 +++++--- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/zweihander-osx/keymap.c b/keyboards/ergodox/keymaps/zweihander-osx/keymap.c index d6d66fd55d..725a73e346 100644 --- a/keyboards/ergodox/keymaps/zweihander-osx/keymap.c +++ b/keyboards/ergodox/keymaps/zweihander-osx/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,------|------|------| |------+--------+------. * | | | PgUp | | PgDn | | | * | | ⇥ |------| |------| ⇥ |Enter | - * | | | L⌥ | | L⌃ | | | + * | | | R⌥ | | R⌃ | | | * `--------------------' `----------------------' */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT, KC_GRV, KC_QUOT, KC_PGUP, - KC_SPC,KC_TAB ,KC_LALT, + KC_SPC,KC_TAB ,KC_RALT, // right hand TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_SPC , KC_ESC, KC_BSPC, KC_PGDN, - KC_LCTL, KC_TAB, KC_ENT + KC_RCTL, KC_TAB, KC_ENT ), /* Keymap 1: Symbol Layer * @@ -102,13 +102,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power | + * | | F14 | F15 |PrtScr|SclLck| Pause| | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | PgUp |⌘S⌘⇥⌘R| Term | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |Safari| PgDn | | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | |BBEdit| | | |L⇧+Spc| Spc | ⏮ | ⏭ | | | + * | | | | | |BBEdit| | | | | ⏯ | ⏮ | ⏭ | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MDIA] = KEYMAP( - KC_TRNS, KC_F14 , KC_F15 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, /* F14 dims screen, F15 brightens */ + KC_TRNS, KC_F14 , KC_F15 , KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, /* F14 dims screen, F15 brightens */ KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, M(SGWF), M(TMNL), KC_TRNS, KC_TRNS, KC_TRNS, M(SAFA), KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(BBED), KC_TRNS, @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), KC_TRNS, KC_TRNS, KC_PWR , KC_TRNS, LGUI(KC_RBRC), LGUI(LALT(KC_UP)), KC_UP , LGUI(LALT(KC_DOWN)), KC_TRNS, KC_TRNS, LGUI(KC_LBRC), KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_MPLY, - KC_TRNS, LSFT(KC_SPC), KC_SPC , KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END , diff --git a/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown b/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown index 3b7f52941a..5125a12ee1 100644 --- a/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown +++ b/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown @@ -7,7 +7,7 @@ This layout is tuned for people who… ## use OS X -This layout doesn’t make any concessions for Windows use. While it should work fine in Windows, I’m not about to devote precious keyboard space to Windows-specific shortcuts. +While this layout should work fine in Windows, it’s not tuned for it. No sane person who primarily uses Windows would put this many Windows keys on a keyboard layout. ## mouse left-handed while doing other things with the right hand @@ -21,8 +21,6 @@ I tend to have my mouse in my left hand, but I like to use my other hand to make - Go Up and Close Just-Left Folder (⌥⌘↑) - Cycle through open windows in current application (⌘\` and ⌘⇧\`) - Cycle through tabs in current window (⌥⇥ and ⌥⇧⇥) -- Space (page down in browsers; Quick Look in the Finder) -- Shift-Space (page up in web browsers) Because moving letter-by-letter is way slower than moving word-by-word, I added Option (⌥) to the bottommost button on the left side. This key can be held easily while holding ; (activate media layer) and pressing J and L to move left and right by word. @@ -34,11 +32,15 @@ I wanted to preserve the feel of a number of shortcuts that involve pressing lot - Empty Trash Without Asking for Confirmation (⇧⌥⌘⌫) - Shut Down Without Asking for Confirmation (⇧⌥⌘ power) +⇧⌥⌘⌫, when you press the backspace on the right half of the keyboard, is much more satisfying than if you curl your left hand into a claw to press all the keys on the left. Try both; you’ll agree. + ## use Emacs-style shortcuts I press C-a, C-e, and C-k all the time. It’s difficult to press these key combinations with the control key on the bottom left and I’m too quick on the draw for the control function on the / key to work reliably, so the bottommost thumb button on the right side is another control key. +Having trouble remembering which thumb key is alt and which is ctrl? It’s like on the lower right of a normal keyboard — leftmost is alt, rightmost is ctrl. + ## use spreadsheets -- cgit v1.2.3 From fe2aed0d1c8d1535c160755b76186972071aed02 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 7 Sep 2016 23:50:58 -0500 Subject: Added User Print - A "light" console out option (#8) User print disables the normal print messages in the body of QMK/TMK code and is meant as a lightweight alternative to NOPRINT. Use it when you only want to do a spot of debugging but lack flash resources for allowing all of the codebase to print (and store their wasteful strings). --- keyboards/planck/keymaps/pvc/Makefile | 2 +- keyboards/planck/keymaps/pvc/config.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/pvc/Makefile b/keyboards/planck/keymaps/pvc/Makefile index 19c3abc6c6..b2ff961fa5 100644 --- a/keyboards/planck/keymaps/pvc/Makefile +++ b/keyboards/planck/keymaps/pvc/Makefile @@ -6,7 +6,7 @@ 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) +CONSOLE_ENABLE = yes # 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 diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index 1113372b0a..1004c8b99f 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -68,10 +68,18 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +#ifndef NO_DEBUG +# define NO_DEBUG +#endif /* disable print */ -//#define NO_PRINT +// #ifndef NO_PRINT +// # define NO_PRINT +// #endif + +/* Only print user print statements */ +#define USER_PRINT + /* disable action features */ //#define NO_ACTION_LAYER -- cgit v1.2.3 From 740b4bbe463545c3547c41def88fa30abbc734fc Mon Sep 17 00:00:00 2001 From: Roman Zolotarev Date: Thu, 8 Sep 2016 21:12:34 +0800 Subject: Fix typo --- keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md index a86061285a..4fa1814fb1 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md +++ b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md @@ -20,7 +20,7 @@ It is `CTL_T(KC_ESC)` and it works this way: ## How to activate N-rollover -- Hold left `SHIFT` and right `SHIRT` and then tap `N`. +- Hold left `SHIFT` and right `SHIFT` and then tap `N`. ## How to make and flash on OS X -- cgit v1.2.3 From 98e43f995d845d44976e4c4f86addb996ab79acc Mon Sep 17 00:00:00 2001 From: tong92 Date: Thu, 8 Sep 2016 23:37:13 +0900 Subject: add tong92 keymap --- keyboards/planck/keymaps/tong92/Makefile | 62 +++++++++++++ keyboards/planck/keymaps/tong92/keymap.c | 146 ++++++++++++++++++++++++++++++ keyboards/planck/keymaps/tong92/readme.md | 66 ++++++++++++++ 3 files changed, 274 insertions(+) create mode 100644 keyboards/planck/keymaps/tong92/Makefile create mode 100644 keyboards/planck/keymaps/tong92/keymap.c create mode 100644 keyboards/planck/keymaps/tong92/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/tong92/Makefile b/keyboards/planck/keymaps/tong92/Makefile new file mode 100644 index 0000000000..e6608e74c5 --- /dev/null +++ b/keyboards/planck/keymaps/tong92/Makefile @@ -0,0 +1,62 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk 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 = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c new file mode 100644 index 0000000000..2be28fb4f6 --- /dev/null +++ b/keyboards/planck/keymaps/tong92/keymap.c @@ -0,0 +1,146 @@ +//Author: tong92 + +#include "planck.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define LOWER M(1) +#define RAISE M(2) +#define GO_DEFT M(99) +# + +//MIT Layout +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* 0: Qwerty layer (Default) +* ,-----------------------------------------------------------------------. +* |Tab | q | w | e | r | t | y | u | i | o | p | BS | +* |-----------------------------------------------------------------------| +* |Ctrl | a | s | d | f | g | h | j | k | l | ; |enter| +* |-----------------------------------------------------------------------| +* |Shift| z | x | c | v | b | n | m | , | . | / |Shift| +* |-----------------------------------------------------------------------| +* | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt | +* `-----------------------------------------------------------------------' +*/ +[0] ={ +{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, +{KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT }, +{KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT}, +{MO(4), KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT} +}, +/* 1: Lower layer +* ,-----------------------------------------------------------------------. +* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS | +* |-----------------------------------------------------------------------| +* | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ | +* |-----------------------------------------------------------------------| +* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| +* |-----------------------------------------------------------------------| +* | | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT| +* `-----------------------------------------------------------------------' +*/ +[1] ={ +{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS }, +{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN }, +{XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT} +}, +/* 2: Upper layer +* ,-----------------------------------------------------------------------. +* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS | +* |-----------------------------------------------------------------------| +* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | | +* |-----------------------------------------------------------------------| +* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| +* |-----------------------------------------------------------------------| +* | | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT| +* `-----------------------------------------------------------------------' +*/ +[2] ={ +{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE }, +{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN }, +{XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT} +}, +/* 4: fn layer (Window shortcuts) +* ,-----------------------------------------------------------------------. +* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL | +* |-----------------------------------------------------------------------| +* | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | | +* |-----------------------------------------------------------------------| +* | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | | +* |-----------------------------------------------------------------------| +* | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED | +* `-----------------------------------------------------------------------' +*/ +[4] ={ +{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT}, +{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX}, +{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX}, +{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DELT)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,M(0)} +}, +/* 10: mouse layer +* ,-----------------------------------------------------------------------. +* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET| +* |-----------------------------------------------------------------------| +* | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | | +* |-----------------------------------------------------------------------| +* | | | | | | | |M_AC0|M_AC1|M_AC2| | | +* |-----------------------------------------------------------------------| +* | | | | | | GO_DEFT | | | | | | +* `-----------------------------------------------------------------------' +*/ +[10] ={ +{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET}, +{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX}, +{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX}, +{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX} +} + +}; +//Layout END + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } + break; + case 1: + if (record->event.pressed) { + layer_on(1); + update_tri_layer(1, 2, 10); + } else { + layer_off(1); + update_tri_layer(1, 2, 10); + } + break; + case 2: + if (record->event.pressed) { + layer_on(2); + update_tri_layer(1, 2, 10); + } else { + layer_off(2); + update_tri_layer(1, 2, 10); + } + break; + case 99: + if (record->event.pressed) { + layer_off(10); + layer_off(1); + layer_off(2); + layer_on(0); + update_tri_layer(0 ,1 ,2); + } + break; + } + return MACRO_NONE; +}; \ No newline at end of file diff --git a/keyboards/planck/keymaps/tong92/readme.md b/keyboards/planck/keymaps/tong92/readme.md new file mode 100644 index 0000000000..328d005f6f --- /dev/null +++ b/keyboards/planck/keymaps/tong92/readme.md @@ -0,0 +1,66 @@ +# The Tong92 Layout +- MIT Layout +- my keymap for WIndow User +- Lower && Upper Hold -> Mouse Layer +- Mouse Layer : space -> Default Layer +- No Audio + +## 1. Default Layer - Qwerty + + ,-----------------------------------------------------------------------. + |Tab | q | w | e | r | t | y | u | i | o | p | BS | + |-----------------------------------------------------------------------| + |Ctrl | a | s | d | f | g | h | j | k | l | ; |enter| + |-----------------------------------------------------------------------| + |Shift| z | x | c | v | b | n | m | , | . | / |Shift| + |-----------------------------------------------------------------------| + | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt | + `-----------------------------------------------------------------------' + +## 2. Lower Layer + + ,-----------------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS | + |-----------------------------------------------------------------------| + | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ | + |-----------------------------------------------------------------------| + | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| + |-----------------------------------------------------------------------| + | | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT| + `-----------------------------------------------------------------------' + +## 3. Upper Layer + + ,-----------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS | + |-----------------------------------------------------------------------| + | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | | + |-----------------------------------------------------------------------| + | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| + |-----------------------------------------------------------------------| + | | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT| + `-----------------------------------------------------------------------' + +## 4. Fn Layer - Window Shortcuts + + ,-----------------------------------------------------------------------. + | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL | + |-----------------------------------------------------------------------| + | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | | + |-----------------------------------------------------------------------| + | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | | + |-----------------------------------------------------------------------| + | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED | + `-----------------------------------------------------------------------' + +## 5. Mouse Layer + + ,-----------------------------------------------------------------------. + | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET| + |-----------------------------------------------------------------------| + | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | | + |-----------------------------------------------------------------------| + | | | | | | | |M_AC0|M_AC1|M_AC2| | | + |-----------------------------------------------------------------------| + | | | | | |GO_DEFAULT | | | | | | + `-----------------------------------------------------------------------' \ No newline at end of file -- cgit v1.2.3 From b83f76e1b070236344837cc6838852daa08e6436 Mon Sep 17 00:00:00 2001 From: profet23 Date: Thu, 8 Sep 2016 23:34:55 -0400 Subject: Changing keymap name to "profet_80" --- .../ergodox/ez/keymaps/default_80/ergodox80.png | Bin 20663 -> 0 bytes keyboards/ergodox/ez/keymaps/default_80/keymap.c | 183 --------------------- keyboards/ergodox/ez/keymaps/default_80/readme.md | 10 -- .../ergodox/ez/keymaps/profet_80/ergodox80.png | Bin 0 -> 20663 bytes keyboards/ergodox/ez/keymaps/profet_80/keymap.c | 183 +++++++++++++++++++++ keyboards/ergodox/ez/keymaps/profet_80/readme.md | 10 ++ 6 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 keyboards/ergodox/ez/keymaps/default_80/ergodox80.png delete mode 100644 keyboards/ergodox/ez/keymaps/default_80/keymap.c delete mode 100644 keyboards/ergodox/ez/keymaps/default_80/readme.md create mode 100644 keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png create mode 100644 keyboards/ergodox/ez/keymaps/profet_80/keymap.c create mode 100644 keyboards/ergodox/ez/keymaps/profet_80/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png b/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png deleted file mode 100644 index 66b9752ebc..0000000000 Binary files a/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png and /dev/null differ diff --git a/keyboards/ergodox/ez/keymaps/default_80/keymap.c b/keyboards/ergodox/ez/keymaps/default_80/keymap.c deleted file mode 100644 index 505ff29722..0000000000 --- a/keyboards/ergodox/ez/keymaps/default_80/keymap.c +++ /dev/null @@ -1,183 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | 1 | 2 | Home | | PgUp | 3 | 4 | - * |------|------|------| |------|--------|------| - * | Space| BkSp | End | | PgDn | Tab |Enter | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = KEYMAP_80( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_1, KC_2, KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP,KC_3, KC_4, - KC_PGDN,KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * |------|------|------| |------|------|------| - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP_80( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+----------. - * | | | | | | | | - * |------|------|------| |------|------|----------| - * | | | | | | |BrwserBack| - * `--------------------' `------------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP_80( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox/ez/keymaps/default_80/readme.md b/keyboards/ergodox/ez/keymaps/default_80/readme.md deleted file mode 100644 index b6bbb86d2c..0000000000 --- a/keyboards/ergodox/ez/keymaps/default_80/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox 80 Default Configuration - -This is based on the default Ergodox EZ keymap. -The difference is that this keymap supports 80 key layouts. -If you own an 80 key Ergodox, use this as an example to get your desired keymap. - -**NOTE:** This layout is not physically supported by the Ergodox EZ. - - -![Default80](ergodox80.png) diff --git a/keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png b/keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png new file mode 100644 index 0000000000..66b9752ebc Binary files /dev/null and b/keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png differ diff --git a/keyboards/ergodox/ez/keymaps/profet_80/keymap.c b/keyboards/ergodox/ez/keymaps/profet_80/keymap.c new file mode 100644 index 0000000000..505ff29722 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/profet_80/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP_80( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP_80( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP_80( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/ez/keymaps/profet_80/readme.md b/keyboards/ergodox/ez/keymaps/profet_80/readme.md new file mode 100644 index 0000000000..b6bbb86d2c --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/profet_80/readme.md @@ -0,0 +1,10 @@ +# ErgoDox 80 Default Configuration + +This is based on the default Ergodox EZ keymap. +The difference is that this keymap supports 80 key layouts. +If you own an 80 key Ergodox, use this as an example to get your desired keymap. + +**NOTE:** This layout is not physically supported by the Ergodox EZ. + + +![Default80](ergodox80.png) -- cgit v1.2.3 From 9c2015ea7f23a69c1c585b1b366df5cbfd3e93c7 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 8 Sep 2016 23:20:17 -0500 Subject: first commit of Absenth's Ergodox Firmware --- .../ergodox/keymaps/absenth/absenth_highres.png | Bin 0 -> 1463041 bytes keyboards/ergodox/keymaps/absenth/keymap.c | 183 +++++++++++++++++++++ keyboards/ergodox/keymaps/absenth/readme.md | 8 + 3 files changed, 191 insertions(+) create mode 100644 keyboards/ergodox/keymaps/absenth/absenth_highres.png create mode 100644 keyboards/ergodox/keymaps/absenth/keymap.c create mode 100644 keyboards/ergodox/keymaps/absenth/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/absenth/absenth_highres.png b/keyboards/ergodox/keymaps/absenth/absenth_highres.png new file mode 100644 index 0000000000..c07aa8803f Binary files /dev/null and b/keyboards/ergodox/keymaps/absenth/absenth_highres.png differ diff --git a/keyboards/ergodox/keymaps/absenth/keymap.c b/keyboards/ergodox/keymaps/absenth/keymap.c new file mode 100644 index 0000000000..30f7474191 --- /dev/null +++ b/keyboards/ergodox/keymaps/absenth/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/absenth/readme.md b/keyboards/ergodox/keymaps/absenth/readme.md new file mode 100644 index 0000000000..35d0aad461 --- /dev/null +++ b/keyboards/ergodox/keymaps/absenth/readme.md @@ -0,0 +1,8 @@ +# ErgoDox EZ Absenth Configuration + +## Changelog + +* Sept. 8, 2016 (V0.1): + * Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer. + +![Absenth](absenth_highres.png) -- cgit v1.2.3 From 52121cee7a9b26a6450db33ec34c8e4c8895aafc Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 8 Sep 2016 23:32:11 -0500 Subject: Updated Image Header --- .../ergodox/keymaps/absenth/absenth_highres.png | Bin 1463041 -> 1429453 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/absenth/absenth_highres.png b/keyboards/ergodox/keymaps/absenth/absenth_highres.png index c07aa8803f..a0596b2812 100644 Binary files a/keyboards/ergodox/keymaps/absenth/absenth_highres.png and b/keyboards/ergodox/keymaps/absenth/absenth_highres.png differ -- cgit v1.2.3 From a9e56186e00c000892e2d1a6567627466e611f16 Mon Sep 17 00:00:00 2001 From: Daniel Bordak Date: Sat, 10 Sep 2016 12:16:38 -0400 Subject: Fix typo --- keyboards/atreus/rules.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index d71f50bb2b..3a00993bd5 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -2,11 +2,11 @@ ifdef TEENSY2 OPT_DEFS += -DATREUS_TEENSY2 - ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex else OPT_DEFS += -DATREUS_ASTAR OPT_DEFS += -DCATERINA_BOOTLOADER - ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif @@ -79,4 +79,4 @@ UNICODE_ENABLE ?= YES # Unicode USB ?= /dev/cu.usbmodem1411 upload: build - $(ATRUES_UPLOAD_COMMAND) \ No newline at end of file + $(ATREUS_UPLOAD_COMMAND) -- cgit v1.2.3 From 70b4fc808db716ab2b6c659a1e43702c435bfbef Mon Sep 17 00:00:00 2001 From: shela Date: Sun, 11 Sep 2016 02:29:32 +0900 Subject: fix variable value of rules.mk --- keyboards/hhkb/rules.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index b43b5e23f1..e6fc7260ee 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -58,19 +58,19 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# NKRO_ENABLE ?= yes # USB 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 ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +# MIDI_ENABLE ?= yes # MIDI controls +# UNICODE_ENABLE ?= yes # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID ifneq (, $(findstring yes, $(HHKB_JP))) OPT_DEFS += -DHHKB_JP -- cgit v1.2.3 From 054108d1d1702a8a51913f67f14733bbf1eebd1a Mon Sep 17 00:00:00 2001 From: Daniel Bordak Date: Sat, 10 Sep 2016 13:25:13 -0400 Subject: Update to new default keymap --- keyboards/atreus/keymaps/classic/keymap.c | 48 +++++++++++++++++++++++++++++++ keyboards/atreus/keymaps/default/keymap.c | 22 ++++++++++---- 2 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 keyboards/atreus/keymaps/classic/keymap.c (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c new file mode 100644 index 0000000000..6ca0b2077d --- /dev/null +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -0,0 +1,48 @@ +#include "atreus.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QW 0 +#define _RS 1 +#define _LW 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = { /* Qwerty */ + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } +}, +[_RS] = { /* [> RAISE <] */ + {KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS}, + {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} +}, +[_LW] = { /* [> LOWER <] */ + {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, + {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, + {KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET} +}}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 1c4280ff56..04ad66fed8 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -18,17 +18,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } }, +/* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift bksp ctrl || alt space fn . 0 = + */ [_RS] = { /* [> RAISE <] */ - {KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, - {KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, - {KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS}, + {KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LALT, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS}, {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} }, +/* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause + */ [_LW] = { /* [> LOWER <] */ {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, - {KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET} + {KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, + {KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS} }}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 475d0b23f6139b14d6eac12c9a584e6b1fb7c569 Mon Sep 17 00:00:00 2001 From: Daniel Bordak Date: Sat, 10 Sep 2016 12:19:16 -0400 Subject: Add PCBDOWN --- keyboards/atreus/config.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'keyboards') diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 624d90188c..51162cde3a 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -37,7 +37,11 @@ along with this program. If not, see . // COLS: Left to right, ROWS: Top to bottom #if defined(ATREUS_ASTAR) # define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#if defined(PCBDOWN) +# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#else # define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#endif # define UNUSED_PINS #elif defined(ATREUS_TEENSY2) # define MATRIX_ROW_PINS { D0, D1, D2, D3 } -- cgit v1.2.3 From 2a8536f00fb7e3a547fb5b626279e2e391e556d5 Mon Sep 17 00:00:00 2001 From: shela Date: Sun, 11 Sep 2016 02:46:06 +0900 Subject: Variables in Makefile are ignored in rules.mk --- keyboards/hhkb/keymaps/jp/Makefile | 2 +- keyboards/hhkb/keymaps/rdg_jp/Makefile | 2 +- keyboards/hhkb/rules.mk | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/jp/Makefile b/keyboards/hhkb/keymaps/jp/Makefile index 92986292a2..a7f700f019 100644 --- a/keyboards/hhkb/keymaps/jp/Makefile +++ b/keyboards/hhkb/keymaps/jp/Makefile @@ -1 +1 @@ -HHKB_JP=yes +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/rdg_jp/Makefile b/keyboards/hhkb/keymaps/rdg_jp/Makefile index 92986292a2..a7f700f019 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/Makefile +++ b/keyboards/hhkb/keymaps/rdg_jp/Makefile @@ -1 +1 @@ -HHKB_JP=yes +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index e6fc7260ee..a46271f023 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -72,10 +72,6 @@ CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB # UNICODE_ENABLE ?= yes # Unicode # BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID -ifneq (, $(findstring yes, $(HHKB_JP))) - OPT_DEFS += -DHHKB_JP -endif - debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION debug-on: all -- cgit v1.2.3 From 1aeb59335f2fe67613df25308a630ca453975ac0 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 11 Sep 2016 02:19:55 +0200 Subject: Fixed compilation issues after the merge --- keyboards/ergodox/keymaps/bepo_csa/keymap.c | 527 ++++++++++++++++++++++++++++ 1 file changed, 527 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bepo_csa/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/bepo_csa/keymap.c b/keyboards/ergodox/keymaps/bepo_csa/keymap.c new file mode 100644 index 0000000000..495242adb3 --- /dev/null +++ b/keyboards/ergodox/keymaps/bepo_csa/keymap.c @@ -0,0 +1,527 @@ +/* TypeMatrix-2030-like keymap */ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "action_util.h" +#include "led.h" +#include "keymap_extras/keymap_bepo.h" +#include "keymap_extras/keymap_canadian_multilingual.h" + +enum layers { + LR_BASE, // default layer + LR_CSA, // BÉPO over Canadian Multilingual (CSA) + LR_CSA_SFT, // shifted BÉPO over CSA + LR_CSA_AGR, // altgr-ed BÉPO over CSA + LR_CSA_AGR_SFT, // altgr-shifted BÉPO over CSA + LR_NUMR, // numeric layer + LR_FN, // fn layer +}; + +#define IS_CA_MULT_ENABLED() (layer_state & (1 << LR_CSA)) + +enum macros { + // Characters that do not exist in CSA and must be implemented based on unicode support + // Note: these are intentionally declared first to be used as indexes in spec_chars below + UC_NDSH, // – + UC_MDSH, // — + UC_ELPS, // … + END_UC, // indicates the last unicode character macro + // other macros + M_CSA_SFT, // toggle shift on CSA + M_CSA_AGR_SFT, // toggle shift on LR_CSA_AGR (goes to LR_CSA_AGR_SFT) + M_CSA_SFT_AGR, // toggle AltGr on LR_CSA_SFT (goes to LR_CSA_AGR_SFT) + // macros for characters that need to be un-shifted in LR_CA_MULT_SHIFT + M_1, + M_2, + M_3, + M_4, + M_5, + M_6, + M_7, + M_8, + M_9, + M_0, + M_DEGR, + M_SCLN, + M_GRV, + M_NBSP, + // macros for characters that don't have a simple key combination in LR_CA_MULT_ALTGR + M_CRC, + // other layer macros + M_DBL0, // double 0 + M_FNLR, // fn layer + M_NMAL, // num+alt +}; + +#define CSA(name) M(M_CSA_##name) // calls a CSA macro + +const uint16_t unicode_chars[] = { + [UC_NDSH] = L'–', + [UC_MDSH] = L'—', + [UC_ELPS] = L'…', +}; + +/* shortcut for unicode character macros */ +#define MUC(name) M(UC_##name) // calls a unicode macro + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | + * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| + * | = | A | U | I | E | , |------| |------| C | T | S | R | N | M | + * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| + * | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl| + * `----------------------------------' `----------------------------------' + * ,--------------. ,-------------. + * | Esc | num | | Left |Right | + * ,------+-------+------| |------+------+------. + * | | | PgUp | | Up | | | + * |Space | Home |------| |------| End |Space | + * | | | PgDn | | Down | | | + * `---------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[LR_BASE] = KEYMAP( // layer 0 : default + // left hand + BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, + KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), KC_LALT, + + KC_ESC, TG(LR_NUMR), + KC_PGUP, + KC_SPC, KC_HOME, KC_PGDN, + + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, + KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, + BP_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_END, KC_SPC + ), +/** + * Same as default but for use with Canadian Multilingual on OS side + */ +[LR_CSA] = KEYMAP( + // left hand + KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS, + KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, + CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, + KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, + KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, + KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), + MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Shifted BÉPO over Canadian Multilingual + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | # | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | ! | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ° | | | | | ; |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | : | | | | | ? | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | ` | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_SFT] = KEYMAP( + // left hand + KC_HASH, M(M_1), M(M_2), M(M_3), M(M_4), M(M_5), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + M(M_DEGR),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_SCLN), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COLN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + M(M_NBSP), KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS, + KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CSA(SFT_AGR), M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, M(M_NBSP) + ), +/* AltGr-ed BÉPO over Canadian Multilingual + * "////" indicates that the key is disabled (unsupported bépo character) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | – | — | < | > | [ | ] | | | | ^ | ± | //// | ÷ | × | dead ˘ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | |dead '| & | œ |dead `| | | | ¡ |dead ˇ| ð | //// | ij | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ////// | æ | ù |dead "| € | ̛’ |------| |------| © | þ | ß | ® |dead ~| dead ¯ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | \ | { | } | … | ~ | | | | ¿ |dead °| μ | //// |dead ˛| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | //// | |dead ¸| | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | _ | |------| |------| | _ | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_AGR] = KEYMAP( + // left hand + MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, + KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, + KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT, + CSA(AGR_SFT), CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_UNDS, CSA(AGR_SFT), KC_TRNS, + + // right hand + KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV, + KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO, + CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR, + KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, CSA(AGR_SFT), + KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_UNDS + ), +/* AltGr-shifted BÉPO over Canadian Multilingual + * "////" indicates that the key is disabled (unsupported bépo character or unused in bépo) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ¶ | //// | “ | ” | //// | //// | | | | //// | ¬ | ¼ | ½ | ¾ | ////// | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ¦ | ˝ | § | Œ | ` | | | | //// | //// | Ð | //// | IJ | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ////// | Æ | Ù |dead-˙| //// | //// |------| |------| //// | Þ | ẞ | ™ | //// | º | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | //// | ‘ | ’ | //// | //// | | | | //// | //// | //// | //// | ª | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_AGR_SFT] = KEYMAP( + // left hand + CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS, + KC_NO, S(CSA_AE), S(CSA_UGRV), CSA_DDTA, KC_NO, KC_NO, + CSA(AGR_SFT), KC_NO, CSA_LQOT, CSA_RQOT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_TRNS, + + // right hand + KC_TRNS, KC_NO, CSA_NEGT, CSA_1QRT, CSA_1HLF, CSA_3QRT, KC_NO, + KC_TRNS, KC_NO, KC_NO, S(CSA_ETH), KC_NO, S(CSA_IJ), KC_NO, + KC_NO, S(CSA_THRN), S(CSA_SRPS), CSA_TM, KC_NO, CSA_ORDO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CSA_ORDA, CSA(AGR_SFT), + CSA(SFT_AGR), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_TRNS + ), +/* Numeric Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | 00 | . |Etr/Ctl| + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | |n.lock|c.lock| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[LR_NUMR] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, + + // right hand + KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_UP, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_P0, M(M_DBL0),KC_PDOT, CTL_T(KC_PENT), + + KC_NLCK, KC_CAPS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* fn layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |~CA-mult| | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | |VolUp | | | | | | | | Pause | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | App | cut | copy |paste | Mute |VolDn | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | Next | | | | | + * | Mute | play |------| |------| | | + * | | | Prev | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[LR_FN] = KEYMAP( + TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, + KC_TRNS, KC_APP, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_MPRV, + KC_MUTE, KC_MPLY, KC_MNXT, + + // right hand + KC_INS, KC_EJCT, KC_PWR, KC_SLEP, KC_WAKE, KC_PSCR, KC_SLCK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +void hold_shift(void) { + register_code(KC_LSHIFT); +} + +void release_shift(void) { + unregister_code(KC_LSHIFT); +} + +uint16_t hextokeycode(int hex) { + if (hex == 0x0) { + return KC_P0; + } else if (hex < 0xA) { + return KC_P1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + +void send_unicode(uint16_t unicode) +{ + // For more info on how this works per OS, see here: https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input + // Implemented for Windows: + // Pressing ALT followed by + followed by the unicode code point in hex. + // Requires registry key HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad set to String 1 + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + for (int i = 12; i >= 0; i -= 4) { + register_code(hextokeycode((unicode >> i) & 0xF)); + unregister_code(hextokeycode((unicode >> i) & 0xF)); + } + + unregister_code(KC_LALT); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0 ... END_UC: + if (record->event.pressed) { + send_unicode(unicode_chars[id]); + } + break; + case M_CSA_SFT: + // BÉPO over CSA: toggle shift layer + layer_invert(LR_CSA_SFT); + if (record->event.pressed) { + hold_shift(); + } else { + release_shift(); + } + break; + case M_CSA_SFT_AGR: + // BÉPO over CSA: from shift layer, momentary altgr+shift layer + layer_invert(LR_CSA_AGR); + layer_invert(LR_CSA_AGR_SFT); + if (record->event.pressed) { + // shift not needed for LR_CSA_AGR_SFT + release_shift(); + } else { + // back to shift layer + hold_shift(); + } + break; + case M_CSA_AGR_SFT: + // BÉPO over CSA: from altgr layer, momentary altgr+shift layer + layer_invert(LR_CSA_SFT); + layer_invert(LR_CSA_AGR_SFT); + break; + case M_1 ... M_0: + case M_DEGR: + case M_SCLN: + case M_GRV: + case M_NBSP: + // macros of the shift layer that require to release shift + if (record->event.pressed) { + release_shift(); + switch (id) { + case M_1 ... M_0: + register_code(KC_1 + (id - M_1)); + break; + case M_DEGR: + return MACRO(DOWN(CSA_ALTGR), D(SCLN), END); + case M_SCLN: + return MACRO(D(SCLN), END); + case M_GRV: + return MACRO(I(75), DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); + case M_NBSP: + // use weak mod such that pressing another key will not be affected + add_weak_mods(MOD_BIT(CSA_ALTGR)); + return MACRO(D(SPACE), END); + } + } else { + hold_shift(); + switch (id) { + case M_1 ... M_0: + unregister_code(KC_1 + (id - M_1)); + break; + case M_DEGR: + return MACRO(UP(CSA_ALTGR), U(SCLN), END); + case M_SCLN: + return MACRO(U(SCLN), END); + case M_NBSP: + del_weak_mods(MOD_BIT(CSA_ALTGR)); + return MACRO(U(SPACE), END); + } + } + break; + case M_CRC: + if (record->event.pressed) { + return MACRO(I(75), TYPE(CSA_DCRC), T(SPACE), END); + } + break; + case M_DBL0: + if (record->event.pressed) { + return MACRO( I(25), T(P0), T(P0), END ); + } + break; + case M_FNLR: + layer_invert(LR_NUMR); + layer_invert(LR_FN); + break; + case M_NMAL: + layer_invert(LR_NUMR); + if (record->event.pressed) { + register_code(KC_LALT); + } else { + unregister_code(KC_LALT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + // led 1: numeric layer + if (layer_state & (1 << LR_NUMR)) { + ergodox_right_led_1_on(); + } + // led 2: BÉPO over Canadian Multilingual + if (IS_CA_MULT_ENABLED()) { + ergodox_right_led_2_on(); + } + // led 3: caps lock + if (host_keyboard_leds() & (1< Date: Sun, 11 Sep 2016 22:03:34 +0200 Subject: Added readme.md for bepo_csa --- keyboards/ergodox/keymaps/bepo_csa/readme.md | 162 +++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bepo_csa/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/bepo_csa/readme.md b/keyboards/ergodox/keymaps/bepo_csa/readme.md new file mode 100644 index 0000000000..d4975b2265 --- /dev/null +++ b/keyboards/ergodox/keymaps/bepo_csa/readme.md @@ -0,0 +1,162 @@ +# BÉPO Keymap with firmware-remapping for software CSA layout + +This is a keymap intended to be used with the [BÉPO layout](http://bepo.fr), a French ergonomic layout designed by following Dvorak's principles. + +The particularity of this keymap is that it supports using the [Canadian Multilingual Standard layout](https://en.wikipedia.org/wiki/QWERTY#Canadian_Multilingual_Standard) (also known as _ACNOR keyboard_ or _CSA keyboard_, see also the [French page](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) which contains more details) on the OS side, by enabling the _CSA_ layer. This is especially useful for operating systems that natively provide CSA, but not BÉPO, like Windows. The CSA layout was chosen because it is probably the standard layout that provides the best character set coverage. + +This keymap is based on the [tm2030](../tm2030/) keymap, whose goal was to have a [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) inspired layout for the ErgoDox EZ. + +As this keyboard is intended for French people, the rest of this page will be in French. + +# Keymap BÉPO avec support en firmware pour utilisation avec la disposition CSA en software + +Cette keymap a été conçue pour être utilisée avec la [disposition BÉPO](http://bepo.fr), la disposition francophone, ergonomique et libre basée sure les principes de Dvorak. + +La particularité de cette keymap est qu'elle supporte l'utilisation du [clavier canadien multilingue standard](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) (aussi appelé _clavier ACNOR_ ou _clavier CSA_) du côté du système d'exploitation, en activant la couche _CSA_. Ceci s'avère particulièrement utile pour les systèmes d'exploitations qui fournissent nativement le CSA, mais pas le BÉPO, comme Windows. Le clavier CSA a été choisi comme base car c'est probablement la disposition standard qui fournit la meilleure couverture en termes de caractères disponibles. + +Cette keymap est basée sur la keymap [tm2030](../tm2030/), dont le but est de fournir une disposition inspirée du [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) pour l'ErgoDox EZ. + +## Couche de base +C'est la couche par défaut, proche du TypeMatrix, avec les différences suivantes: +- La ligne du haut (les touches `F`) et la colonne de droite sont retirées, les touches correspondantes étant déplacées ailleurs. +- Les touches situés en bas à gauche sont redisposées dans cet ordre: `Ctrl`, `fn`, `Gui`, `num+Alt`, `Alt` +- Les touches `shuffle` (`Alt+Tab`) et `desktop` ne sont pas supportés +- `W` est déplacé à la place de `=` +- `=` est déplacé sous `Tab` (au lieu d'avoir un grand `Shift`) +- `%` et `Ç` sont déplacés à la place de `Home` et `End` respectivement +- Les flèches ainsi que `PgUp`/`PgDown`/`Home`/`End` sont déplacées sur les pouces + +À noter que pour `W` et `Ç`, le but a été de ne pas les déplacer trop par rapport à la disposition BÉPO _standard_, afin de pouvoir repasser facilement sur un TypeMatrix ou un clavier traditionnel. + + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | +|--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| +| = | A | U | I | E | , |------| |------| C | T | S | R | N | M | +|--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| +| LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl| + `----------------------------------' `----------------------------------' + ,--------------. ,-------------. + | Esc | num | | Left |Right | + ,------+-------+------| |------+------+------. + | | | PgUp | | Up | | | + |Space | Home |------| |------| End |Space | + | | | PgDn | | Down | | | + `---------------------' `--------------------' +``` + +### Changer de couche + +- Utilisez `num` pour activer/désactiver [la couche numérique](#couche-numérique) +- Maintenez `fn` pour activer temporairement [les couches numériques et Fn](#couche-fn) +- Maintenez `numAlt` pour activer temporairement la couche numérique combinée avec `Alt` (facilite l'utilisation des raccourcis tels que `Alt`+`F4`) + +### Diodes +Les diodes de l'ErgoDox EZ (côté droit) sont utilisées de la façon suivante : + +- diode de gauche (rouge) : indique l'activation de [la couche numérique](#couche-numérique) +- diode du milieu (verte) : indique l'activation du [mode CSA](#couche-csa) +- diode de droite (bleue) : indique le verrouillage majuscules + +## Couche CSA +La couche _CSA_ est la même que la couche de base, pour une utilisation avec un clavier Canadien Multilingue configuré dans le système d'exploitation. + +Pour l'activer, appuyez sur `fn`+`$`. La [diode](#diodes) verte indique que la couche CSA est activée. + +### Limitations +Seuls les caractères présents dans le clavier CSA sont parfaitement supportés. De manière générale, il s'agit des caractères suivants : + +- toute la couche de base +- tous les caractères accessibles en `Shift` +- tous les caractères de la main gauche accessibles en `AltGr` à l'exception du `≠` +- environ la moitié des caractères de la main droite accessibles en `AltGr` et la moitié des caractères accessibles en `AltGr`+`Shift` (consultez [le fichier source](keymap.c) pour voir les caractères supportés) + +En particulier, les caractères suivants sont émulés via le support Unicode (Windows seulement): + +- le tiret cadratin (tiret long) : — +- le tiret demi-cadratin (demi tiret) : – +- les points de suspension : … + +L'implémentation actuelle ne fonctionne pas dans toutes les applications, en particulier les applications MS Office. + +Il est probable que l'utilisation de la couche CSA ne fonctionne pas correctement dans certains jeux vidéos. + +Cette fonctionnalité a été conçue et testée essentiellment pour Windows (7). + +### Détails techniques +Techniquement, la couche CSA est en réalité composée de 4 couches servant à émuler la couche de base, les appuis sur `Shift` ou `Alt` et la combinaison des deux. + +Le changement de couches se fait par des macros afin d'activer ou désactiver plusieurs couches et la touche `Shift` en même temps. + +Certains caractères sont également implémentés par des macros, notamment ceux de la couche `Shift` qui n'ont pas besoin de cette touche en CSA, comme les chiffres. + +Les caractères Unicode se basent sur une implémentation spécifique et non celle fournie dans QMK — il faudrait sans doute migrer le code. Notez la façon dont ces caractères sont déclarés tels quels dans [le code source](keymap.c) (tableau `unicode_char`). + +## Couche numérique +Couche numérique proche du TM lorsqu'on active `num`, avec les différences suivantes : + +- Le clavier numérique est déplacés de 1 vers le haut et vers la droite. +- Les flèches sont décalées de 1 vers la gauche. +- Fournit l'accès aux touches `F1` à `F12`, `caps-lock` et `num-lock`. + +La couche numérique est indiquée par la [diode](#diodes) de gauche (rouge). Caps-lock est indiqué par la diode de droite (bleue). + +La touche `numAlt` de [la couche de base](#couche-de-base) permet d'activer la couche numérique et la touche `Alt` simultanément, afin de faciliter les raccourcis claviers comme `Alt`+`F4`. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | 0 | 00 | . |Etr/Ctl| + `----------------------------------' `-----------------------------------' + ,-------------. ,-------------. + | | | |n.lock|c.lock| + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Couche Fn +Activée simultanément avec la couche numérique lorsque l'on maintient la touche `fn`. Comme sur le TM, elle fournit l'accès aux fonctionnalités suivantes : + +- `couper`, `copier` et `coller` — attention: ne pas utiliser dans l'explorateur de fichiers. +- monter/baisser/couper le volume — seulement accessible en main gauche, contrairement au TM. +- piste précédente/suivante +- calculatrice, e-mail et page d'accueil du navigateur web +- `insert`, `power`, `sleep`, `wake`, `print screen`, `scroll-lock` et `pause` +- ~CSA: (dés)activation de [la couche CSA](#couche-csa) sur `$` +- RESET: rechargement du firmware avec Teensy-Loader (pour les développeurs) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ~CSA | | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | | | |VolUp | | | | | | | | Pause | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | App | cut | copy |paste | Mute |VolDn | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | Next | | | | | + | Mute | play |------| |------| | | + | | | Prev | | | | | + `--------------------' `--------------------' +``` \ No newline at end of file -- cgit v1.2.3 From 6a7ef59629dcb6cb388649002242abdab344424b Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Mon, 12 Sep 2016 13:24:22 -0400 Subject: Ongoing experiment; have a special layer for RESET --- keyboards/planck/keymaps/cbbrowne/keymap.c | 44 +++++++++++++++++++++++++++-- keyboards/planck/keymaps/cbbrowne/readme.md | 23 +++++++++++++-- 2 files changed, 61 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 898f6f0e0a..1bfd142e90 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -69,6 +69,7 @@ enum layers { _LW, /* Lower layer, where top line has symbols !@#$%^&*() */ _RS, /* Raised layer, where top line has digits 1234567890 */ _KP, /* Key pad */ + _ADJUST, /* Special Adjust layer coming via tri-placement */ }; enum macro_id { @@ -76,9 +77,14 @@ enum macro_id { M_USERNAME, M_RANDDIGIT, M_RANDLETTER, - M_VERSION + M_VERSION, + MACRO_UPPER, + MACRO_LOWER, }; +#define M_LOWER M(MACRO_LOWER) +#define M_UPPER M(MACRO_UPPER) + /* Note that Planck has dimensions 4 rows x 12 columns */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -86,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, - {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, [_RS] = { /* RAISE */ @@ -106,7 +112,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -} +}, + +[_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ + { M(M_LED), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } +} }; /* What is fn_actions actually used for??? */ @@ -171,6 +184,31 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code (KC_A + rval); } break; + case MACRO_UPPER: + if (record->event.pressed) + { + layer_on(_RS); + update_tri_layer(_LW, _RS, _ADJUST); + } + else + { + layer_off(_RS); + update_tri_layer(_LW, _RS, _ADJUST); + } + break; + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(_LW); + update_tri_layer(_LW, _RS, _ADJUST); + } + else + { + layer_off(_LW); + update_tri_layer(_LW, _RS, _ADJUST); + } + break; + } return MACRO_NONE; }; diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 51979f6300..e9e423ed91 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -24,7 +24,8 @@ doing sundry experimentation: - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number - * Minor use of Space Cadet Shift; my SHIFT key has switched to KC_LSP0, so that when I just hit SHIFT, I get a left parens: ( which is great for Lisping. I don't have a Right Shift, so I don't get an autoclose; I think I'll live with that until a Planck successor with more lines of keys :-) + * Trying out sgoodwin's "hold Enter down to get Shift" + 2. Some code structure ideas --------------------------------------------------- @@ -57,12 +58,29 @@ doing sundry experimentation: and shift ESC off the first column so KC_LCTL and KC_LALT can be on the first column. * I needed to swap ' and ENTER + +4. Unuseful experiments +--------------------------------------------------------- + +I have tried some things out that didn't turn out particularly well. +I'll note some of these for posterity, hopefully helpful in not doing +unwise things again... + * I tried added Workman alongside Dvorak and Colemak - Boy, oh boy, these don't help!!! - I have done 30 years of learning of Emacs key mappings, and these alternative keyboards massively mess me up -4. TODO + * Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I + just hit SHIFT, I get a left parens. In principle, this is great + for Lisping. + - Unfortunately, there are times when mouse interfaces use SHIFT + to allow selecting multiple items, and this really interferes + with that + + + +5. TODO --------------------------------------------------------- * I use tmux quite a lot; the mollat keymap seems to have some @@ -77,4 +95,3 @@ doing sundry experimentation: * The jeebak keymap seems to have some neat ideas: - Number layer which is aggressive about having numbers in several places - Touch layer seems interesting - * Trying out sgoodwin's "hold Enter down to get Shift" \ No newline at end of file -- cgit v1.2.3 From af4c25c4753b2d212dd46090f8fc6e322b1d7537 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Mon, 12 Sep 2016 15:20:51 -0500 Subject: My Atreus Layout --- keyboards/atreus/keymaps/erlandsona/keymap.c | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 keyboards/atreus/keymaps/erlandsona/keymap.c (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c new file mode 100644 index 0000000000..f1555fb1df --- /dev/null +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -0,0 +1,61 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include "atreus.h" + +// 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 BASE 0 +#define NUMS 1 +#define MOUS 2 + +// Some quick aliases, just to make it look pretty +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = KEYMAP( /* Qwerty */ + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_RSFT , + KC_LCTL, KC_LALT, KC_LSFT, KC_LGUI, KC_BSPC, KC_ESC , KC_ENT, KC_SPC, F(NUMS), KC_QUOT, KC_SLSH, KC_RALT), + +[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ + KC_GRV , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_1 , KC_2 , KC_3 , KC_4 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + KC_DOT , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, XXXXXXX, KC_BSLS, _______), + +[MOUS] = KEYMAP( /* Mouse and Media Keys */ + KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, + KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, + _______, _______ , _______, _______, _______, _______ , KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) +}; + + +// I prefer this layer switching strategy to the TG and MO functions. +// so that I can get out of mouse mode just by tapping/holding my base layer FN key. +const uint16_t PROGMEM fn_actions[] = { + [BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0 + [NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay + [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 0c3aede09e131243017dfb89638795e7cd25c969 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Mon, 12 Sep 2016 18:23:24 -0500 Subject: Latest making use of overloaded modifiers... --- keyboards/atreus/keymaps/erlandsona/keymap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index f1555fb1df..6ca8aaed92 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -18,22 +18,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_RSFT , - KC_LCTL, KC_LALT, KC_LSFT, KC_LGUI, KC_BSPC, KC_ESC , KC_ENT, KC_SPC, F(NUMS), KC_QUOT, KC_SLSH, KC_RALT), + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_SLSH), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_QUOT, KC_RALT , KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_LBRC, - KC_TAB , KC_1 , KC_2 , KC_3 , KC_4 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - KC_DOT , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, XXXXXXX, KC_BSLS, _______), + KC_GRV , KC_7 , KC_8 , KC_9 , KC_0 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_4 , KC_5 , KC_6 , KC_DLR, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______, KC_1 , KC_2 , KC_3 , KC_DOT, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL, F(MOUS), _______, _______, _______, _______, _______, _______), [MOUS] = KEYMAP( /* Mouse and Media Keys */ - KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, - KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, - KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, - _______, _______ , _______, _______, _______, _______ , KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) + KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, + KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, + _______, _______ , _______, _______, _______, _______, KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) }; -- cgit v1.2.3 From cf17eb0f4360fca9ad3910c9cdf0d0ef5155b026 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Mon, 12 Sep 2016 18:36:41 -0500 Subject: Get rid of sleep button... --- keyboards/atreus/keymaps/erlandsona/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 6ca8aaed92..83871219eb 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, - _______, _______ , _______, _______, _______, _______, KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) + _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) }; -- cgit v1.2.3 From e9a093451ea13b18b5dc60d427244efeba593da5 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Mon, 12 Sep 2016 19:54:52 -0500 Subject: Clean up atomic keymap (#9) * Added keyboard help macros * Fixing Atomic PVC keymap / adding print help --- keyboards/atomic/keymaps/pvc/Makefile | 2 +- keyboards/atomic/keymaps/pvc/config.h | 11 +- keyboards/atomic/keymaps/pvc/keymap.c | 458 ++++++++++++++++++---------------- keyboards/planck/keymaps/pvc/keymap.c | 106 ++++++-- 4 files changed, 336 insertions(+), 241 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atomic/keymaps/pvc/Makefile b/keyboards/atomic/keymaps/pvc/Makefile index 278407e6c9..ebd75e313f 100644 --- a/keyboards/atomic/keymaps/pvc/Makefile +++ b/keyboards/atomic/keymaps/pvc/Makefile @@ -1,7 +1,7 @@ BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # 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 diff --git a/keyboards/atomic/keymaps/pvc/config.h b/keyboards/atomic/keymaps/pvc/config.h index 70353323b6..18a7253f2e 100644 --- a/keyboards/atomic/keymaps/pvc/config.h +++ b/keyboards/atomic/keymaps/pvc/config.h @@ -150,10 +150,17 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +#ifndef NO_DEBUG +# define NO_DEBUG +#endif /* disable print */ -//#define NO_PRINT +// #ifndef NO_PRINT +// # define NO_PRINT +// #endif + +/* Only print user print statements */ +#define USER_PRINT /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index b02e89d2c7..d10bfe3bfc 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -2,48 +2,59 @@ #include "action_layer.h" #include "eeconfig.h" #include "led.h" +#include "mousekey.h" #ifdef AUDIO_ENABLE #include "audio.h" #include "song_list.h" #endif -#define LAYER_QWERTY 0 -#define LAYER_COLEMAK 1 -#define LAYER_DVORAK 2 -#define LAYER_UPPER 3 -#define LAYER_LOWER 4 -#define LAYER_FUNCTION 5 -#define LAYER_MOUSE 6 -#define LAYER_ADJUST 7 - -#define MACRO_QWERTY 0 -#define MACRO_COLEMAK 1 -#define MACRO_DVORAK 2 -#define MACRO_UPPER 3 -#define MACRO_LOWER 4 -#define MACRO_FUNCTION 5 -#define MACRO_MOUSE 6 -#define MACRO_TIMBRE_1 7 -#define MACRO_TIMBRE_2 8 -#define MACRO_TIMBRE_3 9 -#define MACRO_TIMBRE_4 10 -#define MACRO_TEMPO_U 11 -#define MACRO_TEMPO_D 12 -#define MACRO_TONE_DEFAULT 13 -#define MACRO_MUSIC_TOGGLE 14 -#define MACRO_AUDIO_TOGGLE 16 -#define MACRO_INC_VOICE 18 -#define MACRO_DEC_VOICE 19 -#define MACRO_BACKLIGHT 20 -#define MACRO_BREATH_TOGGLE 21 -#define MACRO_BREATH_SPEED_INC 23 -#define MACRO_BREATH_SPEED_DEC 24 -#define MACRO_BREATH_DEFAULT 25 +enum keyboard_layers { + LAYER_QWERTY = 0, + LAYER_UPPER, + LAYER_LOWER, + LAYER_FUNCTION, + LAYER_MOUSE, + LAYER_ADJUST, +}; +enum keyboard_macros { + MACRO_QWERTY = 0, + MACRO_UPPER, + MACRO_LOWER, + MACRO_FUNCTION, + MACRO_MOUSE, + MACRO_TIMBRE_1, + MACRO_TIMBRE_2, + MACRO_TIMBRE_3, + MACRO_TIMBRE_4, + MACRO_TEMPO_U, + MACRO_TEMPO_D, + MACRO_TONE_DEFAULT, + MACRO_MUSIC_TOGGLE, + MACRO_AUDIO_TOGGLE, + MACRO_INC_VOICE, + MACRO_DEC_VOICE, + MACRO_BACKLIGHT, + MACRO_BREATH_TOGGLE, + MACRO_BREATH_SPEED_INC, + MACRO_BREATH_SPEED_DEC, + MACRO_BREATH_DEFAULT, + MACRO_MOUSE_MOVE_UL, + MACRO_MOUSE_MOVE_UR, + MACRO_MOUSE_MOVE_DL, + MACRO_MOUSE_MOVE_DR, + MACRO_HELP_1, + MACRO_HELP_2, + MACRO_HELP_3, + MACRO_HELP_4, + MACRO_HELP_5, + MACRO_HELP_6, + MACRO_HELP_7, + MACRO_HELP_8, + MACRO_HELP_9, +}; #define M_QWRTY M(MACRO_QWERTY) -#define M_COLMK M(MACRO_COLEMAK) -#define M_DVORK M(MACRO_DVORAK) #define M_UPPER M(MACRO_UPPER) #define M_LOWER M(MACRO_LOWER) #define M_FUNCT M(MACRO_FUNCTION) @@ -60,6 +71,19 @@ #define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BDFLT M(MACRO_BREATH_DEFAULT) +#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) +#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) +#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) +#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) +#define M_HELP1 M(MACRO_HELP_1) +#define M_HELP2 M(MACRO_HELP_2) +#define M_HELP3 M(MACRO_HELP_3) +#define M_HELP4 M(MACRO_HELP_4) +#define M_HELP5 M(MACRO_HELP_5) +#define M_HELP6 M(MACRO_HELP_6) +#define M_HELP7 M(MACRO_HELP_7) +#define M_HELP8 M(MACRO_HELP_8) +#define M_HELP9 M(MACRO_HELP_9) #define VC_UP M(MACRO_INC_VOICE) @@ -77,6 +101,7 @@ #define SC_ACLS LALT(KC_F4) #define SC_CCLS LCTL(KC_F4) +#define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 #define _______ KC_TRNS @@ -86,169 +111,126 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_QWERTY] = { // QWERTY - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - - /* COLEMAK - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_COLEMAK] = { // COLEMAK - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, +/* LAYER = LAYER_QWERTY + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_QWERTY] = { + { KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC }, + { KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_PGUP }, + { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, KC_UP , KC_PGDN }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT } }, - -/* DVORAK - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAPS | A | O | E | U | I | D | H | T | N | S | - | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_DVORAK] = { // DVORAK - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL }, - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* UPPER - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | PRINT | BR TOG | BR SP+ | BR SP- | BR RST | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | 0 | | RALT | . | ENTER | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_UPPER] = { // UPPER - { KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, - { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME }, - { _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END }, - { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ }, - }, - -/* LOWER - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | ^ | * | + | - | / | \ | _ | ' | " | ` | | XXXXXX . | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | | | & | ! | ~ | ; | : | = | < | > | ? | XXXXXX . | | END | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_LOWER] = { // LOWER - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, - { _______, KC_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS }, - { _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | NUM LK | | | | | | | | | | | | | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | F17 | F18 | F19 | F20 | | | | | | | | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F21 | F22 | F23 | F24 | | | | | | | XXXXXX . | VOL UP | MUTE | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | PLAY/PAUSE | | | | | | PTRACK | VOL DN | NTRACK | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_FUNCTION] = { // FUNCTION - { KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXX }, - { _______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_VOLU, KC_MUTE }, - { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }, - }, - -#ifdef MOUSEKEY_ENABLE - - [LAYER_MOUSE] = { // MOUSE - { _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U }, - { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, - }, - -#endif - - [LAYER_ADJUST] = { // ADJUST - { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ }, - { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, - { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ }, - }, - - -/* - [LAYER_EMPTY] = { // LAYER - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, +/* LAYER = LAYER_UPPER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' */ - +[LAYER_UPPER] = { + { KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______ }, + { KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, + { _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME }, + { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END }, + { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ } +}, +/* LAYER = LAYER_LOWER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_LOWER] = { + { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______ }, + { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS }, + { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME }, + { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END }, + { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ } +}, +/* LAYER = LAYER_FUNCTION + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_FUNCTION] = { + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE }, + { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } +}, +/* LAYER = LAYER_MOUSE + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_MOUSE] = { + { KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R }, + { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U }, + { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D }, + { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } +}, +/* LAYER = LAYER_ADJUST + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_ADJUST] = { + { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX }, + { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } +}, }; #ifdef AUDIO_ENABLE @@ -290,61 +272,101 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) switch(id) { - case MACRO_BREATH_TOGGLE: + case MACRO_HELP_1: if (record->event.pressed) { - breathing_toggle(); + uprintf("1"); } break; - case MACRO_BREATH_SPEED_INC: + case MACRO_HELP_2: if (record->event.pressed) { - breathing_speed_inc(1); + uprintf("2"); } break; - case MACRO_BREATH_SPEED_DEC: + case MACRO_HELP_3: if (record->event.pressed) { - breathing_speed_dec(1); + uprintf("3"); } break; - case MACRO_BREATH_DEFAULT: + case MACRO_HELP_4: if (record->event.pressed) { - breathing_defaults(); + uprintf("4"); } break; - case MACRO_QWERTY: + case MACRO_HELP_5: if (record->event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) + { + uprintf("8"); + } + break; + + case MACRO_HELP_9: + if (record->event.pressed) + { + uprintf("9"); + } + break; + + case MACRO_BREATH_TOGGLE: + if (record->event.pressed) + { + breathing_toggle(); + } + break; + + case MACRO_BREATH_SPEED_INC: + if (record->event.pressed) + { + breathing_speed_inc(1); + } + break; + + case MACRO_BREATH_SPEED_DEC: + if (record->event.pressed) + { + breathing_speed_dec(1); + } + break; + + case MACRO_BREATH_DEFAULT: + if (record->event.pressed) + { + breathing_defaults(); + } + break; + + case MACRO_QWERTY: + if (record->event.pressed) + { + persistant_default_layer_set(1UL<event.pressed) + { + uprintf("1"); + } + break; + + case MACRO_HELP_2: + if (record->event.pressed) + { + uprintf("2"); + } + break; + + case MACRO_HELP_3: + if (record->event.pressed) + { + uprintf("3"); + } + break; + + case MACRO_HELP_4: + if (record->event.pressed) + { + uprintf("4"); + } + break; + + case MACRO_HELP_5: + if (record->event.pressed) + { + uprintf("5"); + } + break; + + case MACRO_HELP_6: + if (record->event.pressed) + { + uprintf("6"); + } + break; + + case MACRO_HELP_7: + if (record->event.pressed) + { + uprintf("7"); + } + break; + + case MACRO_HELP_8: + if (record->event.pressed) + { + uprintf("8"); + } + break; + + case MACRO_HELP_9: + if (record->event.pressed) + { + uprintf("9"); + } + break; + case MACRO_BREATH_TOGGLE: if (record->event.pressed) { -- cgit v1.2.3 From cb1ac2a3edf637a3e2ecb53f0627212d1f5abb08 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Mon, 12 Sep 2016 20:20:31 -0500 Subject: Fixed NO_PRINT / USER_PRINT conflict warning. --- keyboards/atomic/keymaps/pvc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/atomic/keymaps/pvc/Makefile b/keyboards/atomic/keymaps/pvc/Makefile index ebd75e313f..c7c04485fc 100644 --- a/keyboards/atomic/keymaps/pvc/Makefile +++ b/keyboards/atomic/keymaps/pvc/Makefile @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) -- cgit v1.2.3 From 6098704145c95f7854e0696e6137332e8e12faf8 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Tue, 13 Sep 2016 09:54:18 -0500 Subject: Small update --- keyboards/atreus/keymaps/erlandsona/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 83871219eb..9e11ac048e 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -18,10 +18,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_SLSH), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_QUOT, KC_RALT , KC_BSLS ), + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ KC_GRV , KC_7 , KC_8 , KC_9 , KC_0 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MOUS] = KEYMAP( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, - KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) }; -- cgit v1.2.3 From 3668b295200c53e7131551bc906264ecc54e6b04 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Tue, 13 Sep 2016 11:16:53 -0500 Subject: Shorten TAPPING_TERM for better responsiveness of overloaded keys... --- keyboards/atreus/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 51162cde3a..a59eee18eb 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -49,6 +49,9 @@ along with this program. If not, see . # define UNUSED_PINS #endif +/* Make Overloaded Keys switch faster */ +#define TAPPING_TERM 175 + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -- cgit v1.2.3 From 344929e0675f9857503b0dd2cd307984a57d61aa Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 15:48:50 -0400 Subject: Give layers longer names --- keyboards/planck/keymaps/cbbrowne/keymap.c | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 1bfd142e90..85f8e34722 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -65,10 +65,10 @@ */ enum layers { - _QW = 0, /* Qwerty mapping */ - _LW, /* Lower layer, where top line has symbols !@#$%^&*() */ - _RS, /* Raised layer, where top line has digits 1234567890 */ - _KP, /* Key pad */ + _QWERTY = 0, /* Qwerty mapping */ + _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */ + _RAISE, /* Raised layer, where top line has digits 1234567890 */ + KEYPAD, /* Key pad */ _ADJUST, /* Special Adjust layer coming via tri-placement */ }; @@ -88,30 +88,30 @@ enum macro_id { /* Note that Planck has dimensions 4 rows x 12 columns */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = { /* Qwerty */ +[_QWERTY] = { /* Qwerty */ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, -[_RS] = { /* RAISE */ +[_RAISE] = { /* 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_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, DF(_QW), DF(_KP), DF(_KP), RESET, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -[_LW] = { /* LOWER */ +[_LOWER] = { /* 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_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, DF(_QW), DF(_KP), DF(_KP), RESET, _______}, - {_______, DF(_KP), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, + {_______, DF(KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -[_KP] = { /* Key Pad */ +[KEYPAD] = { /* Key Pad */ {KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} + {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QWERTY), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} }, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ @@ -187,25 +187,25 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_UPPER: if (record->event.pressed) { - layer_on(_RS); - update_tri_layer(_LW, _RS, _ADJUST); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_RS); - update_tri_layer(_LW, _RS, _ADJUST); + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; case MACRO_LOWER: if (record->event.pressed) { - layer_on(_LW); - update_tri_layer(_LW, _RS, _ADJUST); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_LW); - update_tri_layer(_LW, _RS, _ADJUST); + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; -- cgit v1.2.3 From fdeaf1d9f8c87a0266066799fd14b808f6debe29 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 15:49:46 -0400 Subject: Give layers longer names --- keyboards/planck/keymaps/cbbrowne/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 85f8e34722..8051721cd3 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -68,7 +68,7 @@ enum layers { _QWERTY = 0, /* Qwerty mapping */ _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */ _RAISE, /* Raised layer, where top line has digits 1234567890 */ - KEYPAD, /* Key pad */ + _KEYPAD, /* Key pad */ _ADJUST, /* Special Adjust layer coming via tri-placement */ }; @@ -98,16 +98,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = { /* 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_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, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_LOWER] = { /* 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_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, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, - {_______, DF(KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, + {_______, DF(_KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -[KEYPAD] = { /* Key Pad */ +[_KEYPAD] = { /* Key Pad */ {KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, -- cgit v1.2.3 From 5be2795ca1b8c3e555fb7fb3a2d7fca69d2db9b4 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 16:17:51 -0400 Subject: C macros for my favorite complex keystrokes --- keyboards/planck/keymaps/cbbrowne/keymap.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 8051721cd3..fafc47e1d4 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,6 +84,13 @@ enum macro_id { #define M_LOWER M(MACRO_LOWER) #define M_UPPER M(MACRO_UPPER) +#define ROT_LED M(M_LED) /* Rotate LED */ +#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */ +#define KEYPAD DF(_KEYPAD) /* Switch to keypad */ +#define USERNAME M(M_USERNAME) /* shortcut for username */ +#define RANDDIG M(M_RANDDIGIT) +#define RANDALP M(M_RANDLETTER) + /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -92,32 +99,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, - {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, ROT_LED, KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, [_RAISE] = { /* 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_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, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_LOWER] = { /* 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_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, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, - {_______, DF(_KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______}, + {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_KEYPAD] = { /* Key Pad */ - {KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, - {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, - {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QWERTY), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} + {KC_ESC, USERNAME, M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, + {KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, + {KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, + {BL_STEP, ROT_LED, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} }, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ - { M(M_LED), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, + { ROT_LED, USERNAME, M(M_VERSION), _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } } }; -- cgit v1.2.3 From 5d643bb7ee8375a354693f19a6e9eae44f825532 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 16:29:01 -0400 Subject: Got Right SHIFT + Right CTRL --- keyboards/planck/keymaps/cbbrowne/keymap.c | 6 ++++-- keyboards/planck/keymaps/cbbrowne/readme.md | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index fafc47e1d4..d6f8a6ed48 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -90,6 +90,8 @@ enum macro_id { #define USERNAME M(M_USERNAME) /* shortcut for username */ #define RANDDIG M(M_RANDDIGIT) #define RANDALP M(M_RANDLETTER) +#define CTLENTER MT(MOD_RCTL, KC_ENT) +#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -97,8 +99,8 @@ enum macro_id { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { /* Qwerty */ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT)}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, {KC_TAB, ROT_LED, KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index e9e423ed91..272e042a0d 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -25,7 +25,12 @@ doing sundry experimentation: - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number * Trying out sgoodwin's "hold Enter down to get Shift" - + - Liking this Quite Well Enough... + - Applied this to both Shift and Quote + * I have added an alternate ADJUST layer that is activated via update_tri_layer() + - e.g. - LOWER+RAISE simultaneously + - This seems entirely more useful for handling my "special keys" + like the random numbers, user name, and such, than the keypad layer 2. Some code structure ideas --------------------------------------------------- -- cgit v1.2.3 From 9c574b493c3d098d2c4f2475dfc1564a182acce0 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 13 Sep 2016 22:05:10 -0500 Subject: Changed Docs, Moved RetroRefit to Handwired --- keyboards/arrow_pad/readme.md | 113 ++++++++++++++++++- keyboards/handwired/retro_refit/Makefile | 3 + keyboards/handwired/retro_refit/config.h | 123 +++++++++++++++++++++ .../handwired/retro_refit/keymaps/default/keymap.c | 33 ++++++ keyboards/handwired/retro_refit/readme.md | 60 ++++++++++ keyboards/handwired/retro_refit/retro_refit.c | 47 ++++++++ keyboards/handwired/retro_refit/retro_refit.h | 38 +++++++ keyboards/handwired/retro_refit/rules.mk | 68 ++++++++++++ keyboards/retro_refit/Makefile | 3 - keyboards/retro_refit/config.h | 123 --------------------- keyboards/retro_refit/keymaps/default/keymap.c | 33 ------ keyboards/retro_refit/readme.md | 26 ----- keyboards/retro_refit/retro_refit.c | 47 -------- keyboards/retro_refit/retro_refit.h | 38 ------- keyboards/retro_refit/rules.mk | 68 ------------ keyboards/vision_division/readme.md | 6 + 16 files changed, 488 insertions(+), 341 deletions(-) create mode 100644 keyboards/handwired/retro_refit/Makefile create mode 100644 keyboards/handwired/retro_refit/config.h create mode 100644 keyboards/handwired/retro_refit/keymaps/default/keymap.c create mode 100644 keyboards/handwired/retro_refit/readme.md create mode 100644 keyboards/handwired/retro_refit/retro_refit.c create mode 100644 keyboards/handwired/retro_refit/retro_refit.h create mode 100644 keyboards/handwired/retro_refit/rules.mk delete mode 100644 keyboards/retro_refit/Makefile delete mode 100644 keyboards/retro_refit/config.h delete mode 100644 keyboards/retro_refit/keymaps/default/keymap.c delete mode 100644 keyboards/retro_refit/readme.md delete mode 100644 keyboards/retro_refit/retro_refit.c delete mode 100644 keyboards/retro_refit/retro_refit.h delete mode 100644 keyboards/retro_refit/rules.mk (limited to 'keyboards') diff --git a/keyboards/arrow_pad/readme.md b/keyboards/arrow_pad/readme.md index 2e9a64f2ef..d0d172272e 100644 --- a/keyboards/arrow_pad/readme.md +++ b/keyboards/arrow_pad/readme.md @@ -1,13 +1,120 @@ arrow_pad keyboard firmware ====================== +## Keyboard Info + +The ArrowPad is a wired conversion that can be made to any stand-alone keypad. It uses two main layers - a standard numpad, and a more advanced arrow cluster navigator. + +The first 24-key ArrowPad was handwired, but the PCB was wired as listed below. + +``` + pin + (Silkscreen Name if different) - + + +Note: +U2 pin 2 is the Num Lock LED and is active low. + +U2 pin 1 +Clear (Num Lock) - 1 +Enter - 2 +Esc (ESC) - 2 + + +U2 pin 3 +- - 1 + +U2 pin 4 +7 - 2 +8 - 2 +9 - 2 + +U2 pin 5 +* - 2 +Delete (BACK SPACE) - 2 + +U2 pin 6 +1 - 2 +0 - 2 +. - 2 +, - 2 + +U2 pin 7 +4 - 2 +5 - 2 +6 - 2 + +U2 pin 8 +Tab - 2 += (/) - 2 + +U2 pin 13 +Delete (BACK SPACE) - 1 +9 - 1 +6 - 1 +3 - 1 +. - 1 + +U2 pin 14 +Tab - 1 +8 - 1 +5 - 1 +2 - 1 +0 - 1 + +U2 pin 15 +Esc (ESC) - 1 += (/) - 1 +/ (*) - 1 +7 - 1 +4 - 1 +1 - 1 ++ - 1 + +U2 pin 16 +Enter - 1 +* (<--) - 1 +, - 1 + +U2 pin 17 +Fn (#NAME?) - 1 +- - 2 +Clear (Num Lock) - 2 + +U2 pin 18 +Fn (#NAME?) - 2 +* (<--) - 2 ++ - 2 +3 - 2 +2 - 2 +``` + +More info can be found on [GeekHack](https://geekhack.org/index.php?topic=73632.msg1802497#msg1802497) + +The second ArrowPad was a conversion from a 21-key Genovation keypad. It used a 2 row x 11 column matrix. + +``` +#define KEYMAP( \ + KM_ESC, KM_TAB, KM_BSL, KM_ARR, \ + KM_NUM, KM_FSL, KM_AST, KM_MIN, \ + KM___7, KM___8, KM___9, ___PLS, \ + KM___4, KM___5, KM___6, KM_PLS, \ + KM___1, KM___2, KM___3, ___ENT, \ + KM___0, _____0, KM_DOT, KM_ENT \ +) { \ + { KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \ + { KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \ +} +``` + + ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). ## Building -Download or clone the whole firmware and navigate to the keyboards/arrow_pad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. +Download or clone the whole firmware and navigate to the keyboards/arrow_pad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. Depending on which keymap you would like to use, you will have to compile slightly differently. @@ -20,7 +127,7 @@ Several version of keymap are available in advance but you are recommended to de To build the firmware binary hex file with a keymap just do `make` with a keymap like this: ``` -$ make [default|jack|] +$ make [default|pad_21|pad_24|] ``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/handwired/retro_refit/Makefile b/keyboards/handwired/retro_refit/Makefile new file mode 100644 index 0000000000..191c6bb664 --- /dev/null +++ b/keyboards/handwired/retro_refit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h new file mode 100644 index 0000000000..f2194e550c --- /dev/null +++ b/keyboards/handwired/retro_refit/config.h @@ -0,0 +1,123 @@ +/* +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 0x0001 +#define MANUFACTURER Nobody +#define PRODUCT retro_refit +#define DESCRIPTION Retro Refit + +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 8 + +// See note in retro_refit.h for an explanation of how this matrix is wired up +#define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* 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 + + +/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ +#define FORCE_NKRO + +/* + * Magic key options + * These options allow the magic key functionality to be changed. This is useful + * if your keyboard/keypad is missing keys and you want magic key support. + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* remap magic keys */ +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +#define MAGIC_KEY_LOCK BSLS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c new file mode 100644 index 0000000000..405402d5e3 --- /dev/null +++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +// 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 "retro_refit.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = + KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ + BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ + LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/handwired/retro_refit/readme.md b/keyboards/handwired/retro_refit/readme.md new file mode 100644 index 0000000000..9f10edf9fc --- /dev/null +++ b/keyboards/handwired/retro_refit/readme.md @@ -0,0 +1,60 @@ +retro_refit keyboard firmware +====================== + +## Keyboard Info + +The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop". + +http://imgur.com/a/08Fyj + +This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow". + +The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y. + +``` +#define KEYMAP( \ + K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ + K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ + K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ + K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ + K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ + K10, K06, K25, K07, K86, K85, K95, K90, K93 \ +) { \ +{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ +{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ +{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ +{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ +{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ +{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \ +{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \ +{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ +{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ +{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ +{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ +} +``` + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make default`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c new file mode 100644 index 0000000000..3d610eba34 --- /dev/null +++ b/keyboards/handwired/retro_refit/retro_refit.c @@ -0,0 +1,47 @@ +#include "retro_refit.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS) + DDRD |= (1<<6); + PORTD |= (1<<6); + + matrix_init_user(); +}; + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (usb_led & (1< - -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 0x0001 -#define MANUFACTURER Nobody -#define PRODUCT retro_refit -#define DESCRIPTION Retro Refit - -/* key matrix size */ -#define MATRIX_ROWS 11 -#define MATRIX_COLS 8 - -// See note in retro_refit.h for an explanation of how this matrix is wired up -#define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } -#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 0 - -/* 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 - - -/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ -#define FORCE_NKRO - -/* - * Magic key options - * These options allow the magic key functionality to be changed. This is useful - * if your keyboard/keypad is missing keys and you want magic key support. - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* remap magic keys */ -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -#define MAGIC_KEY_LOCK BSLS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * 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/retro_refit/keymaps/default/keymap.c b/keyboards/retro_refit/keymaps/default/keymap.c deleted file mode 100644 index 405402d5e3..0000000000 --- a/keyboards/retro_refit/keymaps/default/keymap.c +++ /dev/null @@ -1,33 +0,0 @@ -// 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 "retro_refit.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = - KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ - BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ - LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/retro_refit/readme.md b/keyboards/retro_refit/readme.md deleted file mode 100644 index 77df861cef..0000000000 --- a/keyboards/retro_refit/readme.md +++ /dev/null @@ -1,26 +0,0 @@ -retro_refit keyboard firmware -====================== - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/retro_refit/retro_refit.c b/keyboards/retro_refit/retro_refit.c deleted file mode 100644 index 3d610eba34..0000000000 --- a/keyboards/retro_refit/retro_refit.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "retro_refit.h" -#include "led.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS) - DDRD |= (1<<6); - PORTD |= (1<<6); - - matrix_init_user(); -}; - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (usb_led & (1< Date: Wed, 14 Sep 2016 09:39:16 -0500 Subject: Copy config overrides to my keymap directory... --- keyboards/atreus/config.h | 3 - keyboards/atreus/keymaps/erlandsona/config.h | 101 +++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 keyboards/atreus/keymaps/erlandsona/config.h (limited to 'keyboards') diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index a59eee18eb..51162cde3a 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -49,9 +49,6 @@ along with this program. If not, see . # define UNUSED_PINS #endif -/* Make Overloaded Keys switch faster */ -#define TAPPING_TERM 175 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h new file mode 100644 index 0000000000..6f0d258f50 --- /dev/null +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -0,0 +1,101 @@ +/* +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" + + + + +/* Make Overloaded Keys switch faster */ +#define TAPPING_TERM 175 + + + + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Technomancy +#define PRODUCT Atreus +#define DESCRIPTION q.m.k. keyboard firmware for Atreus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +// Change this to how you wired your keyboard +// COLS: Left to right, ROWS: Top to bottom +#if defined(ATREUS_ASTAR) +# define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#if defined(PCBDOWN) +# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#else +# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#endif +# define UNUSED_PINS +#elif defined(ATREUS_TEENSY2) +# define MATRIX_ROW_PINS { D0, D1, D2, D3 } +# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } +# define UNUSED_PINS +#endif + +/* 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)) \ +) + +/* + * 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 -- cgit v1.2.3 From 8a01bbc42286a60bcbca2fe9e09298fb9116811a Mon Sep 17 00:00:00 2001 From: "Lars R. Noldan" Date: Wed, 14 Sep 2016 11:54:13 -0500 Subject: Adding Space Cadet, And Correcting Ascii Keymap --- .../ergodox/keymaps/absenth/absenth_highres.png | Bin 1429453 -> 1463041 bytes keyboards/ergodox/keymaps/absenth/keymap.c | 12 ++++++------ keyboards/ergodox/keymaps/absenth/readme.md | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/absenth/absenth_highres.png b/keyboards/ergodox/keymaps/absenth/absenth_highres.png index a0596b2812..c07aa8803f 100644 Binary files a/keyboards/ergodox/keymaps/absenth/absenth_highres.png and b/keyboards/ergodox/keymaps/absenth/absenth_highres.png differ diff --git a/keyboards/ergodox/keymaps/absenth/keymap.c b/keyboards/ergodox/keymaps/absenth/keymap.c index 30f7474191..ded668e13b 100644 --- a/keyboards/ergodox/keymaps/absenth/keymap.c +++ b/keyboards/ergodox/keymaps/absenth/keymap.c @@ -15,9 +15,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * | BkSp | A/L2 | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * | LS/PO |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RS/PC | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | * `----------------------------------' `----------------------------------' @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, KC_LALT, CTL_T(KC_ESC), KC_PGUP, @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| left | down | up | down | | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * ,------|------|------| |------+------+------. * | | | | | | |Brwser| - * | | |------| |------| |Back | + * | Lclk | Rclk |------| |------| |Back | * | | | | | | | | * `--------------------' `--------------------' */ diff --git a/keyboards/ergodox/keymaps/absenth/readme.md b/keyboards/ergodox/keymaps/absenth/readme.md index 35d0aad461..0c04bf4177 100644 --- a/keyboards/ergodox/keymaps/absenth/readme.md +++ b/keyboards/ergodox/keymaps/absenth/readme.md @@ -2,6 +2,9 @@ ## Changelog + +* Sept. 14, 2016 (V0.2): + * Added Space Cadet to Left and Right Shift. Pressing Left shift with no other key adds an "(" and pressing Right shift with no other key adds an ")" * Sept. 8, 2016 (V0.1): * Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer. -- cgit v1.2.3 From 24e8d01dc93c7367fbc58b79955b7c4ef6899c61 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Thu, 15 Sep 2016 11:28:12 -0400 Subject: Move ALT... --- keyboards/planck/keymaps/cbbrowne/keymap.c | 3 ++- keyboards/planck/keymaps/cbbrowne/readme.md | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index d6f8a6ed48..26a99a4e74 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -92,6 +92,7 @@ enum macro_id { #define RANDALP M(M_RANDLETTER) #define CTLENTER MT(MOD_RCTL, KC_ENT) #define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) +#define ALTRIGHT MT(MOD_LALT, KC_RGHT) /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -101,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, - {KC_TAB, ROT_LED, KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, [_RAISE] = { /* RAISE */ diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 272e042a0d..184142e0c1 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -27,10 +27,23 @@ doing sundry experimentation: * Trying out sgoodwin's "hold Enter down to get Shift" - Liking this Quite Well Enough... - Applied this to both Shift and Quote + - It seems likely that Alt should get a right-hand-side, akin to this... + - Alt needs to move, and get a RHS + - Hence ALTRIGHT, and shifted ROT_LED over + - Emacs likes this!!! :-) + - I'm suspicious that I'll want to shift ROT_LED another location over, + so some modifier can replace the OS/KC_LGUI key * I have added an alternate ADJUST layer that is activated via update_tri_layer() - e.g. - LOWER+RAISE simultaneously - This seems entirely more useful for handling my "special keys" like the random numbers, user name, and such, than the keypad layer + * The _ADJUST layer provides a good place to have RESET + - But this isn't strictly enough; I want RESET somewhat accessible from + main layer lest an error hide that layer + - I never use the OS/KC_LGUI key (that's Command on MacOS, Windows + Key on Windows), so that's a good place to have it as a chord of + some sort + 2. Some code structure ideas --------------------------------------------------- @@ -49,8 +62,8 @@ doing sundry experimentation: only need to fit 4 symbols onto each line, rather than 12. I used enums to manage layer IDs and macro IDs so that I don't need - to care (beyond "start at 0", and arguably that's not needed) about - their values. + to care (beyond "start at 0", and arguably even that's not needed) + about their values. 3. Things I did not like about the default mapping --------------------------------------------------------- @@ -83,8 +96,6 @@ unwise things again... to allow selecting multiple items, and this really interferes with that - - 5. TODO --------------------------------------------------------- -- cgit v1.2.3 From e50f15e36019fa39798bbe4e001fe7d2c94c88e7 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Thu, 15 Sep 2016 10:58:28 -0500 Subject: Add IGNORE_MOD_TAP_INTERRUPT to fix overloaded mod keys sending mod on diads... --- keyboards/atreus/keymaps/erlandsona/config.h | 11 +++++++---- keyboards/atreus/keymaps/erlandsona/keymap.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index 6f0d258f50..bf09bf23aa 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -21,13 +21,16 @@ along with this program. If not, see . #include "config_common.h" - - /* Make Overloaded Keys switch faster */ #define TAPPING_TERM 175 - - +/* this makes it possible to do rolling combos (zx) + * with keys that convert to other keys on hold + * (z becomes ctrl when you hold it, + * and when this option isn't enabled, + * z rapidly followed by x actually sends Ctrl-x. That's bad.) + */ +#define IGNORE_MOD_TAP_INTERRUPT /* USB Device descriptor parameter */ diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 9e11ac048e..7807eb2245 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -18,16 +18,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + ALT_T(KC_A), KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_7 , KC_8 , KC_9 , KC_0 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, - KC_TAB , KC_4 , KC_5 , KC_6 , KC_DLR, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - _______, KC_1 , KC_2 , KC_3 , KC_DOT, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL, F(MOUS), _______, _______, _______, _______, _______, _______), + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + ALT_T(KC_TAB), KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______ , KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______ , _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), [MOUS] = KEYMAP( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, -- cgit v1.2.3 From ac6125cbea0ef2cfb9e8c79b89659128f60f0853 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Thu, 15 Sep 2016 11:19:54 -0500 Subject: Revert because the IGNORE_MOD_TAP_INTERRUPT flag didn't feel right. --- keyboards/atreus/keymaps/erlandsona/config.h | 10 +--------- keyboards/atreus/keymaps/erlandsona/keymap.c | 10 +++++----- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index bf09bf23aa..d9eb1903ed 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -22,15 +22,7 @@ along with this program. If not, see . /* Make Overloaded Keys switch faster */ -#define TAPPING_TERM 175 - -/* this makes it possible to do rolling combos (zx) - * with keys that convert to other keys on hold - * (z becomes ctrl when you hold it, - * and when this option isn't enabled, - * z rapidly followed by x actually sends Ctrl-x. That's bad.) - */ -#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 150 /* USB Device descriptor parameter */ diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 7807eb2245..32c8826e02 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -19,15 +19,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - ALT_T(KC_A), KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, - ALT_T(KC_TAB), KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - _______ , KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______ , _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), [MOUS] = KEYMAP( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, -- cgit v1.2.3 From cc7604d11670cf3155d53f0019557b249b1192c0 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Fri, 16 Sep 2016 17:15:33 -0400 Subject: Add breathing, as initial implementation with the RAISE/LOWER keys. And throw in extra macros to shorten keymaps --- keyboards/planck/keymaps/cbbrowne/config.h | 5 +++-- keyboards/planck/keymaps/cbbrowne/keymap.c | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 58cd2cc5bc..1e04ba61d7 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -3,6 +3,9 @@ #include "../../config.h" +#define LEADER_TIMEOUT 300 +#define BACKLIGHT_BREATHING + /* cbbrowne user configuration */ #define randadd 53 @@ -16,5 +19,3 @@ #endif - - diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 26a99a4e74..7f1601af75 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -93,6 +93,7 @@ enum macro_id { #define CTLENTER MT(MOD_RCTL, KC_ENT) #define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) #define ALTRIGHT MT(MOD_LALT, KC_RGHT) +#define MVERSION M(M_VERSION) /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -116,16 +117,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, 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, QWERTY, KEYPAD, KEYPAD, RESET, _______}, {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, + }, [_KEYPAD] = { /* Key Pad */ - {KC_ESC, USERNAME, M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, + {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, {KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {BL_STEP, ROT_LED, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} + {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} }, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ - { ROT_LED, USERNAME, M(M_VERSION), _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } @@ -198,6 +199,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { layer_on(_RAISE); +#ifdef BACKLIGHT_ENABLE + breathing_speed_set(2); + breathing_pulse(); +#endif update_tri_layer(_LOWER, _RAISE, _ADJUST); } else @@ -210,6 +215,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { layer_on(_LOWER); +#ifdef BACKLIGHT_ENABLE + breathing_speed_set(2); + breathing_pulse(); +#endif update_tri_layer(_LOWER, _RAISE, _ADJUST); } else -- cgit v1.2.3 From 602b058b9e1ebbe043754e39007cf01427872770 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 17 Sep 2016 19:40:56 +0200 Subject: - Added capslock led for KC60 keyboard (based on gitbug.com/jpec/kc60 works) --- keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c | 103 +++++++++++++++++++++ keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md | 11 +++ 2 files changed, 114 insertions(+) create mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c create mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c new file mode 100644 index 0000000000..0c952327b9 --- /dev/null +++ b/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c @@ -0,0 +1,103 @@ +// 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 "kc60.h" + +#define _QWERTY 0 +#define _FNCAPS 1 +#define _FNRIGHTSHIFT 2 + +// Fillers to make layering more clear +#define ______ KC_TRNS +#define XXXXXXX KC_NO + +// Func macro definitions. +#define S_LED FUNC(0) +#define S_LEDI FUNC(1) +#define S_LEDD FUNC(2) + +// Enable these functions using FUNC(n) macro. +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_BACKLIGHT_TOGGLE(), + [1] = ACTION_BACKLIGHT_INCREASE(), + [2] = ACTION_BACKLIGHT_DECREASE() + }; + +/* + * | | | + * | | | + * | | | + * | | | + * | | + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Up | FN2 | + * |-----------------------------------------------------------------------------------------+ + * | FN1 | Gui | Alt | Space | AltGr | Left | Down | Right | + * `-----------------------------------------------------------------------------------------' + */ + [0] = KEYMAP( /* Basic QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, \ + 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_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FNRIGHTSHIFT), KC_UP, \ + LT(_FNCAPS, KC_CAPS), KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + +/* Layer 1 + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | Psc | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | Led | Led-| Led+| | Mute| Vol+| Vol-| | | | Play | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | Prev | Stop | Next | + * `-----------------------------------------------------------------------------------------' + */ + [_FNCAPS] = KEYMAP( /* Layer 1 */ + ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______, \ + ______, ______, S_LED, S_LEDI, S_LEDD,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ + ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \ + ), + +/* Layer 2 + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | Home | PgDown| End | + * `-----------------------------------------------------------------------------------------' + */ + [_FNRIGHTSHIFT] = KEYMAP( /* Layer 2 */ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, \ + ______, ______, ______, ______, ______, ______, KC_HOME,KC_PGDN,KC_END \ + ), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + return MACRO_NONE; +}; diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md b/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md new file mode 100644 index 0000000000..c7850c37ce --- /dev/null +++ b/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md @@ -0,0 +1,11 @@ +# Dbroqua HHKB like Layout + +* Online keyboard layout editor: *Coming soon* +* Online keyboard layout editor (caps layer): http://www.keyboard-layout-editor.com/#/gists/4136d4d1555d6f0d9403c21aaf50fd37 +* Online keyboard layout editor (fn2 layer): http://www.keyboard-layout-editor.com/#/gists/cf4955f73f339020dbb41c15364e7e4f + +# Programming Instructions: +Enter into programming mode and run the following command. +``` +$ sudo KEYMAP=dbroqua_hhkb_like make dfu +``` \ No newline at end of file -- cgit v1.2.3 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 (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile index 7c2b3ad97c..699add3dda 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 3d0a5fb20c..b611fbc42a 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 7ea57aae38..2a981a4706 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 356035e0a6..4f55c5adff 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 9f476d8a6b..248a0ed303 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 5e7adb3320..f15b676528 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 4dfa877a78..502d1e6ea4 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 1248d36af7..5b4ca06c30 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 0000000000..f3b83cf6d1 --- /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 0000000000..627c2861ef --- /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 68585843be..09c737646c 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 4d5220aa8b..0000000000 --- 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 0000000000..e068c3cbfb --- /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 From 94af0194ddfe8f8a3069c926170d8995de5c1781 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 19 Sep 2016 13:22:34 +0200 Subject: - Updated dbroqua layout for kc60 --- keyboards/kc60/keymaps/dbroqua/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index e17827fad9..1b645ea938 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -34,9 +34,9 @@ const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | Bksp| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | * |-----------------------------------------------------------------------------------------+ * | Caps/FN1| A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------+ @@ -46,11 +46,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ [0] = KEYMAP( /* Basic QWERTY */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_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_BSLS, \ + 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_BSPC, \ LT(_FNCAPS, 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_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FNRIGHTSHIFT), KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ ), /* Layer 1 -- cgit v1.2.3 From 9a2e24fa98f90517a0a091b3ccd9de125457d09f Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 19 Sep 2016 13:36:36 +0200 Subject: - Removed HHKB like layout --- keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c | 103 --------------------- keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md | 11 --- 2 files changed, 114 deletions(-) delete mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c delete mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c deleted file mode 100644 index 0c952327b9..0000000000 --- a/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c +++ /dev/null @@ -1,103 +0,0 @@ -// 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 "kc60.h" - -#define _QWERTY 0 -#define _FNCAPS 1 -#define _FNRIGHTSHIFT 2 - -// Fillers to make layering more clear -#define ______ KC_TRNS -#define XXXXXXX KC_NO - -// Func macro definitions. -#define S_LED FUNC(0) -#define S_LEDI FUNC(1) -#define S_LEDD FUNC(2) - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_BACKLIGHT_TOGGLE(), - [1] = ACTION_BACKLIGHT_INCREASE(), - [2] = ACTION_BACKLIGHT_DECREASE() - }; - -/* - * | | | - * | | | - * | | | - * | | | - * | | - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Up | FN2 | - * |-----------------------------------------------------------------------------------------+ - * | FN1 | Gui | Alt | Space | AltGr | Left | Down | Right | - * `-----------------------------------------------------------------------------------------' - */ - [0] = KEYMAP( /* Basic QWERTY */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, \ - 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_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FNRIGHTSHIFT), KC_UP, \ - LT(_FNCAPS, KC_CAPS), KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ - ), - -/* Layer 1 - * ,-----------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | Psc | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | Led | Led-| Led+| | Mute| Vol+| Vol-| | | | Play | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | Prev | Stop | Next | - * `-----------------------------------------------------------------------------------------' - */ - [_FNCAPS] = KEYMAP( /* Layer 1 */ - ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______, \ - ______, ______, S_LED, S_LEDI, S_LEDD,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ - ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \ - ), - -/* Layer 2 - * ,-----------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | PgUp | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | Home | PgDown| End | - * `-----------------------------------------------------------------------------------------' - */ - [_FNRIGHTSHIFT] = KEYMAP( /* Layer 2 */ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, \ - ______, ______, ______, ______, ______, ______, KC_HOME,KC_PGDN,KC_END \ - ), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - return MACRO_NONE; -}; diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md b/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md deleted file mode 100644 index c7850c37ce..0000000000 --- a/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# Dbroqua HHKB like Layout - -* Online keyboard layout editor: *Coming soon* -* Online keyboard layout editor (caps layer): http://www.keyboard-layout-editor.com/#/gists/4136d4d1555d6f0d9403c21aaf50fd37 -* Online keyboard layout editor (fn2 layer): http://www.keyboard-layout-editor.com/#/gists/cf4955f73f339020dbb41c15364e7e4f - -# Programming Instructions: -Enter into programming mode and run the following command. -``` -$ sudo KEYMAP=dbroqua_hhkb_like make dfu -``` \ No newline at end of file -- cgit v1.2.3 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index e816f359a6..503976fa28 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 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(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index ec99514aa3..f4d900accb 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 c72789403e..084c890c40 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 6961fbd556..6fde8a444c 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 f439c2f20b..6faed09ce0 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 65003a71a4..461921798f 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 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 (limited to 'keyboards') diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h new file mode 100644 index 0000000000..2671fabf6d --- /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 0000000000..0d2d94b672 --- /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 0000000000..f4d900accb --- /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 0000000000..0d2d94b672 --- /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 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(-) (limited to 'keyboards') diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index c4a9b9ff82..29695d0b9d 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index de9680b498..af85d7603b 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 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(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index af85d7603b..7b3c87b4ec 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 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(+) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index 7b3c87b4ec..02c719197e 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 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(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodox/keymaps/default/keymap.c index 1b80cb3a23..2f399bd181 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 8f6dba45e9..f68138ed62 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 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 (limited to 'keyboards') diff --git a/keyboards/tada68/Makefile b/keyboards/tada68/Makefile new file mode 100644 index 0000000000..4e2a6f00fd --- /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 0000000000..5c2b290624 --- /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 0000000000..2a7ff27793 --- /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 0000000000..da57c0343b --- /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 0000000000..36760d6b91 --- /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 0000000000..552fdea529 --- /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 0000000000..1102584d8a --- /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 0000000000..24f89048cb --- /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(-) (limited to 'keyboards') diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index 5c2b290624..5d8757936d 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 1102584d8a..d8ec423655 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 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(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox/ez/rules.mk index 37e554b304..a9715beb85 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 From f0441f08b87986f49479f1503b11a3d3f899d58e Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sun, 25 Sep 2016 16:32:06 +0200 Subject: - Added dbroqua layout for HHKB keyboard --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 70 ++++++++++++++++++++++++++++++++ keyboards/hhkb/keymaps/dbroqua/readme.md | 9 ++++ 2 files changed, 79 insertions(+) create mode 100644 keyboards/hhkb/keymaps/dbroqua/keymap.c create mode 100644 keyboards/hhkb/keymaps/dbroqua/readme.md (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c new file mode 100644 index 0000000000..ef43aae281 --- /dev/null +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -0,0 +1,70 @@ +/* + * dbroqua HHKB Layout + */ +#include "hhkb.h" + +#define BASE 0 +#define FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE Level: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Left |Right| + * +-----------------------------------------------------------------------------------------+ + * | Gui | Alt | Space | AltGr | fn | + * `----------------------------------------------------------------´ + */ + [BASE] = KEYMAP( + 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_BSLS, 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_BSPC, \ + KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LEFT, KC_RGHT, \ + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(FN) + ), + + /* BASE Level: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * |-----------------------------------------------------------------------------------------+ + * | Caps | | | | | | | | | | | Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute| | | |PrtSc| Home| PgUp| Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | | | End |PgDwn| Down| Up | Down| + * +-----------------------------------------------------------------------------------------+ + * | | | | | | + * `----------------------------------------------------------------´ + */ + [FN] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_UP, KC_DOWN, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/keymaps/dbroqua/readme.md new file mode 100644 index 0000000000..0afebc84c8 --- /dev/null +++ b/keyboards/hhkb/keymaps/dbroqua/readme.md @@ -0,0 +1,9 @@ +# Dbroqua Layout + +* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01 + +# Programming Instructions: +Enter into programming mode and run the following command. +``` +$ sudo KEYMAP=dbroqua make dfu +``` \ No newline at end of file -- cgit v1.2.3 From 77099c777aa34e07548f64928d5d233c4cf35a5e Mon Sep 17 00:00:00 2001 From: Jeremy Cowgar Date: Sun, 25 Sep 2016 12:23:59 -0400 Subject: =?UTF-8?q?Added=20Jeremy=E2=80=99s=20Atreus=20Layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/atreus/keymaps/jeremy/keymap.c | 66 +++++++++++++++++++++++++++++++ keyboards/atreus/keymaps/jeremy/readme.md | 45 +++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 keyboards/atreus/keymaps/jeremy/keymap.c create mode 100644 keyboards/atreus/keymaps/jeremy/readme.md (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c new file mode 100644 index 0000000000..90ec6f9049 --- /dev/null +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -0,0 +1,66 @@ +// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer. + +#include "atreus.h" +#include "action_layer.h" +#include "keymap_colemak.h" + +#define PREVENT_STUCK_MODIFIERS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +#define ALPH 0 +#define NUMS 1 +#define CURS 2 +#define SYMB 3 +#define FKEY 4 + +// Some handy macros to keep the keymaps clean and easier to maintain +#define KM_SAVE LGUI(CM_S) +#define KM_CLSE LGUI(CM_W) +#define KM_OPEN LGUI(CM_O) + +#define KM_COPY LGUI(KC_C) +#define KM_CUT LGUI(KC_X) +#define KM_PAST LGUI(KC_V) +#define KM_UNDO LGUI(KC_Z) +#define KM_REDO LGUI(LSFT(KC_Z)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[ALPH] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P}, + {KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN}, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, + {KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL} +}, +[NUMS] = { + {KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH}, + {KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, + {KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} +}, +[CURS] = { + {KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS}, + {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS}, + {KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +[SYMB] = { + {KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC}, + {KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD}, + {KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC}, + {KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +[FKEY] = { + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}}; + +const uint16_t PROGMEM fn_actions[] = {}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) {} + + return MACRO_NONE; +}; diff --git a/keyboards/atreus/keymaps/jeremy/readme.md b/keyboards/atreus/keymaps/jeremy/readme.md new file mode 100644 index 0000000000..df0179a8e0 --- /dev/null +++ b/keyboards/atreus/keymaps/jeremy/readme.md @@ -0,0 +1,45 @@ +Jeremy's Atreus Key Mapping +=========================== + +I am a programmer by trade that suffers from the beginning stages of RSI. As a programmer I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, for me. I made heavy use of momentary layer toggling. + +My layout is also geared toward a software based Colemak mapping. I would like it to be hardware, but I use my Laptop on the go frequently and thus my laptop keyboard. I have moved the keycaps to reflect the Colemak layout. My laptop is a MacBook Pro (2015). + +## Main Layers + +1. [Letters](http://www.keyboard-layout-editor.com/#/gists/6861cb9df09ce78efaddf8aa7471e3ac) +2. [Symbols](http://www.keyboard-layout-editor.com/#/gists/8956a18b508a78e93b9c38ec3fcccaa5) +3. [Navigation](http://www.keyboard-layout-editor.com/#/gists/6ed492b714a7f54eb1c5de09b87fd8c4) +4. [Numbers](http://www.keyboard-layout-editor.com/#/gists/399ceb5624e8388e48a3a5eacac8e973) +5. [Function Keys](http://www.keyboard-layout-editor.com/#/gists/7fd7dc24c7048316f3724b1893c64e89) + +## Notes + +### General + +Some characters can be accessed multiple ways. This was done because you may be in a given layer, such as numbers, where when doing math, you may need quick access to the parentheses characters for grouping. This prevents some layer switching. + +I own an ErgoDox and plan on porting this as a base layer, then using the extra keys the ErgoDox provides accordingly. My goal, though, is to be fully functional on this base setup and build everything into muscle memory. + +### Symbol Layer + +1. I placed characters that deal with an if statement close together, such as !, & and |. +2. All matching brace/bracket characters are together as well. + +### Number Layer + +1. Everything I did was a compromise when trying to mimic a ten-key. I did the best I could. +2. Operators are duplicated on the right and left. I do not find it comfortable to use my pinky much, so I tend to use my left hand for +, -, * and / but those were also placed on the right hand to mimic the ten-key. +3. Parentheses were added for typing on the calculator. + +### Cursor Layer + +1. It includes basic audio controls because they didn't really fit anywhere else +2. It contains basic file manipulation. I'm not sure that was a good idea. I do save all the time, but Cmd+S isn't exactly hard. +3. It contains the backspace and delete keys right on top of the left and right arrows. +4. Cmd and Opt keys are duplicated. This makes for very easy navigation, for example on a Mac, Opt+Left/Right moves word by word. It also backspaces or deletes word by word. + +### Function Layer + +1. Almost all other layers I saw grouped the F keys into a bunch of three. This only gives nine function keys in order if you attempt to stay as close to the home row as possible. I went with a group of four, which gives all twelve function keys to the right hand, one row below and above the home row. +2. I duplicated the Command and Option keys the same as on the cursor layer. This makes it dead easy to hit modified function keys such as Cmd+Opt+F5. It's also easy to toss in a Shift modifier in there with the right thumb since the bottom row is preserved. -- cgit v1.2.3 From c40ad11615b6cb1d08ec2d3b284d59df00c57c1f Mon Sep 17 00:00:00 2001 From: Dustin Date: Sun, 25 Sep 2016 19:04:20 -0700 Subject: Fix lets_split.c so that audio can be disabled Matching the use of `#ifdef AUDIO_ENABLE` used in `matrix_init_kb()` in order to compile firmware for the Let's Split keyboard without audio enabled. --- keyboards/lets_split/lets_split.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index 574c116a75..c505d3a6e3 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -24,7 +24,9 @@ void matrix_init_kb(void) { }; void shutdown_user(void) { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif } -- cgit v1.2.3 From 04c0a1c3e2d9f81cd44dc7548f6135ca175edbe1 Mon Sep 17 00:00:00 2001 From: chwilk Date: Mon, 26 Sep 2016 01:04:33 -0500 Subject: Added ONEHAND_ENABLE to allow SWAP HANDS actions --- keyboards/ergodox/rules.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/rules.mk b/keyboards/ergodox/rules.mk index ac63d4eff2..add64ec76f 100644 --- a/keyboards/ergodox/rules.mk +++ b/keyboards/ergodox/rules.mk @@ -26,3 +26,4 @@ SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work MIDI_ENABLE ?= no # MIDI controls UNICODE_ENABLE ?= yes # Unicode +ONEHAND_ENABLE ?= yes # Allow swapping hands of keyboard -- cgit v1.2.3 From 90fd0810dbd551b32e4be46f108b4974890299b9 Mon Sep 17 00:00:00 2001 From: chwilk Date: Mon, 26 Sep 2016 01:05:06 -0500 Subject: Updated kastyle keymap, including swap hands feature --- keyboards/ergodox/keymaps/kastyle/keymap.c | 98 +++++++++++++++++++----------- 1 file changed, 62 insertions(+), 36 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/keyboards/ergodox/keymaps/kastyle/keymap.c index a920850039..4e3794a96f 100644 --- a/keyboards/ergodox/keymaps/kastyle/keymap.c +++ b/keyboards/ergodox/keymaps/kastyle/keymap.c @@ -1,3 +1,6 @@ +/* Setup to approximate a Kinesis Advantage with an eye to use in a + * Mac/OSX environment + * This version adds a hand swap feature to flip the keyboard */ #include "ergodox.h" #include "debug.h" #include "action_layer.h" @@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1| * `----------------------------------' `----------------------------------' * ,---------------. ,---------------. - * |Ctrl/Esc| Alt | | Alt |Ctrl/Esc| + * | LGUI |Al/Esc| |Al/Esc| RGUI | * ,------|--------|------| |------+--------+------. * | | | Home | | PgUp | | | * |Backsp| Del |------| |------| Enter | Space| @@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - CTL_T(KC_ESC), ALT_T(KC_APP), - KC_HOME, - KC_BSPC,KC_DEL,KC_END, - // right hand - KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_ENT, KC_SPC - ), + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + KC_LGUI, ALT_T(KC_ESC), + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + // right hand + KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + ALT_T(KC_ESC), KC_RGUI, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC +), + /* Keymap 1: Symbol Layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // SYMBOLS [SYMB] = KEYMAP( // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, + KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, + KC_PAUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, @@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + /* Keymap 2: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -135,10 +140,6 @@ KEYMAP( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -154,6 +155,31 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, + {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, + {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, + {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + /* Right hand, matrix positions */ + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands +}; + + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3 From e1bfe13090debb25db8e44048cd0055e3680513c Mon Sep 17 00:00:00 2001 From: chwilk Date: Mon, 26 Sep 2016 15:49:10 -0500 Subject: Moved hand_swap_config array so all keyboards get it defined --- keyboards/ergodox/ergodox.c | 24 ++++++++++++++++++++++++ keyboards/ergodox/keymaps/kastyle/keymap.c | 21 --------------------- 2 files changed, 24 insertions(+), 21 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/ergodox.c b/keyboards/ergodox/ergodox.c index e69de29bb2..c88c1ad890 100644 --- a/keyboards/ergodox/ergodox.c +++ b/keyboards/ergodox/ergodox.c @@ -0,0 +1,24 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, + {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, + {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, + {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + /* Right hand, matrix positions */ + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, +}; + diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/keyboards/ergodox/keymaps/kastyle/keymap.c index 4e3794a96f..4679966869 100644 --- a/keyboards/ergodox/keymaps/kastyle/keymap.c +++ b/keyboards/ergodox/keymaps/kastyle/keymap.c @@ -155,31 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; -// swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - /* Left hand, matrix positions */ - {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, - {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, - {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, - {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, - {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, - {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, - {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, - /* Right hand, matrix positions */ - {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, - {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, - {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, - {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, - {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, - {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, - {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, -}; - const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands }; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3 From 32cc2f6bd90233401a3590b3f975304dac6e4805 Mon Sep 17 00:00:00 2001 From: chwilk Date: Tue, 27 Sep 2016 11:27:09 -0500 Subject: Added description of kastyle keymap --- keyboards/ergodox/keymaps/kastyle/readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 keyboards/ergodox/keymaps/kastyle/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/kastyle/readme.md b/keyboards/ergodox/keymaps/kastyle/readme.md new file mode 100644 index 0000000000..944286a818 --- /dev/null +++ b/keyboards/ergodox/keymaps/kastyle/readme.md @@ -0,0 +1,14 @@ +The kastyle keymap was originally intended to remap the ErgoDox EZ to more +closely approximate the layout of a Kinesis Advantage. Notable changes +over the stock ErgoDox layout include: + + * Re-arragnement of tab, enter, space, and delete to match the Kinesis + * Addition of print screen, pause, etc. keys following the kines-ish keymap + on L1 + * GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys + are mapped to allow Esc on tap (good for Vi users) + * Most notably, the addition of a momentary one-handed mode for quick and + easy access to keys on the other half of the keyboard, e.g. while using a + mouse in one hand, one may add text to a dialogue box with the other without + having to reach across the keyboard or remove one's hand from the mouse. + -- cgit v1.2.3 From 65b0eff6d863d458464c35a8571071ad4a519af5 Mon Sep 17 00:00:00 2001 From: Chris McLennon Date: Wed, 28 Sep 2016 13:24:29 -0500 Subject: Contributing new keymap to Ergodox --- keyboards/ergodox/keymaps/mclennon_osx/README.md | 5 + keyboards/ergodox/keymaps/mclennon_osx/config.h | 93 +++++++++++++++ keyboards/ergodox/keymaps/mclennon_osx/keymap.c | 144 +++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 keyboards/ergodox/keymaps/mclennon_osx/README.md create mode 100644 keyboards/ergodox/keymaps/mclennon_osx/config.h create mode 100644 keyboards/ergodox/keymaps/mclennon_osx/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md new file mode 100644 index 0000000000..60980d043d --- /dev/null +++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md @@ -0,0 +1,5 @@ +# Ergodox EZ for OS X + +This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. + +If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). diff --git a/keyboards/ergodox/keymaps/mclennon_osx/config.h b/keyboards/ergodox/keymaps/mclennon_osx/config.h new file mode 100644 index 0000000000..99cbaf0003 --- /dev/null +++ b/keyboards/ergodox/keymaps/mclennon_osx/config.h @@ -0,0 +1,93 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDox EZ +#define PRODUCT ErgoDox EZ +#define DESCRIPTION t.m.k. keyboard firmware for Ergodox + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_COLS 6 + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + +#define TAPPING_TOGGLE 1 + +#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define ROWS (int []){ D0, D5, B5, B6 } + +/* 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 DEBOUNCE 2 +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* + * 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 +//#define DEBUG_MATRIX_SCAN_RATE + +// CUSTOM +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/ergodox/keymaps/mclennon_osx/keymap.c b/keyboards/ergodox/keymaps/mclennon_osx/keymap.c new file mode 100644 index 0000000000..627ff01e4a --- /dev/null +++ b/keyboards/ergodox/keymaps/mclennon_osx/keymap.c @@ -0,0 +1,144 @@ +// Media keys work on OSX, but not on Windows. +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // Default layer +#define AUXI 1 // Auxiliary layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | -_ | += | Bkspc | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | Del | Y | U | I | O | P | |\ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | L1 | A | S | D | F | G |------| |------| H | J | K | L | ;: | Enter | + * |--------+------+------+------+------+------| {[ | | }] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | <, | >. | ?/ | "' | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | | | | Esc | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | |Power | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | LGui | LAlt |------| |------| Bkspc |Space | + * | | | | | Del | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1), + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, + KC_LCTL, KC_TRNS,KC_TRNS,KC_TRNS,KC_ESC, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_LGUI,KC_LALT,KC_TRNS, + + // right hand + KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, + KC_DELETE, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT, + KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_QUOT, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_PWR, KC_TRNS, + KC_TRNS, + KC_DELETE, KC_BSPC, KC_SPC + ), +/* Keymap 1: Auxiliary Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | TRNS | | | Mute | VolDn| VolUp| Play | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TRNS | |LShift| LCtrl| | |------| |------| LEFT | DOWN | UP |RIGHT | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | | | | | | | | | MPrv | MNxt | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | LGui | LAlt |------| |------| Bkspc| Space| + * | | | | | Del | | | + * `--------------------' `--------------------' + */ +// AUXILIARY +[AUXI] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LSHIFT,KC_LCTL, KC_TRNS, KC_TRNS, + KC_LSHIFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_LGUI, KC_LALT, KC_TRNS, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PWR, KC_TRNS, + KC_TRNS, + KC_DELETE, KC_BSPC, KC_SPC +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; -- cgit v1.2.3 From cce294df86be7c430f8764ae3330991e66138f43 Mon Sep 17 00:00:00 2001 From: Chris McLennon Date: Wed, 28 Sep 2016 14:44:41 -0500 Subject: Remove config.h --- keyboards/ergodox/keymaps/mclennon_osx/config.h | 93 ------------------------- 1 file changed, 93 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/mclennon_osx/config.h (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/mclennon_osx/config.h b/keyboards/ergodox/keymaps/mclennon_osx/config.h deleted file mode 100644 index 99cbaf0003..0000000000 --- a/keyboards/ergodox/keymaps/mclennon_osx/config.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2013 Oleg Kostyuk - -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 0x1307 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDox EZ -#define PRODUCT ErgoDox EZ -#define DESCRIPTION t.m.k. keyboard firmware for Ergodox - -/* key matrix size */ -#define MATRIX_ROWS 14 -#define MATRIX_COLS 6 - -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 3 -#define MOUSEKEY_TIME_TO_MAX 10 - -#define TAPPING_TOGGLE 1 - -#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define ROWS (int []){ D0, D5, B5, B6 } - -/* 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 DEBOUNCE 2 -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) - -/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - -/* - * 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 -//#define DEBUG_MATRIX_SCAN_RATE - -// CUSTOM -#define PREVENT_STUCK_MODIFIERS - -#endif -- cgit v1.2.3 From 3d45860dc280c7595763256ecd4874220abf0ab2 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 28 Sep 2016 20:19:28 -0500 Subject: Updating Vision to beta layout. --- keyboards/vision_division/config.h | 19 +- keyboards/vision_division/keymaps/default/Makefile | 26 +- keyboards/vision_division/keymaps/default/config.h | 46 +- keyboards/vision_division/keymaps/default/keymap.c | 940 ++++++++++----------- keyboards/vision_division/matrix_types.h | 33 +- keyboards/vision_division/rules.mk | 2 +- keyboards/vision_division/vision_division.c | 40 + 7 files changed, 570 insertions(+), 536 deletions(-) (limited to 'keyboards') diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index f50378ffa8..1f8466a546 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -26,10 +26,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -124,10 +123,18 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +// #ifndef NO_DEBUG +// # define NO_DEBUG +// #endif /* disable print */ -//#define NO_PRINT +// #ifndef NO_PRINT +// # define NO_PRINT +// #endif + +/* Only print user print statements */ +// #define USER_PRINT + /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/vision_division/keymaps/default/Makefile b/keyboards/vision_division/keymaps/default/Makefile index ecbe7e1ab2..5a930e85ed 100644 --- a/keyboards/vision_division/keymaps/default/Makefile +++ b/keyboards/vision_division/keymaps/default/Makefile @@ -2,19 +2,19 @@ # 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 = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -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 = no # 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. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h index 16740fb15b..efd43f41b4 100644 --- a/keyboards/vision_division/keymaps/default/config.h +++ b/keyboards/vision_division/keymaps/default/config.h @@ -4,25 +4,44 @@ #include "../../config.h" #include "matrix_types.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID GET_PID(NUMERIC_NORMAL, HOMING_MAX_TEENSY) #define DEVICE_VER 0x0001 #define MANUFACTURER IBNobody #define PRODUCT Vision Division #define DESCRIPTION Full / Split Keyboard - -#define MATRIX_ROWS 6 +#define MATRIX_ROWS 6 #define MATRIX_ROW_PINS { C2, C3, F4, F5, F6, F7 } -#define MATRIX_COLS GET_MATRIX_COLS(NUMERIC_NORMAL, HOMING_MAX_TEENSY) -#define MATRIX_COL_PINS GET_MATRIX_COL_PINS(NUMERIC_NORMAL, HOMING_MAX_TEENSY) +// !!! MAKE SURE THAT THE LEFT/RIGHT PCB DEFINES MATCH ON ALL OF THESE COLUMNS -#define UNUSED_PINS +// **LEFT** **RIGHT** +#define PRODUCT_ID GET_PID( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) +#define MATRIX_COLS GET_MATRIX_COLS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) +#define MATRIX_COL_PINS GET_MATRIX_COL_PINS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) -/*#define KEYMAP( \ +#define KEYMAP(MATRIX_LAYER, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ + k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ + k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ + k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ +) \ +KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ + k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, KC_NO, KC_NO, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ + k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ + k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ +) + +// Example Keymap Macros + +/* +#define KEYMAP(MATRIX_LAYER, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ @@ -30,16 +49,18 @@ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ ) \ -KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ +KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ -)*/ +) +*/ -#define KEYMAP( \ +/* +#define KEYMAP(MATRIX_LAYER, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \ @@ -47,7 +68,7 @@ KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \ ) \ -KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ +KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \ @@ -55,5 +76,6 @@ KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, KC_NO, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \ ) +*/ #endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index b8cef9c759..64118abdce 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -8,46 +8,70 @@ #include "song_list.h" #endif -#define LAYER_QWERTY 0 -#define LAYER_COLEMAK 1 -#define LAYER_DVORAK 2 -#define LAYER_UPPER 3 -#define LAYER_LOWER 4 -#define LAYER_FUNCTION 5 -#define LAYER_MOUSE 6 -#define LAYER_ADJUST 7 - -#define MACRO_QWERTY 0 -#define MACRO_COLEMAK 1 -#define MACRO_DVORAK 2 -#define MACRO_UPPER 3 -#define MACRO_LOWER 4 -#define MACRO_FUNCTION 5 -#define MACRO_MOUSE 6 -#define MACRO_TIMBRE_1 7 -#define MACRO_TIMBRE_2 8 -#define MACRO_TIMBRE_3 9 -#define MACRO_TIMBRE_4 10 -#define MACRO_TEMPO_U 11 -#define MACRO_TEMPO_D 12 -#define MACRO_TONE_DEFAULT 13 -#define MACRO_MUSIC_TOGGLE 14 -#define MACRO_AUDIO_TOGGLE 16 -#define MACRO_INC_VOICE 18 -#define MACRO_DEC_VOICE 19 -#define MACRO_BACKLIGHT 20 -#define MACRO_BREATH_TOGGLE 21 -#define MACRO_BREATH_SPEED_INC 23 -#define MACRO_BREATH_SPEED_DEC 24 -#define MACRO_BREATH_DEFAULT 25 +enum keyboard_layers { + LAYER_QWERTY = 0, + LAYER_UPPER, + LAYER_LOWER, + LAYER_FUNCTION, + LAYER_MOUSE, + LAYER_ADJUST, +}; +enum keyboard_macros { + MACRO_QWERTY = 0, + MACRO_UPPER, + MACRO_LOWER, + MACRO_FUNCTION, + MACRO_MOUSE, + MACRO_TIMBRE_1, + MACRO_TIMBRE_2, + MACRO_TIMBRE_3, + MACRO_TIMBRE_4, + MACRO_TEMPO_U, + MACRO_TEMPO_D, + MACRO_TONE_DEFAULT, + MACRO_MUSIC_TOGGLE, + MACRO_AUDIO_TOGGLE, + MACRO_INC_VOICE, + MACRO_DEC_VOICE, + MACRO_BACKLIGHT, + MACRO_BREATH_TOGGLE, + MACRO_BREATH_SPEED_INC, + MACRO_BREATH_SPEED_DEC, + MACRO_BREATH_DEFAULT, + MACRO_MOUSE_MOVE_UL, + MACRO_MOUSE_MOVE_UR, + MACRO_MOUSE_MOVE_DL, + MACRO_MOUSE_MOVE_DR, + MACRO_HELP, + MACRO_HELP_1, + MACRO_HELP_2, + MACRO_HELP_3, + MACRO_HELP_4, + MACRO_HELP_5, + MACRO_HELP_6, + MACRO_HELP_7, + MACRO_HELP_8, + MACRO_HELP_9, + MACRO_HELP_0, + MACRO_GENERAL_1, + MACRO_GENERAL_2, + MACRO_GENERAL_3, + MACRO_GENERAL_4, + MACRO_GENERAL_5, + MACRO_CURSOR_UL, + MACRO_CURSOR_UR, + MACRO_CURSOR_DL, + MACRO_CURSOR_DR, + MACRO_MUTE_APP, + MACRO_COPY_CUT, +}; #define M_QWRTY M(MACRO_QWERTY) -#define M_COLMK M(MACRO_COLEMAK) -#define M_DVORK M(MACRO_DVORAK) #define M_UPPER M(MACRO_UPPER) #define M_LOWER M(MACRO_LOWER) #define M_FUNCT M(MACRO_FUNCTION) #define M_MOUSE M(MACRO_MOUSE) + #define TIMBR_1 M(MACRO_TIMBRE_1) #define TIMBR_2 M(MACRO_TIMBRE_2) #define TIMBR_3 M(MACRO_TIMBRE_3) @@ -55,15 +79,47 @@ #define TMPO_UP M(MACRO_TEMPO_U) #define TMPO_DN M(MACRO_TEMPO_D) #define TMPO_DF M(MACRO_TONE_DEFAULT) + +#define VC_UP M(MACRO_INC_VOICE) +#define VC_DOWN M(MACRO_DEC_VOICE) + #define M_BACKL M(MACRO_BACKLIGHT) #define M_BRTOG M(MACRO_BREATH_TOGGLE) #define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BDFLT M(MACRO_BREATH_DEFAULT) +#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) +#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) +#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) +#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) -#define VC_UP M(MACRO_INC_VOICE) -#define VC_DOWN M(MACRO_DEC_VOICE) +#define M_HELP M(MACRO_HELP) +#define M_HELP1 M(MACRO_HELP_1) +#define M_HELP2 M(MACRO_HELP_2) +#define M_HELP3 M(MACRO_HELP_3) +#define M_HELP4 M(MACRO_HELP_4) +#define M_HELP5 M(MACRO_HELP_5) +#define M_HELP6 M(MACRO_HELP_6) +#define M_HELP7 M(MACRO_HELP_7) +#define M_HELP8 M(MACRO_HELP_8) +#define M_HELP9 M(MACRO_HELP_9) +#define M_HELP0 M(MACRO_HELP_0) + +#define M_M1 M(MACRO_GENERAL_1) +#define M_M2 M(MACRO_GENERAL_2) +#define M_M3 M(MACRO_GENERAL_3) +#define M_M4 M(MACRO_GENERAL_4) +#define M_M5 M(MACRO_GENERAL_5) + +#define M_UL M(MACRO_CURSOR_UL) +#define M_UR M(MACRO_CURSOR_UR) +#define M_DL M(MACRO_CURSOR_DL) +#define M_DR M(MACRO_CURSOR_DR) + +#define M_MUTEA M(MACRO_MUTE_APP) + +#define M_CP_CT M(MACRO_COPY_CUT) #define SC_UNDO LCTL(KC_Z) @@ -77,6 +133,7 @@ #define SC_ACLS LALT(KC_F4) #define SC_CCLS LCTL(KC_F4) +#define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 #define _______ KC_TRNS @@ -84,208 +141,128 @@ #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - -KEYMAP( \ - KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ - KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_CAPS, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX, \ - KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, KC_LCTL, KC_LCTL, XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ -) - - -// [LAYER_QWERTY] = { // QWERTY -// { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, -// { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, -// { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, -// { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - - -// /* Numeric Max / Homing Normal - Traditional -// * .-----------------------------------. .-----------------------------------. .-----------------_-----------------. .-----------------------------------. .--------------------------. -// * | | | | | | | | | | | | | | | | | | | | | | | | -// * '-----------------------------------' '-----------------------------------' '-----------------------------------' '-----------------------------------' '--------------------------' -// * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .--------------------------. -// * | | | | | | ESC | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | | | | | | -// * |--------+--------+--------+--------| | -------+ -------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| -// * | | | | | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | | | | | | -// * |--------+--------+--------+ | o | -------+ -------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| '--------+--------+--------' -// * | | | | | o | CAPS | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | | -// * |--------+--------+--------+--------| o | -------+ -------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---+--------| .--------. -// * | | | | | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX | | | | -// * |--------+--------+--------+ | | -------+ -------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+--------+--------| .--------+--------+--------. -// * | | | | | LCTRL | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | | | | | | -// * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '--------------------------' -// */ - - -// /* QWERTY -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_QWERTY] = { // QWERTY -// { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, -// { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, -// { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, -// { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - -// /* COLEMAK -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_COLEMAK] = { // COLEMAK -// { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, -// { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, -// { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, -// { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - -// /* DVORAK -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | TAB | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | DEL | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAPS | A | O | E | U | I | D | H | T | N | S | - | XXXXXX . ENTER | PG UP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_DVORAK] = { // DVORAK -// { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC }, -// { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL }, -// { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP }, -// { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - -// /* UPPER -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | PRINT | BR TOG | BR SP+ | BR SP- | BR RST | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | | | | | | 0 | | RALT | . | ENTER | | | | | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_UPPER] = { // UPPER -// { KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS }, -// { _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, -// { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME }, -// { _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END }, -// { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ }, -// }, - -// /* LOWER -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | | ^ | * | + | - | / | \ | _ | ' | " | ` | | XXXXXX . | HOME | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | | | | & | ! | ~ | ; | : | = | < | > | ? | XXXXXX . | | END | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | | | | | | | | | | | | | | | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_LOWER] = { // LOWER -// { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, -// { _______, KC_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS }, -// { _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME }, -// { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END }, -// { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, -// }, - -// /* FUNCTION -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | NUM LK | | | | | | | | | | | | | XXXXXX . | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | SCR LK | F13 | F14 | F15 | F16 | | | | | | | | | | | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAP LK | F17 | F18 | F19 | F20 | | | | | | | | XXXXXX . | | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | | F21 | F22 | F23 | F24 | | | | | | | XXXXXX . | VOL UP | MUTE | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | | | | | | PLAY/PAUSE | | | | | | PTRACK | VOL DN | NTRACK | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_FUNCTION] = { // FUNCTION -// { KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, -// { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, -// { KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXX }, -// { _______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_VOLU, KC_MUTE }, -// { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }, -// }, - -// #ifdef MOUSEKEY_ENABLE - -// [LAYER_MOUSE] = { // MOUSE -// { _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, -// { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, -// { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U }, -// { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D }, -// { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, -// }, - -// #endif - -// [LAYER_ADJUST] = { // ADJUST -// { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ }, -// { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, -// { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ }, -// { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ }, -// }, - - -// /* -// [LAYER_EMPTY] = { // LAYER -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ }, -// { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, -// }, -// */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = +{ +/* LAYER = LAYER_QWERTY + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | FN | PRINT | SCR LK | PAUSE | | F1 | F2 | F3 | F4 | XXXXXX | F5 | F6 | F7 | F8 | XXXXXX | F9 | F10 | F11 | F12 | | VOL DN | MUTE | VOL UP | BACKLT | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | M1 | INS | HOME | PG UP | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | NUM LK | KP / | KP * | KP - | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | M2 | DEL | END | PG DN | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | KP 7 | KP 8 | KP 9 | KP + | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | M3 | UL | UP | UR | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | KP 4 | KP 5 | KP 6 | KP + | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | M4 | LEFT | CP/CT | RIGHT | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | KP 1 | KP 2 | KP 3 | KP Ent | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | M5 | DL | DOWN | DR | | LCTRL | XXXXXX | XXXXXX | LWIN | LALT | LOWER | SPACE . SPACE | UPPER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | KP 0 | KP , | KP . | KP Ent | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_QWERTY, \ + M_HELP , KC_PSCR, KC_SLCK, KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_MUTE, KC_VOLU, M_BACKL, \ + M_M1 , KC_INS , KC_HOME, KC_PGUP, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + M_M2 , KC_DEL , KC_END , KC_PGDN, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, \ + M_M3 , M_UL , KC_UP , M_UR , KC_CAPS, KC_BSPC, 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_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, \ + M_M4 , KC_LEFT, M_CP_CT, KC_RGHT, KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, \ + M_M5 , M_DL , KC_DOWN, M_DR , KC_LCTL, XXXXXXX, XXXXXXX, KC_LGUI, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT \ +), +/* LAYER = LAYER_LOWER + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | MUTE A | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ | o | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | XXXXXX | XXXXXX | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | XXXXXX | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_LOWER, \ + _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, M_MUTEA, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ \ +), +/* LAYER = LAYER_UPPER + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | MUTE A | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ | o | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP Ent | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | XXXXXX | XXXXXX | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP Ent | XXXXXX | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_UPPER, \ + _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, M_MUTEA, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, XXXXXXX, _______, _______, _______, _______, _______ \ +), +/* LAYER = LAYER_MOUSE + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | MS BT1 | MS AC0 | MS WHU | MS AC2 | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | MS BT2 | MS WHL | MS WHD | MS WHU | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | MS BT3 | MS UL | MS U | MS UR | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | o | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | MS BT4 | MS L | MS BT1 | MS R | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | MS BT5 | MS DL | MS D | MS DR | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_MOUSE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN1, KC_ACL0, KC_WH_U, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN3, M_MS_UL, KC_MS_U, M_MS_UR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN4, KC_MS_L, KC_BTN1, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN5, M_MS_DL, KC_MS_D, M_MS_DR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +/* LAYER = LAYER_ADJUST + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | HELP 1 | HELP 2 | HELP 3 | HELP 4 | XXXXXX | HELP 5 | HELP 6 | HELP 7 | HELP 8 | XXXXXX | HELP 9 | HELP 0 | XXXXXX | XXXXXX | | VOICE- | AUDIO | VOICE+ | MUSIC | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | o | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_ADJUST, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, XXXXXXX, M_HELP5, M_HELP6, M_HELP7, M_HELP8, XXXXXXX, M_HELP9, M_HELP0, XXXXXXX, XXXXXXX, MUV_DE , AU_TOG , MUV_IN , MU_TOG , \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), }; @@ -313,303 +290,290 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [0] = ACTION_MODS_ONESHOT(MOD_LSFT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) + // MACRODOWN only works in this function + switch(id) + { + + case MACRO_HELP_1: + if (record->event.pressed) + { + uprint("H1"); + } + break; + + case MACRO_HELP_2: + if (record->event.pressed) + { + uprint("H2"); + } + break; + + case MACRO_HELP_3: + if (record->event.pressed) + { + uprint("H3"); + } + break; + + case MACRO_HELP_4: + if (record->event.pressed) + { + uprint("H4"); + } + break; + + case MACRO_HELP_5: + if (record->event.pressed) + { + uprint("H5"); + } + break; + + case MACRO_HELP_6: + if (record->event.pressed) + { + uprint("H6"); + } + break; + + case MACRO_HELP_7: + if (record->event.pressed) + { + uprint("H7"); + } + break; + + case MACRO_HELP_8: + if (record->event.pressed) + { + uprint("H8"); + } + break; + + case MACRO_HELP_9: + if (record->event.pressed) + { + uprint("H9"); + } + break; + + case MACRO_BREATH_TOGGLE: + if (record->event.pressed) + { + breathing_toggle(); + } + break; + + case MACRO_BREATH_SPEED_INC: + if (record->event.pressed) + { + breathing_speed_inc(1); + } + break; + + case MACRO_BREATH_SPEED_DEC: + if (record->event.pressed) + { + breathing_speed_dec(1); + } + break; + + case MACRO_BREATH_DEFAULT: + if (record->event.pressed) + { + breathing_defaults(); + } + break; + + case MACRO_QWERTY: + if (record->event.pressed) + { + persistant_default_layer_set(1UL<event.pressed) { + layer_on(LAYER_UPPER); + breathing_speed_set(2); + breathing_pulse(); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + else + { + layer_off(LAYER_UPPER); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + break; + + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(LAYER_LOWER); + breathing_speed_set(2); + breathing_pulse(); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + else + { + layer_off(LAYER_LOWER); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + break; - // case MACRO_BREATH_TOGGLE: - // if (record->event.pressed) - // { - // breathing_toggle(); - // } - // break; - - // case MACRO_BREATH_SPEED_INC: - // if (record->event.pressed) - // { - // breathing_speed_inc(1); - // } - // break; - - // case MACRO_BREATH_SPEED_DEC: - // if (record->event.pressed) - // { - // breathing_speed_dec(1); - // } - // break; - - // case MACRO_BREATH_DEFAULT: - // if (record->event.pressed) - // { - // breathing_defaults(); - // } - // break; - - case MACRO_QWERTY: - if (record->event.pressed) - { - persistant_default_layer_set(1UL<event.pressed) - { - persistant_default_layer_set(1UL<event.pressed) - { - persistant_default_layer_set(1UL<event.pressed) - { - layer_on(LAYER_UPPER); - // breathing_speed_set(2); - // breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - else - { - layer_off(LAYER_UPPER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - break; - - case MACRO_LOWER: - if (record->event.pressed) - { - layer_on(LAYER_LOWER); - // breathing_speed_set(2); - // breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - else - { - layer_off(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - break; - - case MACRO_FUNCTION: - if (record->event.pressed) - { - // breathing_speed_set(3); - // breathing_enable(); - layer_on(LAYER_FUNCTION); - } - else - { - // breathing_speed_set(1); - // breathing_self_disable(); - layer_off(LAYER_FUNCTION); - } - break; + case MACRO_FUNCTION: + if (record->event.pressed) + { + breathing_speed_set(3); + breathing_enable(); + layer_on(LAYER_FUNCTION); + } + else + { + breathing_speed_set(1); + breathing_self_disable(); + layer_off(LAYER_FUNCTION); + } + break; #ifdef MOUSEKEY_ENABLE - case MACRO_MOUSE: - if (record->event.pressed) - { - layer_invert(LAYER_MOUSE); - } - break; + case MACRO_MOUSE: + if (record->event.pressed) + { + layer_invert(LAYER_MOUSE); + } + break; #endif /* MOUSEKEY_ENABLE */ #ifdef AUDIO_ENABLE - case MACRO_TIMBRE_1: - if (record->event.pressed) set_timbre(TIMBRE_12); - break; - - case MACRO_TIMBRE_2: - if (record->event.pressed) set_timbre(TIMBRE_25); - break; - - case MACRO_TIMBRE_3: - if (record->event.pressed) set_timbre(TIMBRE_50); - break; - - case MACRO_TIMBRE_4: - if (record->event.pressed) set_timbre(TIMBRE_75); - break; - - case MACRO_TEMPO_U: - if (record->event.pressed) increase_tempo(10); - break; - - case MACRO_TEMPO_D: - if (record->event.pressed) decrease_tempo(10); - break; - - case MACRO_TONE_DEFAULT: - if (record->event.pressed) - { - set_timbre(TIMBRE_DEFAULT); - set_tempo(TEMPO_DEFAULT); - } - break; - -/* - case MACRO_AUDIO_TOGGLE: - if (record->event.pressed) - { - if (is_audio_on()) - { - audio_off(); - } - else - { - audio_on(); - PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO); - } - } - break; - - case MACRO_MUSIC_TOGGLE: - if (record->event.pressed) - { - if (IS_LAYER_ON(LAYER_MUSIC)) - { - layer_off(LAYER_MUSIC); - stop_all_notes(); - } - else - { - PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO); - layer_on(LAYER_MUSIC); - } - } - break; - case MACRO_INC_VOICE: - if (record->event.pressed) - { - #ifdef AUDIO_ENABLE - voice_iterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); - #endif - } - break; - - case MACRO_DEC_VOICE: - if (record->event.pressed) - { - #ifdef AUDIO_ENABLE - voice_deiterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); - #endif - } - break; -*/ + case MACRO_TIMBRE_1: + if (record->event.pressed) set_timbre(TIMBRE_12); + break; + + case MACRO_TIMBRE_2: + if (record->event.pressed) set_timbre(TIMBRE_25); + break; + + case MACRO_TIMBRE_3: + if (record->event.pressed) set_timbre(TIMBRE_50); + break; + + case MACRO_TIMBRE_4: + if (record->event.pressed) set_timbre(TIMBRE_75); + break; + + case MACRO_TEMPO_U: + if (record->event.pressed) increase_tempo(10); + break; + + case MACRO_TEMPO_D: + if (record->event.pressed) decrease_tempo(10); + break; + + case MACRO_TONE_DEFAULT: + if (record->event.pressed) + { + set_timbre(TIMBRE_DEFAULT); + set_tempo(TEMPO_DEFAULT); + } + break; #endif /* AUDIO_ENABLE */ #ifdef BACKLIGHT_ENABLE - case MACRO_BACKLIGHT: - if (record->event.pressed) - { - backlight_step(); - } -#endif + case MACRO_BACKLIGHT: + if (record->event.pressed) + { + backlight_step(); + } + break; +#endif /* BACKLIGHT_ENABLE */ - default: - break; + default: + break; - } - return MACRO_NONE; +} +return MACRO_NONE; }; - #ifdef AUDIO_ENABLE void matrix_init_user(void) { - set_voice(default_voice); - startup_user(); - println("Matrix Init"); + set_voice(default_voice); + startup_user(); + println("Matrix Init"); } void led_set_user(uint8_t usb_led) { - static uint8_t old_usb_led = 0; + static uint8_t old_usb_led = 0; - _delay_ms(10); // gets rid of tick + _delay_ms(10); // gets rid of tick - if (!is_playing_notes()) + if (!is_playing_notes()) + { + if ((usb_led & (1< Date: Tue, 6 Sep 2016 22:09:40 +0100 Subject: added a toggle between Mac and Windows base layers (with swapped cmd and ctrl) --- keyboards/planck/keymaps/callum/keymap.c | 59 ++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 11 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 6c34311339..b47f8eb05e 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -11,13 +11,15 @@ extern keymap_config_t keymap_config; // 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 _BASE 0 -#define _MOVE 1 -#define _SYMB 2 -#define _FUNC 3 +#define _MAC 0 +#define _WIN 1 +#define _MOVE 2 +#define _SYMB 3 +#define _FUNC 4 enum planck_keycodes { - BASE = SAFE_RANGE, + MAC = SAFE_RANGE, + WIN, MOVE, SYMB, FUNC, @@ -30,7 +32,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE +/* BASE Mac * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -41,13 +43,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | * `-----------------------------------------------------------------------------------' */ -[_BASE] = { +[_MAC] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} }, +/* BASE Windows + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Bksp | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | Ctrl | Alt | GUI |Caps | + * `-----------------------------------------------------------------------------------' + */ +[_WIN] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, + {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_RALT, KC_RGUI, KC_CAPS} +}, + /* MOVE * ,-----------------------------------------------------------------------------------. * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | @@ -88,24 +108,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |-----------------------------------------------------------------------------------. - * | | Play | Prev | Next | BL+ | | | Lock | | | | | + * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | | | | | | + * | | Mute | Vol- | Vol+ | BL- | | | | | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | |Reset | * `-----------------------------------------------------------------------------------' */ [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, WIN, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } }; +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 MAC: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_MAC); + } + return false; + break; + case WIN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_WIN); + } + return false; + break; case MOVE: if (record->event.pressed) { layer_on(_MOVE); -- cgit v1.2.3 From b51f51c614e2bcd64202811510719f25345cb1ce Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:19:11 +0100 Subject: added close key for alt-f4 macro --- keyboards/planck/keymaps/callum/keymap.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index b47f8eb05e..56808aa8ca 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -23,7 +23,8 @@ enum planck_keycodes { MOVE, SYMB, FUNC, - LOCK + LOCK, + CLOSE }; // Fillers to make layering more clear @@ -110,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------. * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | | | | Win | | + * | | Mute | Vol- | Vol+ | BL- | | |Close | | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | |Reset | * `-----------------------------------------------------------------------------------' @@ -118,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, WIN, _______}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, CLOSE, _______, _______, WIN, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } @@ -183,6 +184,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case CLOSE: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_F4); + } else { + unregister_code(KC_F4); + unregister_code(KC_LALT); + } + return false; + break; } return true; } -- cgit v1.2.3 From 6ad8a06c734caa378296d0cfe335feda7457ed61 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:47:11 +0100 Subject: updated readme --- keyboards/planck/keymaps/callum/keymap.c | 30 ++++++------ keyboards/planck/keymaps/callum/readme.md | 81 ++++++++++++++++++++++++++----- 2 files changed, 83 insertions(+), 28 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 56808aa8ca..f5a816f4ee 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -39,9 +39,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | + * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | * `-----------------------------------------------------------------------------------' */ [_MAC] = { @@ -57,9 +57,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | Ctrl | Alt | GUI |Caps | + * | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | * `-----------------------------------------------------------------------------------' */ [_WIN] = { @@ -71,11 +71,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | | Left | Down |Right | | | Left | Down |Right | | Del | + * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | |Pg Up |Pg Dn | | |Pg Dn |Pg Up | | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -89,9 +89,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SYMB * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | - * |-----------------------------------------------------------------------------------. - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + * |-----------------------------------------------------------------------------------| + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -107,13 +107,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNC * ,-----------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | - * |-----------------------------------------------------------------------------------. - * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |-----------------------------------------------------------------------------------| + * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | |Close | | | Win | | + * | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | |Reset | + * | | | | | | | | | | | | Reset| * `-----------------------------------------------------------------------------------' */ [_FUNC] = { diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index b70de3f1e2..8125907655 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -6,38 +6,93 @@ This is a layout for the grid planck, built with a few ideals in mind: - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. - Backspace should be in the “capslock position” in the colemak tradition. +- The keyboard should be usable on any operating system without software changes. For me this means being able to swap the `GUI` key and `Ctrl` key in firmware so that `Cmd-z,x,c,v,…` becomes `Ctrl-z,x,c,v,…` when swapping from macOS to Windows. -We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. +We have four layers. A `BASE` layer (which is either `BASE Mac` or `BASE Windows`), in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. ## The `BASE` layer -![](http://i.imgur.com/tVNI3SE.png) - -This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. - -The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. +For Mac +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Bksp | A | R | S | T | D | H | N | E | I | O | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | +`-----------------------------------------------------------------------------------' +``` + +For Windows +``` + ,-----------------------------------------------------------------------------------. +| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | +|------+------+------+------+-------+-------------+------+------+------+------+------| +| Bksp | A | R | S | T | D | H | N | E | I | O | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | +`-----------------------------------------------------------------------------------' +``` + +One of the two above layers is set as the default layer at any one time; see `FUNC`. The basic layout is [colemak](https://colemak.com). `Esc` and `Del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `Caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `Enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. + +The `MOVE` and `SYMB` layers are reached by holding down the `Move` and `Symb` keys respectively. The `FUNC` layer is reached by holding down both the `Move` and `Symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. ## The `MOVE` layer -![](http://i.imgur.com/KXRSuHT.png) +``` +,-----------------------------------------------------------------------------------. +| Esc | | Home | Up | End | | | Home | Up | End | | Esc | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | | Left | Down | Right| | | Left | Down | Right| | Del | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if it’s needed. -On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `home` and `end` jump you to the beginning and end of the line respectively and so that `pg up` and `pg dn` move the cursor instead of just scrolling. +On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `Home` and `End` jump you to the beginning and end of the line respectively and so that `Pg Up` and `Pg Dn` move the cursor instead of just scrolling. None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. ## The `SYMB` layer -![](http://i.imgur.com/thh1ne2.png) +``` +,-----------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | +|-----------------------------------------------------------------------------------| +| Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | ~ | ` | + | = | | | \ | [ | ] | { | } | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. -`esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand. +`Esc` and `Del` are repeated here since I wanted to be able to reach either, one handed, with either hand. Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected. ## The `FUNC` layer -![](http://i.imgur.com/1VKFBBU.png) - -The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) +``` +,-----------------------------------------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|-----------------------------------------------------------------------------------| +| | Play | Prev | Next | BL+ | | | Lock | | | Mac | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | Reset| +`-----------------------------------------------------------------------------------' +``` + +`BL+` and `BL-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. `Lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) `Close` sends `alt-f4` to make that shortcut easier to reach. `Mac` and `Win` set the default layer to the Mac and Windows `BASE` layers respecitevly. ## Other changes from the default I have LEDs and sound disabled, simply because I have no need of them. -- cgit v1.2.3 From ff09695897c4bdd705347e6427077e406413c26d Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:52:55 +0100 Subject: Update readme.md --- keyboards/planck/keymaps/callum/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 8125907655..2e59c00d6d 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -26,9 +26,9 @@ For Mac For Windows ``` - ,-----------------------------------------------------------------------------------. +,-----------------------------------------------------------------------------------. | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+-------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Bksp | A | R | S | T | D | H | N | E | I | O | " | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| -- cgit v1.2.3 From c593564acab7a0b1cca2c90bd0b1ffd9def59f05 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:55:27 +0100 Subject: Update readme.md --- keyboards/planck/keymaps/callum/readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 2e59c00d6d..7a771130ab 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -15,9 +15,9 @@ For Mac ``` ,-----------------------------------------------------------------------------------. | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| |------+------+------+------+------+------+------+------+------+------+------+------| | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | @@ -30,7 +30,7 @@ For Windows | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | |------+------+------+------+------+------+------+------+------+------+------+------| | Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| |------+------+------+------+------+------+------+------+------+------+------+------| | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | @@ -45,9 +45,9 @@ The `MOVE` and `SYMB` layers are reached by holding down the `Move` and `Symb` k ``` ,-----------------------------------------------------------------------------------. | Esc | | Home | Up | End | | | Home | Up | End | | Esc | -|------+------+------+------+------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Del | | Left | Down | Right| | | Left | Down | Right| | Del | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | | @@ -64,9 +64,9 @@ None of the modifiers are overwritten so that `shift-alt-arrows` etc work as exp ``` ,-----------------------------------------------------------------------------------. | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | -|-----------------------------------------------------------------------------------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | ~ | ` | + | = | | | \ | [ | ] | { | } | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | | @@ -83,9 +83,9 @@ Again none of the modifiers are overwritten so that shortcuts involving numbers ``` ,-----------------------------------------------------------------------------------. | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|-----------------------------------------------------------------------------------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | Reset| -- cgit v1.2.3 From b2ecd296ae0dc366717fae8a6abb25c0639d6a43 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:59:36 +0100 Subject: fixed comments --- keyboards/planck/keymaps/callum/keymap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index f5a816f4ee..751af9eb9f 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -36,9 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE Mac * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | @@ -54,9 +54,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE Windows * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | @@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | @@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SYMB * ,-----------------------------------------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | - * |-----------------------------------------------------------------------------------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | @@ -108,9 +108,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNC * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | - * |-----------------------------------------------------------------------------------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | Reset| -- cgit v1.2.3 From 02635e5924ea5f3b1e970e115407f62c916c4476 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 7 Sep 2016 20:45:23 +0100 Subject: changed RALT to LALT on Windows --- keyboards/planck/keymaps/callum/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 751af9eb9f..5754b17721 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_RALT, KC_RGUI, KC_CAPS} + {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_LALT, KC_RGUI, KC_CAPS} }, /* MOVE -- cgit v1.2.3 From fa2724360b831fffd3745bfe7b3ef50910b9132b Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 28 Sep 2016 08:04:38 +0100 Subject: removed windows layer and updated brightness keys for macOS Sierra --- keyboards/planck/keymaps/callum/keymap.c | 90 +++++--------------------------- 1 file changed, 14 insertions(+), 76 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 5754b17721..0ac1906bac 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -11,20 +11,15 @@ extern keymap_config_t keymap_config; // 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 _MAC 0 -#define _WIN 1 -#define _MOVE 2 -#define _SYMB 3 -#define _FUNC 4 +#define _BASE 0 +#define _MOVE 1 +#define _SYMB 2 +#define _FUNC 3 enum planck_keycodes { - MAC = SAFE_RANGE, - WIN, MOVE, SYMB, - FUNC, - LOCK, - CLOSE + FUNC }; // Fillers to make layering more clear @@ -33,7 +28,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE Mac +/* BASE * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -44,31 +39,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | * `-----------------------------------------------------------------------------------' */ -[_MAC] = { +[_BASE] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} }, -/* BASE Windows - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | - * `-----------------------------------------------------------------------------------' - */ -[_WIN] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_LALT, KC_RGUI, KC_CAPS} -}, - /* MOVE * ,-----------------------------------------------------------------------------------. * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | @@ -81,9 +58,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, _______, KC_HOME, KC_UP, KC_END, _______, _______, KC_HOME, KC_UP, KC_END, _______, KC_ESC}, - {KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL}, - {_______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______}, + {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC}, + {KC_DEL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_DEL}, + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -109,41 +86,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | + * | | Play | Prev | Next | BL+ | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | + * | | Mute | Vol- | Vol+ | BL- | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | Reset| * `-----------------------------------------------------------------------------------' */ [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, CLOSE, _______, _______, WIN, _______}, + {XXXXXXX, KC_MPLY, KC_MPRV, KC_MNXT, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } }; -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 MAC: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_MAC); - } - return false; - break; - case WIN: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_WIN); - } - return false; - break; case MOVE: if (record->event.pressed) { layer_on(_MOVE); @@ -172,28 +132,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case LOCK: - if (record->event.pressed) { - register_code(KC_RSFT); - register_code(KC_RCTL); - register_code(KC_POWER); - } else { - unregister_code(KC_POWER); - unregister_code(KC_RCTL); - unregister_code(KC_RSFT); - } - return false; - break; - case CLOSE: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_F4); - } else { - unregister_code(KC_F4); - unregister_code(KC_LALT); - } - return false; - break; } return true; } -- cgit v1.2.3 From c762ea975a4c66da484b4cd4879e41c1457d854a Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 28 Sep 2016 23:15:35 +0100 Subject: big restructure now I only have to consider macOS, also added mouse, more function keys, and some neat macros --- keyboards/planck/keymaps/callum/keymap.c | 139 ++++++++++++++++++++++++++----- 1 file changed, 116 insertions(+), 23 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 0ac1906bac..38c362fcbe 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,12 +14,19 @@ extern keymap_config_t keymap_config; #define _BASE 0 #define _MOVE 1 #define _SYMB 2 -#define _FUNC 3 +#define _MOUSE 3 +#define _FUNC 4 enum planck_keycodes { - MOVE, + MOVE = SAFE_RANGE, SYMB, - FUNC + FUNC, + CMDLEFT, + CMDRGHT, + BELOW, + ABOVE, + VOLUP, + VOLDN }; // Fillers to make layering more clear @@ -36,14 +43,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | + * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func | * `-----------------------------------------------------------------------------------' */ [_BASE] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} + {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, FUNC } }, /* MOVE @@ -52,16 +59,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | | | | Below| | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC}, - {KC_DEL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_DEL}, - {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, + {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} }, /* SYMB @@ -82,22 +89,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, +/* MOUSE + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = { + {XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, XXXXXXX, XXXXXXX, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + /* FUNC * ,-----------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Play | Prev | Next | BL+ | | | | | | | | + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | | | | | | + * | | F21 | F22 | F23 | F24 | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | Reset| + * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ [_FUNC] = { - {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {XXXXXXX, KC_MPLY, KC_MPRV, KC_MNXT, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } + {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP }, + {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN }, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } }; @@ -107,20 +132,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case MOVE: if (record->event.pressed) { layer_on(_MOVE); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } else { layer_off(_MOVE); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } return false; break; case SYMB: if (record->event.pressed) { layer_on(_SYMB); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } else { layer_off(_SYMB); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } return false; break; @@ -132,6 +157,74 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case CMDLEFT: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_LEFT); + } else { + unregister_code(KC_LEFT); + unregister_code(KC_LGUI); + } + return false; + break; + case CMDRGHT: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_RGHT); + } else { + unregister_code(KC_RGHT); + unregister_code(KC_LGUI); + } + return false; + break; + case BELOW: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_RGHT); + unregister_code(KC_RGHT); + unregister_code(KC_LGUI); + register_code(KC_ENT); + unregister_code(KC_ENT); + } + return false; + break; + case ABOVE: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_LEFT); + unregister_code(KC_LEFT); + unregister_code(KC_LGUI); + register_code(KC_ENT); + unregister_code(KC_ENT); + register_code(KC_UP); + unregister_code(KC_UP); + } + return false; + break; + case VOLUP: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_LSFT); + register_code(KC_VOLU); + } else { + unregister_code(KC_VOLU); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + } + return false; + break; + case VOLDN: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_LSFT); + register_code(KC_VOLD); + } else { + unregister_code(KC_VOLD); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + } + return false; + break; } return true; } -- cgit v1.2.3 From 2f07ad8e8a3e69eb90488bcac0540fd81448e3d0 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 29 Sep 2016 07:47:30 +0100 Subject: added en-dash and gbp keys and updated readme --- keyboards/planck/keymaps/callum/keymap.c | 38 ++++++-- keyboards/planck/keymaps/callum/readme.md | 149 ++++++++++++------------------ 2 files changed, 91 insertions(+), 96 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 38c362fcbe..82ba83f4e4 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -25,6 +25,8 @@ enum planck_keycodes { CMDRGHT, BELOW, ABOVE, + DASH, + GBP, VOLUP, VOLDN }; @@ -55,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -73,9 +75,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SYMB * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -83,19 +85,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC }, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH }, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP }, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* MOUSE * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | | | | | | SW-D | SW-U | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -201,6 +203,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DASH: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_MINS); + } else { + unregister_code(KC_MINS); + unregister_code(KC_LALT); + } + return false; + break; + case GBP: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_3); + } else { + unregister_code(KC_3); + unregister_code(KC_LALT); + } + return false; + break; case VOLUP: if (record->event.pressed) { register_code(KC_LALT); diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 7a771130ab..b5997cd5ae 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,97 +2,70 @@ This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. +- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -- Backspace should be in the “capslock position” in the colemak tradition. -- The keyboard should be usable on any operating system without software changes. For me this means being able to swap the `GUI` key and `Ctrl` key in firmware so that `Cmd-z,x,c,v,…` becomes `Ctrl-z,x,c,v,…` when swapping from macOS to Windows. -We have four layers. A `BASE` layer (which is either `BASE Mac` or `BASE Windows`), in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. -## The `BASE` layer -For Mac ``` -,-----------------------------------------------------------------------------------. -| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | -`-----------------------------------------------------------------------------------' +/* BASE + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func | + * `-----------------------------------------------------------------------------------' + */ + +/* MOVE + * ,-----------------------------------------------------------------------------------. + * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Below| | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +/* SYMB + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +/* MOUSE + * ,-----------------------------------------------------------------------------------. + * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | SW-D | SW-U | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +/* FUNC + * ,-----------------------------------------------------------------------------------. + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F21 | F22 | F23 | F24 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Prev | Mute | Play | Next | | | | | + * `-----------------------------------------------------------------------------------' + */ ``` - -For Windows -``` -,-----------------------------------------------------------------------------------. -| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | -`-----------------------------------------------------------------------------------' -``` - -One of the two above layers is set as the default layer at any one time; see `FUNC`. The basic layout is [colemak](https://colemak.com). `Esc` and `Del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `Caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `Enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. - -The `MOVE` and `SYMB` layers are reached by holding down the `Move` and `Symb` keys respectively. The `FUNC` layer is reached by holding down both the `Move` and `Symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. - -## The `MOVE` layer -``` -,-----------------------------------------------------------------------------------. -| Esc | | Home | Up | End | | | Home | Up | End | | Esc | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Del | | Left | Down | Right| | | Left | Down | Right| | Del | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------' -``` - -This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if it’s needed. - -On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `Home` and `End` jump you to the beginning and end of the line respectively and so that `Pg Up` and `Pg Dn` move the cursor instead of just scrolling. - -None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. - -## The `SYMB` layer -``` -,-----------------------------------------------------------------------------------. -| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | ~ | ` | + | = | | | \ | [ | ] | { | } | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------' -``` - -The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. - -`Esc` and `Del` are repeated here since I wanted to be able to reach either, one handed, with either hand. - -Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected. - -## The `FUNC` layer -``` -,-----------------------------------------------------------------------------------. -| F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | Play | Prev | Next | BL+ | | | Lock | | | Mac | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | Reset| -`-----------------------------------------------------------------------------------' -``` - -`BL+` and `BL-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. `Lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) `Close` sends `alt-f4` to make that shortcut easier to reach. `Mac` and `Win` set the default layer to the Mac and Windows `BASE` layers respecitevly. - -## Other changes from the default -I have LEDs and sound disabled, simply because I have no need of them. -- cgit v1.2.3 From 633da3bdb661a6da43ffd4e936736927e6d1ebda Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Sat, 1 Oct 2016 13:03:46 +0100 Subject: Made some simplifications leveraging the LALT(), LGUI(), and S() functions. --- keyboards/planck/keymaps/callum/keymap.c | 82 +++----------------------------- 1 file changed, 6 insertions(+), 76 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 82ba83f4e4..411523125d 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -21,14 +21,8 @@ enum planck_keycodes { MOVE = SAFE_RANGE, SYMB, FUNC, - CMDLEFT, - CMDRGHT, BELOW, - ABOVE, - DASH, - GBP, - VOLUP, - VOLDN + ABOVE }; // Fillers to make layering more clear @@ -67,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} @@ -85,8 +79,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH }, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP }, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -121,8 +115,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = { - {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP }, - {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN }, + {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(LALT(KC_VOLU))}, + {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(LALT(KC_VOLD))}, {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } @@ -159,26 +153,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case CMDLEFT: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_LEFT); - } else { - unregister_code(KC_LEFT); - unregister_code(KC_LGUI); - } - return false; - break; - case CMDRGHT: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_RGHT); - } else { - unregister_code(KC_RGHT); - unregister_code(KC_LGUI); - } - return false; - break; case BELOW: if (record->event.pressed) { register_code(KC_LGUI); @@ -203,50 +177,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case DASH: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_MINS); - } else { - unregister_code(KC_MINS); - unregister_code(KC_LALT); - } - return false; - break; - case GBP: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_3); - } else { - unregister_code(KC_3); - unregister_code(KC_LALT); - } - return false; - break; - case VOLUP: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_LSFT); - register_code(KC_VOLU); - } else { - unregister_code(KC_VOLU); - unregister_code(KC_LSFT); - unregister_code(KC_LALT); - } - return false; - break; - case VOLDN: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_LSFT); - register_code(KC_VOLD); - } else { - unregister_code(KC_VOLD); - unregister_code(KC_LSFT); - unregister_code(KC_LALT); - } - return false; - break; } return true; } -- cgit v1.2.3 From 8747c0786e7b583529d4033ea90aa91e49ae3a51 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 1 Oct 2016 18:28:33 +0200 Subject: - Updated dbroqua layout for HHKB keyboard --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 48 ++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c index ef43aae281..869e16d496 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -5,6 +5,7 @@ #define BASE 0 #define FN 1 +#define MOUSE 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE Level: Default Layer @@ -15,37 +16,58 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Left |Right| + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | * +-----------------------------------------------------------------------------------------+ - * | Gui | Alt | Space | AltGr | fn | + * | Gui | Alt | Space | AltGr | Menu| * `----------------------------------------------------------------´ */ [BASE] = KEYMAP( 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_BSLS, 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_BSPC, \ KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LEFT, KC_RGHT, \ - KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(FN) + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \ + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE) ), - /* BASE Level: Default Layer + /* FN Layer * ,-----------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| * |-----------------------------------------------------------------------------------------+ - * | Caps | | | | | | | | | | | Up | | | + * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | * |-----------------------------------------------------------------------------------------+ - * | | Vol-| Vol+| Mute| | | |PrtSc| Home| PgUp| Left |Right| | + * | | Vol-| Vol+| Mute| | | | | Home| PgUp| Left |Right| | * |-----------------------------------------------------------------------------------------+ - * | | Prev| Play| Next| | | | | End |PgDwn| Down| Up | Down| + * | | Prev| Play| Next| | | | | End |PgDwn| Down| | | * +-----------------------------------------------------------------------------------------+ * | | | | | | * `----------------------------------------------------------------´ */ [FN] = KEYMAP( - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_UP, KC_DOWN, \ + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + /* MOUSE Layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | WUp | | | | | | | | Btn1| Up | Btn2| | + * |-----------------------------------------------------------------------------------------+ + * | | WLt | WDn | WRt | | | | | | | Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | Btn3| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | | | | + * `----------------------------------------------------------------´ + */ + [MOUSE] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \ + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; -- cgit v1.2.3 From 6a090c5df7e52df084de975f070841af1138b5a4 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 1 Oct 2016 19:04:11 +0200 Subject: - Fixed key name in default layer definition --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c index 869e16d496..4e907acd87 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | * +-----------------------------------------------------------------------------------------+ - * | Gui | Alt | Space | AltGr | Menu| + * | Gui | Alt | Space | AltGr |Mouse| * `----------------------------------------------------------------´ */ [BASE] = KEYMAP( -- cgit v1.2.3 From a10e100bd5e8bad73e1b04f54639a4cec36e4b9e Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 2 Oct 2016 09:55:38 +0200 Subject: Add double arrow Unicode characters to FMU layer --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index 0eedecf3dd..238971e81e 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤ * │ │ ├ │ ┼ │ ┤ │ ✓ │ ✕ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │ * ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤ - * │ │ └ │ ┴ │ ┘ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ + * │ │ └ │ ┴ │ ┘ │ ↔ │ ⇔ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ * └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘ * │ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │ * └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘ @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS, KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715), - KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),UC(0x2194),UC(0x21D4),KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_MS_L, KC_MS_U, KC_BTN1, -- cgit v1.2.3 From c0c0c579ff00e8f11cbe201402d3e322090e1975 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 08:53:09 +0000 Subject: added gamenum handwired keyboard --- keyboards/gamenum/Makefile | 73 +++++++++++++ keyboards/gamenum/README.md | 92 ++++++++++++++++ keyboards/gamenum/config.h | 162 +++++++++++++++++++++++++++++ keyboards/gamenum/gamenum.c | 14 +++ keyboards/gamenum/gamenum.h | 21 ++++ keyboards/gamenum/keymaps/default/keymap.c | 68 ++++++++++++ 6 files changed, 430 insertions(+) create mode 100644 keyboards/gamenum/Makefile create mode 100644 keyboards/gamenum/README.md create mode 100644 keyboards/gamenum/config.h create mode 100644 keyboards/gamenum/gamenum.c create mode 100644 keyboards/gamenum/gamenum.h create mode 100644 keyboards/gamenum/keymaps/default/keymap.c (limited to 'keyboards') diff --git a/keyboards/gamenum/Makefile b/keyboards/gamenum/Makefile new file mode 100644 index 0000000000..afb9372e18 --- /dev/null +++ b/keyboards/gamenum/Makefile @@ -0,0 +1,73 @@ + +# MCU name +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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/gamenum/README.md b/keyboards/gamenum/README.md new file mode 100644 index 0000000000..b1839b9efa --- /dev/null +++ b/keyboards/gamenum/README.md @@ -0,0 +1,92 @@ +GameNum firmware +====================== +## Board overview + +The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. +The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. +The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. + +The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. + +## Build conciderations + +Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. +Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. +The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. ++ of the LED goes to the respective pins and can be joined together on the - into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. + +Schematic of the build is coming soon. + +## Adding more layers + +Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. + +Next thing to do is to add the actual layer for the keymap. + +``` +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +) +``` + +This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: +In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! + +Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. +The number that is at the end of the keycode corresponds with the code in the function. +`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. + +Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. +Look for this piece of code: + +``` + DDRD |= (1<<4); + PORTD &= ~(1<<4); +``` + +Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes low + PORTD |= (1<<4); //PD4 goes high + } + break; +``` + +This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. +Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. +Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/gamenum/config.h b/keyboards/gamenum/config.h new file mode 100644 index 0000000000..6af876ab79 --- /dev/null +++ b/keyboards/gamenum/config.h @@ -0,0 +1,162 @@ +/* +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 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Seth-Senpai +#define PRODUCT GameNum +#define DESCRIPTION Numpad with gamelayers + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN C6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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/gamenum/gamenum.c b/keyboards/gamenum/gamenum.c new file mode 100644 index 0000000000..8048194bbc --- /dev/null +++ b/keyboards/gamenum/gamenum.c @@ -0,0 +1,14 @@ +#include "gamenum.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + DDRC |= (1<<6); + PORTC &= ~(1<<6); + + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + matrix_init_user(); + +} diff --git a/keyboards/gamenum/gamenum.h b/keyboards/gamenum/gamenum.h new file mode 100644 index 0000000000..ea633b9bfa --- /dev/null +++ b/keyboards/gamenum/gamenum.h @@ -0,0 +1,21 @@ +#ifndef GAMENUM_H +#define GAMENUM_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) \ +{ \ + { k00, k01, k02, k03}, \ + { k10, k11, k12, k13}, \ + { k20, k21, k22, KC_NO}, \ + { k30, k31, k32, KC_NO}, \ + { KC_NO, k41, k42, k43} \ +} + +#endif diff --git a/keyboards/gamenum/keymaps/default/keymap.c b/keyboards/gamenum/keymaps/default/keymap.c new file mode 100644 index 0000000000..6950b741a3 --- /dev/null +++ b/keyboards/gamenum/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include "gamenum.h" +#include "action_layer.h" +#include "eeconfig.h" + + +#define _______ KC_TRNS + +#define DEF 0 +#define HDN 1 +#define OSY 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +), +[HDN] = KEYMAP( + KC_FN1, KC_1, KC_2, KC_3, \ + KC_Q, KC_W, KC_E, KC_R, \ + KC_A, KC_S, KC_D, \ + KC_Z, KC_X, KC_C, \ + KC_LSFT, KC_LALT, KC_SPC \ +), +[OSY] = KEYMAP( + KC_A, KC_Q, KC_1, KC_FN2, \ + KC_S, KC_W, KC_2, KC_LALT, \ + KC_D, KC_E, KC_3, \ + KC_F, KC_R, KC_4, \ + KC_SPC, KC_T, KC_TAB \ +) +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_SET(HDN, ON_PRESS), + [1] = ACTION_LAYER_SET(OSY, ON_PRESS), + [2] = ACTION_LAYER_SET(DEF, ON_PRESS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_FN0: + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + break; + case KC_FN1: + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + break; + case KC_FN2: + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3 From 468e8552072971c773ec166844d179089c544dc5 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 08:59:50 +0000 Subject: moved folder, update readme --- keyboards/gamenum/Makefile | 73 ---------- keyboards/gamenum/README.md | 92 ------------ keyboards/gamenum/config.h | 162 --------------------- keyboards/gamenum/gamenum.c | 14 -- keyboards/gamenum/gamenum.h | 21 --- keyboards/gamenum/keymaps/default/keymap.c | 68 --------- keyboards/handwired/gamenum/Makefile | 73 ++++++++++ keyboards/handwired/gamenum/README.md | 92 ++++++++++++ keyboards/handwired/gamenum/config.h | 162 +++++++++++++++++++++ keyboards/handwired/gamenum/gamenum.c | 14 ++ keyboards/handwired/gamenum/gamenum.h | 21 +++ .../handwired/gamenum/keymaps/default/keymap.c | 68 +++++++++ 12 files changed, 430 insertions(+), 430 deletions(-) delete mode 100644 keyboards/gamenum/Makefile delete mode 100644 keyboards/gamenum/README.md delete mode 100644 keyboards/gamenum/config.h delete mode 100644 keyboards/gamenum/gamenum.c delete mode 100644 keyboards/gamenum/gamenum.h delete mode 100644 keyboards/gamenum/keymaps/default/keymap.c create mode 100644 keyboards/handwired/gamenum/Makefile create mode 100644 keyboards/handwired/gamenum/README.md create mode 100644 keyboards/handwired/gamenum/config.h create mode 100644 keyboards/handwired/gamenum/gamenum.c create mode 100644 keyboards/handwired/gamenum/gamenum.h create mode 100644 keyboards/handwired/gamenum/keymaps/default/keymap.c (limited to 'keyboards') diff --git a/keyboards/gamenum/Makefile b/keyboards/gamenum/Makefile deleted file mode 100644 index afb9372e18..0000000000 --- a/keyboards/gamenum/Makefile +++ /dev/null @@ -1,73 +0,0 @@ - -# MCU name -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=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../Makefile -endif - - diff --git a/keyboards/gamenum/README.md b/keyboards/gamenum/README.md deleted file mode 100644 index b1839b9efa..0000000000 --- a/keyboards/gamenum/README.md +++ /dev/null @@ -1,92 +0,0 @@ -GameNum firmware -====================== -## Board overview - -The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. -It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. -The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. -The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. - -The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. - -## Build conciderations - -Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. -Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. -The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. -+ of the LED goes to the respective pins and can be joined together on the - into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. - -Schematic of the build is coming soon. - -## Adding more layers - -Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. -Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. - -Next thing to do is to add the actual layer for the keymap. - -``` -[DEF] = KEYMAP( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ - KC_7, KC_8, KC_9, KC_PLUS, \ - KC_4, KC_5, KC_6, \ - KC_1, KC_2, KC_3, \ - KC_0, KC_DOT, KC_ENT \ -) -``` - -This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: -In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! - -Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. -The number that is at the end of the keycode corresponds with the code in the function. -`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. - -Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. -Look for this piece of code: - -``` - DDRD |= (1<<4); - PORTD &= ~(1<<4); -``` - -Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes low - PORTD |= (1<<4); //PD4 goes high - } - break; -``` - -This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. - - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. -Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. -Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. -Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. - -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/gamenum/config.h b/keyboards/gamenum/config.h deleted file mode 100644 index 6af876ab79..0000000000 --- a/keyboards/gamenum/config.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -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 0x1234 -#define PRODUCT_ID 0x5678 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Seth-Senpai -#define PRODUCT GameNum -#define DESCRIPTION Numpad with gamelayers - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 4 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } -#define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -// #define BACKLIGHT_PIN C6 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * 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/gamenum/gamenum.c b/keyboards/gamenum/gamenum.c deleted file mode 100644 index 8048194bbc..0000000000 --- a/keyboards/gamenum/gamenum.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "gamenum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - DDRC |= (1<<6); - PORTC &= ~(1<<6); - - DDRD |= (1<<4); - PORTD &= ~(1<<4); - - matrix_init_user(); - -} diff --git a/keyboards/gamenum/gamenum.h b/keyboards/gamenum/gamenum.h deleted file mode 100644 index ea633b9bfa..0000000000 --- a/keyboards/gamenum/gamenum.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef GAMENUM_H -#define GAMENUM_H - -#include "quantum.h" - -#define KEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, \ - k41, k42, k43 \ -) \ -{ \ - { k00, k01, k02, k03}, \ - { k10, k11, k12, k13}, \ - { k20, k21, k22, KC_NO}, \ - { k30, k31, k32, KC_NO}, \ - { KC_NO, k41, k42, k43} \ -} - -#endif diff --git a/keyboards/gamenum/keymaps/default/keymap.c b/keyboards/gamenum/keymaps/default/keymap.c deleted file mode 100644 index 6950b741a3..0000000000 --- a/keyboards/gamenum/keymaps/default/keymap.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "gamenum.h" -#include "action_layer.h" -#include "eeconfig.h" - - -#define _______ KC_TRNS - -#define DEF 0 -#define HDN 1 -#define OSY 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DEF] = KEYMAP( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ - KC_7, KC_8, KC_9, KC_PLUS, \ - KC_4, KC_5, KC_6, \ - KC_1, KC_2, KC_3, \ - KC_0, KC_DOT, KC_ENT \ -), -[HDN] = KEYMAP( - KC_FN1, KC_1, KC_2, KC_3, \ - KC_Q, KC_W, KC_E, KC_R, \ - KC_A, KC_S, KC_D, \ - KC_Z, KC_X, KC_C, \ - KC_LSFT, KC_LALT, KC_SPC \ -), -[OSY] = KEYMAP( - KC_A, KC_Q, KC_1, KC_FN2, \ - KC_S, KC_W, KC_2, KC_LALT, \ - KC_D, KC_E, KC_3, \ - KC_F, KC_R, KC_4, \ - KC_SPC, KC_T, KC_TAB \ -) -}; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_SET(HDN, ON_PRESS), - [1] = ACTION_LAYER_SET(OSY, ON_PRESS), - [2] = ACTION_LAYER_SET(DEF, ON_PRESS), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; - - -bool process_record_user (uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case KC_FN0: - if (record->event.pressed) { - PORTC |= (1 << 6); // PC6 goes high - } - break; - case KC_FN1: - if (record->event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes high - PORTD |= (1<<4); - } - break; - case KC_FN2: - if (record->event.pressed) { - PORTD &= ~(1 << 4); // PC6 goes high - } - break; - } - return true; -} \ No newline at end of file diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile new file mode 100644 index 0000000000..afb9372e18 --- /dev/null +++ b/keyboards/handwired/gamenum/Makefile @@ -0,0 +1,73 @@ + +# MCU name +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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md new file mode 100644 index 0000000000..22f67ee61e --- /dev/null +++ b/keyboards/handwired/gamenum/README.md @@ -0,0 +1,92 @@ +GameNum firmware +====================== +## Board overview + +The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. +The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. +The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. + +The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. + +## Build conciderations + +Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. +Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. +The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. +'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. + +Schematic of the build is coming soon. + +## Adding more layers + +Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. + +Next thing to do is to add the actual layer for the keymap. + +``` +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +) +``` + +This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: +In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! + +Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. +The number that is at the end of the keycode corresponds with the code in the function. +`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. + +Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. +Look for this piece of code: + +``` + DDRD |= (1<<4); + PORTD &= ~(1<<4); +``` + +Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes low + PORTD |= (1<<4); //PD4 goes high + } + break; +``` + +This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. +Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. +Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h new file mode 100644 index 0000000000..6af876ab79 --- /dev/null +++ b/keyboards/handwired/gamenum/config.h @@ -0,0 +1,162 @@ +/* +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 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Seth-Senpai +#define PRODUCT GameNum +#define DESCRIPTION Numpad with gamelayers + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN C6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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/handwired/gamenum/gamenum.c b/keyboards/handwired/gamenum/gamenum.c new file mode 100644 index 0000000000..8048194bbc --- /dev/null +++ b/keyboards/handwired/gamenum/gamenum.c @@ -0,0 +1,14 @@ +#include "gamenum.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + DDRC |= (1<<6); + PORTC &= ~(1<<6); + + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + matrix_init_user(); + +} diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h new file mode 100644 index 0000000000..ea633b9bfa --- /dev/null +++ b/keyboards/handwired/gamenum/gamenum.h @@ -0,0 +1,21 @@ +#ifndef GAMENUM_H +#define GAMENUM_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) \ +{ \ + { k00, k01, k02, k03}, \ + { k10, k11, k12, k13}, \ + { k20, k21, k22, KC_NO}, \ + { k30, k31, k32, KC_NO}, \ + { KC_NO, k41, k42, k43} \ +} + +#endif diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c new file mode 100644 index 0000000000..6950b741a3 --- /dev/null +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include "gamenum.h" +#include "action_layer.h" +#include "eeconfig.h" + + +#define _______ KC_TRNS + +#define DEF 0 +#define HDN 1 +#define OSY 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +), +[HDN] = KEYMAP( + KC_FN1, KC_1, KC_2, KC_3, \ + KC_Q, KC_W, KC_E, KC_R, \ + KC_A, KC_S, KC_D, \ + KC_Z, KC_X, KC_C, \ + KC_LSFT, KC_LALT, KC_SPC \ +), +[OSY] = KEYMAP( + KC_A, KC_Q, KC_1, KC_FN2, \ + KC_S, KC_W, KC_2, KC_LALT, \ + KC_D, KC_E, KC_3, \ + KC_F, KC_R, KC_4, \ + KC_SPC, KC_T, KC_TAB \ +) +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_SET(HDN, ON_PRESS), + [1] = ACTION_LAYER_SET(OSY, ON_PRESS), + [2] = ACTION_LAYER_SET(DEF, ON_PRESS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_FN0: + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + break; + case KC_FN1: + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + break; + case KC_FN2: + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3 From 0f06e94d5d8a07d0d896bf2cc72058ae11d17450 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 09:07:37 +0000 Subject: update readme --- keyboards/handwired/gamenum/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md index 22f67ee61e..9e22ff2fcb 100644 --- a/keyboards/handwired/gamenum/README.md +++ b/keyboards/handwired/gamenum/README.md @@ -2,14 +2,14 @@ GameNum firmware ====================== ## Board overview -The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited. It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. -## Build conciderations +## Build considerations Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. @@ -20,7 +20,7 @@ Schematic of the build is coming soon. ## Adding more layers -Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. Next thing to do is to add the actual layer for the keymap. @@ -50,9 +50,9 @@ Look for this piece of code: PORTD &= ~(1<<4); ``` -Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<] ``` Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` + + -- cgit v1.2.3 From 8dd69a1b05770be3131f6e5917e2552ec6579519 Mon Sep 17 00:00:00 2001 From: coderkun Date: Mon, 3 Oct 2016 16:36:21 +0200 Subject: Overwrite method hex_to_unicode() for make it compatible with Neo --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index 238971e81e..b62b14449f 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -290,3 +290,28 @@ void unicode_input_start (void) { unregister_code(KC_LSFT); unregister_code(KC_LCTL); }; + +// Override method to use NEO_A instead of KC_A +uint16_t hex_to_keycode(uint8_t hex) +{ + if (hex == 0x0) { + return KC_0; + } else if (hex < 0xA) { + return KC_1 + (hex - 0x1); + } else { + switch(hex) { + case 0xA: + return NEO_A; + case 0xB: + return NEO_B; + case 0xC: + return NEO_C; + case 0xD: + return NEO_D; + case 0xE: + return NEO_E; + case 0xF: + return NEO_F; + } + } +} -- cgit v1.2.3 From aa9c6e9f59c5e45c6ea71cd3aa8fb037e88c11b6 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 3 Oct 2016 19:20:00 +0200 Subject: ergodox: Update algernon's keymap to v1.8 ADORE ----- * Major rearrangements were made, to reduce pinky use, and to balance out the hand usage. Tools ----- * The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered. * The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned. Miscellaneous ------------- * Fixed the **Steno** toggle key. * My wife is now present on the keyboard too. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/NEWS.md | 145 +++++++++++++++++++++ .../keymaps/algernon/images/adore-layer.png | Bin 97225 -> 97089 bytes .../keymaps/algernon/images/steno-layer.png | Bin 69557 -> 64086 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 41 +++--- keyboards/ergodox/keymaps/algernon/readme.md | 133 +------------------ .../algernon/tools/heatmap-layout.ADORE.json | 27 ++-- .../ergodox/keymaps/algernon/tools/hid-commands | 12 ++ .../keymaps/algernon/tools/log-to-heatmap.py | 5 + .../ergodox/keymaps/algernon/tools/text-to-log.py | 24 ++-- 9 files changed, 212 insertions(+), 175 deletions(-) create mode 100644 keyboards/ergodox/keymaps/algernon/NEWS.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md new file mode 100644 index 0000000000..6b95c1ef43 --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/NEWS.md @@ -0,0 +1,145 @@ +## v1.8 + +*2016-10-03* + +### ADORE + +* Major rearrangements were made, to reduce pinky use, and to balance out the hand usage. + +### Tools + +* The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered. +* The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned. + +### Miscellaneous + +* Fixed the [Steno](#steno-layer) toggle key. + +## 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* + +### Base layer changes + +* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. +* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. +* The `Apps` key has been replaced by `F12`. +* The `-`/`_` is no longer a tap-dance key. + +### ADORE layer changes + +* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. + +### Miscellaneous changes + +* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. +* 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 + +* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. +* The heatmap generator received a lot of updates. + +## v1.5 + +*2016-08-12* + +* The **1HAND** layer has been removed. +* A `Delete` key is now available on the right thumb cluster. +* The [ADORE](#adore-layer) layer received a major update, see the layout image above. +* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. +* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). +* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. +* There is some experimental support for entering Unicode symbols. + +## v1.4 + +*2016-07-29* + +* When toggling the key logging on or off, the LEDs will do a little dance. +* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. +* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key. +* The `-`/`_` key was turned into a tap-dance key too. +* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. + +## v1.3 + +*2016-07-06* + +* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. +* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. +* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. +* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. + +## v1.2 + +*2016-06-22* + +* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). +* 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** 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. + +## v1.1 + +*2016-06-14* + +* The keyboard starts in NKRO mode, bootmagic and other things are disabled. +* A [Steno](#steno-layer) layer was added, to be used with Plover. +* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. +* `LEAD y` types `\o/`. +* Some keys on the [Base](#base-layer) layer have been moved around: + - `?` moved to the left pinky, left of `Q`. + - `=` shifted one row down, but `F11` stayed where it was. + - `-` 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** layer too, not just modifiers. + +## v1.0 + +*2016-05-26* + +Initial version. diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index b611fbc42a..5f39010bb6 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/steno-layer.png b/keyboards/ergodox/keymaps/algernon/images/steno-layer.png index fe3c03c932..9a2ba55eff 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/steno-layer.png and b/keyboards/ergodox/keymaps/algernon/images/steno-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 248a0ed303..48d63fb0bd 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -160,11 +160,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------. ,-----------------------------------------------------. * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ | + * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | | + * | | Z | Q | ' | , | . | | | pane | B | K | V | Y | J | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [ADORE] = KEYMAP( // left hand 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) +,KC_BSLS ,KC_X ,KC_W ,KC_C ,KC_H ,KC_F ,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) @@ -190,9 +190,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand ,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 + ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV ,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 + ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL @@ -386,7 +386,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 6: Steno for Plover * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | BASE | | | | | | | | | + * | | | | | | | | | | | | | | | BASE | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | # | # | # | # | # | # | | # | # | # | # | # | # | # | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -407,7 +407,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [PLVR] = KEYMAP( // left hand -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, @@ -417,7 +417,7 @@ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, PV_A, PV_O, KC_NO, // right hand - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, @@ -617,6 +617,7 @@ 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) { + uprintf("CMD:appsel_start\n"); layer_on (APPSEL); set_oneshot_layer (APPSEL, ONESHOT_START); } @@ -695,15 +696,15 @@ void matrix_init_user(void) { LEADER_EXTERNS(); -static void ang_tap (uint8_t code, ...) { - uint8_t kc = code; +static void ang_tap (uint16_t code, ...) { + uint16_t kc = code; va_list ap; va_start(ap, code); do { - register_code(kc); - unregister_code(kc); + register_code16(kc); + unregister_code16(kc); wait_ms(50); kc = va_arg(ap, int); } while (kc != 0); @@ -866,6 +867,17 @@ void matrix_scan_user(void) { leading = false; leader_end (); + SEQ_ONE_KEY (KC_C) { + ang_tap (LSFT(KC_C), KC_S, KC_I, KC_L, KC_L, KC_RALT, KC_QUOT, KC_A, KC_M, KC_A, KC_S, + KC_S, KC_Z, KC_O, KC_N, KC_Y, KC_K, KC_RALT, KC_QUOT, KC_A, KC_M, 0); + } + + SEQ_ONE_KEY (KC_G) { + ang_tap (LSFT(KC_G), KC_E, KC_J, KC_G, KC_RALT, KC_EQL, KC_O, + KC_RALT, KC_EQL, KC_O, + KC_RALT, KC_EQL, KC_O, 0); + } + #if KEYLOGGER_ENABLE SEQ_ONE_KEY (KC_D) { ergodox_led_all_on(); @@ -875,11 +887,6 @@ void matrix_scan_user(void) { } #endif - SEQ_ONE_KEY (KC_Q) { - register_code16 (LCTL(KC_1)); - unregister_code16 (LCTL(KC_1)); - } - SEQ_ONE_KEY (KC_T) { time_travel = !time_travel; } diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index f15b676528..822ca36500 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -27,7 +27,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs] - [Unicode Symbol Input](#unicode-symbol-input) * [Building](#building) - [Using on Windows](#using-on-windows) -* [Changelog](#changelog) +* [Changelog](https://github.com/algernon/ergodox-layout/blob/master/NEWS.md#readme) * [License](#license) # Layouts @@ -145,137 +145,6 @@ $ make keyboard=ergodox keymap=algernon The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line. -# 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* - -### Base layer changes - -* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. -* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. -* The `Apps` key has been replaced by `F12`. -* The `-`/`_` is no longer a tap-dance key. - -### ADORE layer changes - -* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. - -### Miscellaneous changes - -* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. -* 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 - -* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. -* The heatmap generator received a lot of updates. - -## v1.5 - -*2016-08-12* - -* The **1HAND** layer has been removed. -* A `Delete` key is now available on the right thumb cluster. -* The [ADORE](#adore-layer) layer received a major update, see the layout image above. -* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. -* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). -* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. -* There is some experimental support for entering Unicode symbols. - -## v1.4 - -*2016-07-29* - -* When toggling the key logging on or off, the LEDs will do a little dance. -* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. -* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key. -* The `-`/`_` key was turned into a tap-dance key too. -* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. - -## v1.3 - -*2016-07-06* - -* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. -* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. -* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. -* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. - -## v1.2 - -*2016-06-22* - -* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). -* 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** 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. - -## v1.1 - -*2016-06-14* - -* The keyboard starts in NKRO mode, bootmagic and other things are disabled. -* A [Steno](#steno-layer) layer was added, to be used with Plover. -* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. -* `LEAD y` types `\o/`. -* Some keys on the [Base](#base-layer) layer have been moved around: - - `?` moved to the left pinky, left of `Q`. - - `=` shifted one row down, but `F11` stayed where it was. - - `-` 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** layer too, not just modifiers. - -## v1.0 - -*2016-05-26* - -Initial version. - # License The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version. diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json index 502d1e6ea4..a34edcf87e 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -111,11 +111,11 @@ "x": 3.5, "a": 6 }, - "G", + "C", { "x": 10.5 }, - "C" + "L" ], [ { @@ -128,11 +128,11 @@ "x": 1, "a": 6 }, - "L", + "H", { "x": 8.5 }, - "H", + "G", { "x": 1 }, @@ -143,7 +143,7 @@ "y": -0.875, "x": 5.5 }, - "M", + "F", { "a": 4, "fa": [0, 0, 0], @@ -158,7 +158,7 @@ { "a": 6 }, - "F" + "M" ], [ { @@ -167,7 +167,7 @@ "a": 4, "w": 1.5 }, - "\n\n~\n`", + "\n\n|\n\\", { "a": 6, "f": 3 @@ -175,14 +175,14 @@ "X", { "x": 14.5, - "a": 6 + "a": 4 }, - "Y", + "/\n?", { "a": 4, "w": 1.5 }, - "|\n\\" + "~\n`" ], [ { @@ -312,7 +312,7 @@ { "x": 1 }, - "J" + "Y" ], [ { @@ -342,10 +342,9 @@ }, "Z", { - "x": 14.5, - "a": 4 + "x": 14.5 }, - "?\n/", + "J", { "f": 9, "g": true, diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands index f3b83cf6d1..2a6710be4a 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands +++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands @@ -1,6 +1,8 @@ #!/bin/bash set -e +LAST_APPSEL_START=0 + cmd_wm () { WIN="$(xdotool getactivewindow)" wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz @@ -34,6 +36,16 @@ cmd_appsel_chrome () { _cmd_appsel chromium } +cmd_appsel_start () { + APPSEL_START=$(date +%s) + if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then + return + fi + LAST_APPSEL_START=$APPSEL_START + notify-send -t 1000 "Please select an application!" -c device -u low \ + -i /usr/share/icons/Adwaita/24x24/devices/video-display.png +} + cmd_help () { cat < Date: Mon, 3 Oct 2016 18:27:52 +0000 Subject: updated readme with images --- keyboards/handwired/gamenum/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md index 9e22ff2fcb..5b53004efd 100644 --- a/keyboards/handwired/gamenum/README.md +++ b/keyboards/handwired/gamenum/README.md @@ -16,7 +16,15 @@ Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. '+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. -Schematic of the build is coming soon. +## schematic of the switches and diodes + +![schematic overview](http://i.imgur.com/fleitoA.jpg) + +Keep in mind that the minus of the diodes should point towards the pro micros inputs. + +##LED hookup + +![led overview](http://i.imgur.com/U6m865n.jpg) ## Adding more layers -- cgit v1.2.3 From aac3ba61a5a82d051f5def03884877c5e44db4da Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Tue, 4 Oct 2016 07:52:13 +0000 Subject: added rules.mk --- keyboards/handwired/gamenum/rules.mk | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 keyboards/handwired/gamenum/rules.mk (limited to 'keyboards') diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk new file mode 100644 index 0000000000..afb9372e18 --- /dev/null +++ b/keyboards/handwired/gamenum/rules.mk @@ -0,0 +1,73 @@ + +# MCU name +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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + -- cgit v1.2.3 From b7442999dff637696842f272edca870f8e2f64e4 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Tue, 4 Oct 2016 07:58:28 +0000 Subject: updated the wrong makefile like a dummy --- keyboards/handwired/gamenum/Makefile | 76 ++---------------------------------- 1 file changed, 3 insertions(+), 73 deletions(-) (limited to 'keyboards') diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile index afb9372e18..191c6bb664 100644 --- a/keyboards/handwired/gamenum/Makefile +++ b/keyboards/handwired/gamenum/Makefile @@ -1,73 +1,3 @@ - -# MCU name -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=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../Makefile -endif - - +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3 From 059990e05a0eea21da0bbeba5b9ad78ff3b2bdd5 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 6 Oct 2016 07:23:12 +0100 Subject: added lock screen button and fixed error in diagram --- keyboards/planck/keymaps/callum/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 411523125d..c89b485a41 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -53,9 +53,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | + * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | + * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | Below| | | | | | | * `-----------------------------------------------------------------------------------' @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | | | | | | + * | | F21 | F22 | F23 | F24 | | | Lock | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNC] = { {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(LALT(KC_VOLU))}, {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(LALT(KC_VOLD))}, - {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, S(LCTL(KC_POWER)), XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } -- cgit v1.2.3 From 387b94a6cf0f32dd0ff72e7ff09495e69cccd1fc Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 6 Oct 2016 07:24:26 +0100 Subject: updated readme --- keyboards/planck/keymaps/callum/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index b5997cd5ae..0baeba46d9 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -25,9 +25,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * ,-----------------------------------------------------------------------------------. * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | + * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | + * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | Below| | | | | | | * `-----------------------------------------------------------------------------------' @@ -63,7 +63,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | | | | | | + * | | F21 | F22 | F23 | F24 | | | Lock | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' -- cgit v1.2.3 From 2d7b549e2172b6ffadcaf852055864e6213cfa72 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 01:38:55 +0300 Subject: Add keymap with audio disabled but RGB effects enabled --- keyboards/cluecard/keymaps/rgb_effects/Makefile | 21 ++++++++++++++++++++ keyboards/cluecard/keymaps/rgb_effects/config.h | 9 +++++++++ keyboards/cluecard/keymaps/rgb_effects/keymap.c | 25 ++++++++++++++++++++++++ keyboards/cluecard/keymaps/rgb_effects/readme.md | 3 +++ 4 files changed, 58 insertions(+) create mode 100644 keyboards/cluecard/keymaps/rgb_effects/Makefile create mode 100644 keyboards/cluecard/keymaps/rgb_effects/config.h create mode 100644 keyboards/cluecard/keymaps/rgb_effects/keymap.c create mode 100644 keyboards/cluecard/keymaps/rgb_effects/readme.md (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/rgb_effects/Makefile b/keyboards/cluecard/keymaps/rgb_effects/Makefile new file mode 100644 index 0000000000..00670c0cf4 --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/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 = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # 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 = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h new file mode 100644 index 0000000000..441db52d96 --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define RGBLIGHT_TIMER + +#endif diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c new file mode 100644 index 0000000000..3b68558254 --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/keymap.c @@ -0,0 +1,25 @@ +#include "cluecard.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + RGB_TOG, RGB_SAI, RGB_VAI, \ + RGB_HUD, RGB_HUI, \ + RGB_MOD, RGB_SAD, RGB_VAD, \ + BL_STEP, \ + KC_NO, KC_NO, KC_NO \ + ) +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md new file mode 100644 index 0000000000..fa710b4641 --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/readme.md @@ -0,0 +1,3 @@ +# RGB effect test keymap for cluecard + +This keymap has audio disabled, and the RGB mode button does not go through the different effects -- cgit v1.2.3 From 26759e126eec922cd642052baa3e43a3c62c4a7c Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 9 Oct 2016 13:34:17 +0200 Subject: New Planck keymap: vifon --- keyboards/planck/keymaps/vifon/Makefile | 25 +++++ keyboards/planck/keymaps/vifon/config.h | 91 ++++++++++++++++ keyboards/planck/keymaps/vifon/keymap.c | 187 ++++++++++++++++++++++++++++++++ 3 files changed, 303 insertions(+) create mode 100644 keyboards/planck/keymaps/vifon/Makefile create mode 100644 keyboards/planck/keymaps/vifon/config.h create mode 100644 keyboards/planck/keymaps/vifon/keymap.c (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/vifon/Makefile b/keyboards/planck/keymaps/vifon/Makefile new file mode 100644 index 0000000000..838cb4e885 --- /dev/null +++ b/keyboards/planck/keymaps/vifon/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 = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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. + +# 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 diff --git a/keyboards/planck/keymaps/vifon/config.h b/keyboards/planck/keymaps/vifon/config.h new file mode 100644 index 0000000000..9cb0634fb3 --- /dev/null +++ b/keyboards/planck/keymaps/vifon/config.h @@ -0,0 +1,91 @@ +/* +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 MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * 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 + +/* prevent the modifiers from being stuck, sacrificing some memory */ +#define PREVENT_STUCK_MODIFIERS + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c new file mode 100644 index 0000000000..80c4a516c3 --- /dev/null +++ b/keyboards/planck/keymaps/vifon/keymap.c @@ -0,0 +1,187 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif +#include "timer.h" +#include + +// 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. +enum userlayer { + _QW = 0, + _CM, + _PP, + _PPG, + _NM, + _LW, + _RS, + _DL, + _DYN, +}; + +enum planck_keycodes { + KM_LW = SAFE_RANGE, + KM_RS, + KM_SHLK, /* ShiftLock */ + KM_RST, /* Reset */ + KM_NUM, /* Numeric layer */ + KM_SLP, /* Sleep 250 ms */ + KM_PPLR, /* Pure Pro layer */ + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = { /* 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}, + {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN0 }, + {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL} +}, +[_CM] = { /* 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}, + {CTL_T(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_FN0 }, + {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL} +}, +[_PP] = { /* Pure Pro */ + {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_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_UP, KC_RCTL}, + {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT} +}, +[_PPG] = { /* Pure Pro: Gaming */ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______}, + {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______}, +}, +[_NM] = { /* Numeric */ + {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, KC_FN0 }, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} +}, +[_LW]= { /* 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_ESC, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KM_NUM, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), KM_SLP, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_ENT }, + {_______, BL_TOGG, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, +[_RS]= { /* RAISE */ + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL }, + {KC_ESC, 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, DF(_QW), DF(_CM), KM_PPLR, KM_RST, KC_ENT }, + {_______, BL_STEP, _______, _______, _______, KC_BTN2, KC_BTN2, _______, KC_MPLY, KC_VOLD, KC_VOLU, _______} +}, +[_DL]= { /* DUAL */ + {_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, _______}, + {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ACL0, KC_ACL2}, + {_______, _______, KC_BTN2, KC_BTN3, KC_BTN1, KC_WWW_BACK, KC_WWW_FORWARD, KC_MUTE, _______, _______, _______, _______}, + {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______} +}, +[_DYN]= { /* special */ + {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS}, + {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK}, + {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, +}; + +#undef _______ + +const uint16_t PROGMEM fn_actions[] = { + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t key_timer; + + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + switch (keycode) { + case KM_LW: + if (record->event.pressed) { + layer_on(_LW); + } else { + layer_off(_LW); + } + update_tri_layer(_LW, _RS, _DL); + return false; + break; + case KM_RS: + if (record->event.pressed) { + layer_on(_RS); + } else { + layer_off(_RS); + } + update_tri_layer(_LW, _RS, _DL); + return false; + break; + case KM_SHLK: + register_code(KC_LSFT); + break; + case KM_RST: + if (record->event.pressed) { + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) >= 500) { + clear_keyboard(); + backlight_toggle(); + _delay_ms(250); + backlight_toggle(); + bootloader_jump(); + } + } + break; + case KM_PPLR: + if (record->event.pressed) { + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) >= 250) { + default_layer_set((1UL << _PP) | (1UL << _PPG)); + backlight_toggle(); + _delay_ms(100); + backlight_toggle(); + } else { + default_layer_set(1UL << _PP); + } + } + break; + case KM_NUM: + layer_on(_NM); + break; + case KM_SLP: + if (record->event.pressed) { + _delay_ms(250); + } + break; + } + + + if (record->event.pressed + && IS_LAYER_ON(_NM) + && keymap_key_to_keycode(_NM, record->event.key) == KC_TRNS) { + + layer_off(_NM); + } + + return true; +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +} -- cgit v1.2.3 From 0ae07ae64d3549d34c021f70b4a9877e5cd9ced9 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:11:52 +0300 Subject: Tune the snake and knight effect parameters for Cluecard --- keyboards/cluecard/keymaps/rgb_effects/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h index 441db52d96..e88847df4d 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/config.h +++ b/keyboards/cluecard/keymaps/rgb_effects/config.h @@ -5,5 +5,8 @@ // place overrides here #define RGBLIGHT_TIMER +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 #endif -- cgit v1.2.3 From 02c9a992157d15c4988b9dc46cfa2f76bfea655c Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:27:11 +0300 Subject: Tune snake and knight intervals for Cluecard --- keyboards/cluecard/keymaps/rgb_effects/keymap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c index 3b68558254..74c95ce8a8 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/keymap.c +++ b/keyboards/cluecard/keymaps/rgb_effects/keymap.c @@ -10,6 +10,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85}; +const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85}; + void matrix_init_user(void) { } -- cgit v1.2.3 From db4dce731216cb6cdac65cb528329fd0caca5aa3 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:37:47 +0300 Subject: Update the Cluecard readme files --- keyboards/cluecard/keymaps/default/readme.md | 4 ++++ keyboards/cluecard/keymaps/rgb_effects/readme.md | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/default/readme.md b/keyboards/cluecard/keymaps/default/readme.md index 9e3b97beac..fa4e8ccad4 100644 --- a/keyboards/cluecard/keymaps/default/readme.md +++ b/keyboards/cluecard/keymaps/default/readme.md @@ -1 +1,5 @@ # The default keymap for cluecard + +Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. +So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness +buttons. You can of course also turn them on and off with the on/off button. diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md index fa710b4641..949cac394e 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/readme.md +++ b/keyboards/cluecard/keymaps/rgb_effects/readme.md @@ -1,3 +1,7 @@ # RGB effect test keymap for cluecard -This keymap has audio disabled, and the RGB mode button does not go through the different effects +This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each +effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check +the `rgblight.c` file. + +The hue, saturation and brightness buttons will work depending on which effect is active. -- cgit v1.2.3 From e95c1e3f2c5137b114aa947f875c52e4a5c74b5d Mon Sep 17 00:00:00 2001 From: Nathan Johnson Date: Sat, 8 Oct 2016 13:20:36 -0500 Subject: Adding whiskey_tango_foxtrot_capslock ergodox keymap --- .../osx_whiskey_tango_foxtrot_capslock/keymap.c | 231 +++++++++++++++++++++ .../osx_whiskey_tango_foxtrot_capslock.png | Bin 0 -> 185064 bytes .../osx_whiskey_tango_foxtrot_capslock/readme.md | 38 ++++ 3 files changed, 269 insertions(+) create mode 100644 keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c create mode 100644 keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png create mode 100644 keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c new file mode 100644 index 0000000000..98d2836ab2 --- /dev/null +++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c @@ -0,0 +1,231 @@ +/* + * This is built out of frustration with OSX / Sierra caps lock delay. + * Fake it till you make it! + */ + +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "timer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define BLINK_BASE 150U // timer threshold for blinking on MDIA layer + +typedef enum onoff_t {OFF, ON} onoff; + +#define caps_led_on ergodox_right_led_2_on +#define caps_led_off ergodox_right_led_2_off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | ` | 7 | 8 | 9 | 0 | - | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsL | A | S | D | F | G |------| |------| H | J | K | L | ; | " | + * |--------+------+------+------+------+------| ~L1 | | ~L1 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Ctrl | Opt | Cmd | Left | Right| | Down | Up | Ctrl | Cmd | Opt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | L1 | | Alt | Ctrl ] + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * |Backsp| Del |------| |------| Enter | Spc | + * | | | End | | PgDn | | | + * `--------------------' `----------------------' + */ + + [BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC, + M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G), + KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), KC_FN0, + KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT, + KC_TRNS, KC_FN1, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + // right hand + KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS, + M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT, + KC_FN0, M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT, + KC_RALT, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L0 | L2 | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS + [SYMB] = KEYMAP( + // left hand + KC_GRV ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_FN3, KC_FN2, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 2: Media and tenkey + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BOOTL | | Mute | Vol- | Vol+ | F14 | F15 | | | | NumLk| / | * | - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| | | |------+-----+-------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | Enter| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | Enter| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L1 | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + // MEDIA AND TENKEY + [MDIA] = KEYMAP( + KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, KC_F15, + KC_TRNS, 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, + KC_FN4, KC_NO, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_NO, KC_NO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, + KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NO, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, + KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_NO, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_NO, + KC_NO, KC_NO, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + ACTION_LAYER_MOMENTARY(SYMB), // FN0 - Momentary Layer 1 (Symbols) + ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols) + ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media) + ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols) + ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia) + ACTION_LAYER_MOMENTARY(MDIA) // FN5 - Momentary Layer 2 (Mdia) +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + static onoff caps_state = OFF; + switch(id) { + case KC_CAPS: + if (record->event.pressed) { + // Toggle caps state; + if (caps_state == OFF) { + // Turn it on then! + caps_led_on(); + caps_state = ON; + } else { + caps_led_off(); + caps_state = OFF; + } + } + break; + default: + if (record->event.pressed) { + bool shifted = false; + if (caps_state == ON && get_mods() == 0) { + register_code(KC_LSFT); + shifted = true; + } + register_code(id); + if(shifted) { + unregister_code(KC_LSFT); + } + } else { + unregister_code(id); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +} +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + static onoff board_led_state = OFF; + static uint16_t dt = 0; + static uint8_t oldlayer = 0; + + if(oldlayer != layer) { + // Layer was just toggled. + if(layer == BASE) { + ergodox_board_led_off(); + board_led_state = OFF; + } else { + ergodox_board_led_on(); + board_led_state = ON; + } + } else if (layer >= MDIA) { + // We need to do blinking. + if(timer_elapsed(dt) > BLINK_BASE) { + // toggle + dt = timer_read(); + if(board_led_state == OFF) { + ergodox_board_led_on(); + board_led_state = ON; + } else { + ergodox_board_led_off(); + board_led_state = OFF; + } + } + } + oldlayer = layer; +} diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png new file mode 100644 index 0000000000..8d49e5e61d Binary files /dev/null and b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png differ diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md new file mode 100644 index 0000000000..618db6ff43 --- /dev/null +++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md @@ -0,0 +1,38 @@ +# The extra special ergodox build for MacOS Sierra caps lock users + +###Do you +- Hate the OSX / MacOS caps lock delay? +- Have an ergodox? + +###Then this might just be for you! + +[This](http://apple.stackexchange.com/questions/81234/how-to-remove-caps-lock-delay-on-apple-macbook-pro-aluminum-keyboard) +and [this](http://sleepycow.org/2014/07/removing-the-caps-lock-delay-on-a-macbook/) +are good workarounds for the caps lock delay, however none of these +work on Sierra. This abomination of a keymap simulates capslock to the best +of its abilities. +This means that it keeps track of caps lock state internally rather than +sending a caps lock keypress to the OS. It is smart enough to check for +modifiers, such as Control being held down, and stop it with the hanky panky +and just send on the key event unmolested even if FakeCaps is enabled. And +since the macro isn't even registered on the non-alphas, it will not affect +them regardless. Only in the event that FakeCaps is enabled and an alpha key +is pressed will it sneak in a shift keydown before the alpha keydown and +immediately afterward sneaks in a shift keyup. Generally this works well, +however there is one known issue: + +- Holding down a key will only have the first character in caps. For instance, + with caps lock on, if you hold down the 'a' key, you get: + + ``` + Aaaaaaaaaaaaaaaaaa + ``` + +I have only tested this on an original Ergodox with a Teensy 2.0. + +####Some other small tweaks + - Layer 0 board light is off + - Layer 1 board light is on solid + - Layer 2 board light blinks at speed controlled by BLINK_BASE + +![osx whiskey tango foxtrot](osx_whiskey_tango_foxtrot_capslock.png) -- cgit v1.2.3 From 2855de5f0fdc6767b57877687b614687fdafa64c Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Tue, 20 Sep 2016 11:38:45 +0200 Subject: init keymap --- keyboards/ergodox/keymaps/pvinis/Makefile | 9 + keyboards/ergodox/keymaps/pvinis/keymap.c | 429 ++++++++++++++++++++++++++++++ 2 files changed, 438 insertions(+) create mode 100644 keyboards/ergodox/keymaps/pvinis/Makefile create mode 100644 keyboards/ergodox/keymaps/pvinis/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/Makefile b/keyboards/ergodox/keymaps/pvinis/Makefile new file mode 100644 index 0000000000..7ceb51ce4c --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/Makefile @@ -0,0 +1,9 @@ +CONSOLE_ENABLE = no # for debugging + +SLEEP_LED_ENABLE = no # no led blinking while sleeping +NKRO_ENABLE = yes # disable for windows +TAP_DANCE_ENABLE = yes # tap-tap-tap + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c new file mode 100644 index 0000000000..fce78772a0 --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c @@ -0,0 +1,429 @@ +// pvinis' ergodox keymap + +#include "ergodox.h" +#include "mousekey.h" + +// easier name for left ctrl-alt-gui +#define ALLM(kc) LCAG(kc) + +// layers +enum { + BASE = 0, + BEGIN, + QWERTY, + CARPALX, + SYSCTL, +}; + +// extra keys +enum { + NONE = 0, + + // mouse + MS_UL, // up left + MS_UR, // up right + MS_DL, // down left + MS_DR, // down right + + // tap dance + TD_FLSH, // flash keyboard +}; + +// application selection +// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon +#define AP_SLCK ALLM(KC_S) +#define AP_XCOD ALLM(KC_X) + +// keymaps +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * the base of the keyboard. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |4x FLASH| | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |BEGIN |QWERTY| |SYSCTL| | + * ,------|------|------| |------+--------+------. + * | | |CARPAL| |Slack | | | + * |Backsp|LShift|------| |------| Enter |Space | + * | | |SYSCTL| |Xcode | | | + * `--------------------' `----------------------' + */ +[BASE] = KEYMAP( + TD(TD_FLSH) ,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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,TG(BEGIN) ,TG(QWERTY) + ,TG(CARPALX) + ,KC_BSPC ,KC_LSFT ,TG(SYSCTL) + + ,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_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,TG(SYSCTL) ,KC_NO + ,AP_SLCK + ,AP_XCOD ,KC_ENT ,KC_SPC +), + +/* BEGIN + * a beginner's keymap i currently use. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | + * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | ` | Cmd | | Cmd | | | | | ' | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[BEGIN] = KEYMAP( + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 +,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC +,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G +,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN +,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL + ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS + ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT + ,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT + ,KC_UP ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), + +/* QWERTY + * the default qwerty keymap. not really used, but i'll keep it here for now. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[QWERTY] = KEYMAP( + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS +,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS +,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G +,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS + ,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS + ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS + ,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), + +/* CARPALX + * the keymap i would like to transition to. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | D | S | T | N | R |------| |------| I | A | E | O | H | | + * |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------| + * | | Z | X | C | V | J | | | | K | P | , | . | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Up | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[CARPALX] = KEYMAP( + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS +,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS +,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R +,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS + ,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS + ,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS + ,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), + + +/* SYSCTL + * a keymap to control my system. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | Mute |VolDn |VolUp | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | |MsUpL | MsUp |MsUpR | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | Lock | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | |MsDnL | MsDn | | | Sleep | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | Power| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | |MidClk| + * ,------|------|------| |------+------+------. + * | | | | | |Left |Right | + * | | |------| |------| Click| Click| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[SYSCTL] = KEYMAP( + KC_TRNS ,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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO + + /*,KC_POP*/,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO + /*,KC_PTRN*/,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LCTL(LSFT(KC_PWR)) + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_SLEP + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO +), + +/* TEMPLATE + * keymap template with transparent and non-transparent keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +/* +[TEMPLATE] = KEYMAP( + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), +[TEMPLATE] = KEYMAP( + 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_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_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 +), +*/ +}; + +// keyboard initialization +void matrix_init_user() { + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set(i); + _delay_ms(5); + } + _delay_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set(i); + _delay_ms(10); + } + ergodox_led_all_off(); +} + +// extra keys +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + + // mouse + case MS_UL: + 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); + } + break; + case MS_UR: + 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); + } + break; + case MS_DL: + 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); + } + break; + case MS_DR: + 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); + } + break; + } + return MACRO_NONE; +} + +// tap dances + +// flash keyboard on 4x tap, with leds +void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_1_on(); + break; + case 4: + ergodox_right_led_3_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_1_off(); + break; + } +} + +void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 4) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), +}; -- cgit v1.2.3 From bcc0fa5c81e2a1725379c86b095bd627fb89d29d Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Thu, 22 Sep 2016 11:12:27 +0200 Subject: add messenger --- keyboards/ergodox/keymaps/pvinis/keymap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c index fce78772a0..8e16114543 100644 --- a/keyboards/ergodox/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c @@ -33,6 +33,7 @@ enum { // this is sending ctrl-alt-gui-, and this is picked up by hammerspoon #define AP_SLCK ALLM(KC_S) #define AP_XCOD ALLM(KC_X) +#define AP_MSGR ALLM(KC_M) // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -55,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,------|------|------| |------+--------+------. * | | |CARPAL| |Slack | | | * |Backsp|LShift|------| |------| Enter |Space | - * | | |SYSCTL| |Xcode | | | + * | | |SYSCTL| |Msngr | | | * `--------------------' `----------------------' */ [BASE] = KEYMAP( @@ -77,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,TG(SYSCTL) ,KC_NO ,AP_SLCK - ,AP_XCOD ,KC_ENT ,KC_SPC + ,AP_MSGR ,KC_ENT ,KC_SPC ), /* BEGIN -- cgit v1.2.3 From 538cdda78ec2e79a965205d0df974dfa5855c68e Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Thu, 22 Sep 2016 11:38:17 +0200 Subject: use wait_ms instead of _delay_ms --- keyboards/ergodox/keymaps/pvinis/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c index 8e16114543..df906201a8 100644 --- a/keyboards/ergodox/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c @@ -331,12 +331,12 @@ void matrix_init_user() { ergodox_led_all_on(); for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { ergodox_led_all_set(i); - _delay_ms(5); + wait_ms(5); } - _delay_ms(1000); + wait_ms(1000); for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { ergodox_led_all_set(i); - _delay_ms(10); + wait_ms(10); } ergodox_led_all_off(); } @@ -402,9 +402,9 @@ void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { break; case 4: ergodox_right_led_3_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_2_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_1_off(); break; } @@ -419,9 +419,9 @@ void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { ergodox_right_led_1_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_2_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_3_off(); } -- cgit v1.2.3 From 0853227edecf256a398347fb292a9fda74f242cb Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Tue, 11 Oct 2016 10:32:34 +0200 Subject: add readme --- keyboards/ergodox/keymaps/pvinis/Changelog.md | 7 +++ keyboards/ergodox/keymaps/pvinis/Readme.md | 65 +++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 keyboards/ergodox/keymaps/pvinis/Changelog.md create mode 100644 keyboards/ergodox/keymaps/pvinis/Readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/Changelog.md b/keyboards/ergodox/keymaps/pvinis/Changelog.md new file mode 100644 index 0000000000..e5816200b8 --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/Changelog.md @@ -0,0 +1,7 @@ +## v0.3 + +*2016-10-11* + +### Starting point + +* The starting point of this keymap. A beginner layout, and a couple placeholders. diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md new file mode 100644 index 0000000000..2a4a0c8f3d --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/Readme.md @@ -0,0 +1,65 @@ +pvinis' keymap +============== + +This is a getting-used-to keymap for the [ErgoDox EZ][ez]. It's very much a work in progress. + +[ez]: https://ergodox-ez.com/ + +## Table of Contents + +* [Todo](#todo) +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Beginner layer](#beginner-layer) + - [QWERTY layer](#qwerty-layer) + - [CARPALX layer](#carpalx-layer) + - [System Control layer](#system-control-layer) + - [Template layers](#template-layers) +* [Building](#building) + +# Todo + +- [ ] Generate images from keymap +- [ ] Implement algernon's heatmap +- [ ] Implement `KC_POP` + +# Layouts + +## Base layer + +This is the base layer that contains the common buttons of all keymaps. Right now, it has the top left button as a `flash` button when it's tapped 4 times, and the two thumb islands. The islands contain the `space` and `enter` keys on the right, the `backspace` and `shift` on the left, and all the 1x1 keys are just layer switches. +Every time I connect the keyboard, I press the `BEGIN` layer switch, and then start typing. +Recently, I added a few application "shortcuts", that basically call `ctrl`+`alt`+`cmd`+``, and `` is `S` for Slack, `X` for Xcode, `M` for Messenger. Using [Hammerspoon][hammerspoon], I show/hide the application. + +[hammerspoon]: http://www.hammerspoon.org/ + +## Beginner layer + +This is a basic keymap I use right now until I'm comfortable typing on the Ergodox. Currently uses a QWERTY layout, and the `([{}])` on the middle keys. Not a perfect layout, and its going to go away at some point, but for now thats my daily driver. + +## QWERTY layer + +This is basically the same as the `BEGIN` layer, but it might go away. I'm not using it, but I should have a QWERTY layout on the keyboard, in case someone else wants to try it out, or if I completely forget how keyboards work! At some point, this and the `BEGIN` layer will become one. + +## CARPALX layer + +This is here as a placeholder. I want to transition to [Carpalx QGMLWY][carpalx] or [White][white] at some point. They both look very interesting and more comfortable to type on, but after I'm confident with typing on the Ergodox. + +[carpalx]: http://mkweb.bcgsc.ca/carpalx/?full_optimization +[white]: https://github.com/mw8/white_keyboard_layout + +## System Control layer + +This one is a layer that, in time, will have controls like mouse movement, volume up/down, mute, sleep, restart, shutdown, etc. + +## Template layers + +I have two commented out layers that are just templates, so I can easily create a new layer. + +# Building + +``` +$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis +$ make +``` -- cgit v1.2.3 From e27a754b70434de88a37c4a572e4ca5f7730ff58 Mon Sep 17 00:00:00 2001 From: Jack & Erez Date: Wed, 12 Oct 2016 22:18:27 -0400 Subject: [Jack & Erez] Simplifies and documents TO --- keyboards/ergodox/keymaps/dave/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dave/keymap.c b/keyboards/ergodox/keymaps/dave/keymap.c index 32c70097b0..23c4e04906 100644 --- a/keyboards/ergodox/keymaps/dave/keymap.c +++ b/keyboards/ergodox/keymaps/dave/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H, CTL_T(KC_GRV),KC_NUBS,KC_NO, KC_NO, KC_LALT, KC_PSCREEN, KC_PSCREEN, - TO(PROG, ON_PRESS), + TO(PROG), KC_SPC, MO(NAVI), KC_LGUI, // right hand KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_RALT,KC_LBRC,KC_RBRC,KC_NO, CTL_T(KC_QUOT), MT(0x5, KC_NO), MT(0x5, KC_NO), - TO(PROG, ON_PRESS), + TO(PROG), KC_RGUI, MO(PROG), KC_SPC ), @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - TO(NAVI, ON_PRESS), + TO(NAVI), KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_EQUAL, @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_TRNS, KC_TRNS, KC_TRNS, - TO(NAVI, ON_PRESS), + TO(NAVI), KC_TRNS, KC_TRNS, KC_TRNS ), @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, - TO(BASE, ON_PRESS), + TO(BASE), KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - TO(BASE, ON_PRESS), + TO(BASE), KC_TRNS, KC_TRNS, KC_TRNS ), }; -- cgit v1.2.3