From 949540d601739eaad61e17583fb375335cbe992c Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Tue, 30 May 2017 18:01:09 -0700 Subject: Added initial keymap files --- keyboards/ergodox/keymaps/333fred/Makefile | 7 + keyboards/ergodox/keymaps/333fred/keymap.c | 224 +++++++++++++++++++++++++ keyboards/ergodox/keymaps/333fred/visualizer.c | 42 +++++ 3 files changed, 273 insertions(+) create mode 100644 keyboards/ergodox/keymaps/333fred/Makefile create mode 100644 keyboards/ergodox/keymaps/333fred/keymap.c create mode 100644 keyboards/ergodox/keymaps/333fred/visualizer.c (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/Makefile b/keyboards/ergodox/keymaps/333fred/Makefile new file mode 100644 index 0000000000..7b23b64a26 --- /dev/null +++ b/keyboards/ergodox/keymaps/333fred/Makefile @@ -0,0 +1,7 @@ +LCD_BACKLIGHT_ENABLE = YES +LCD_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c new file mode 100644 index 0000000000..be49cb3d80 --- /dev/null +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -0,0 +1,224 @@ +#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 + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +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, 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 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + VRSN, 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, + EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RGB_MOD,KC_TRNS, + KC_TRNS, + RGB_VAD,RGB_VAI,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, + RGB_TOG, RGB_SLD, + KC_TRNS, + KC_TRNS, RGB_HUD, RGB_HUI +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +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; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// 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/333fred/visualizer.c b/keyboards/ergodox/keymaps/333fred/visualizer.c new file mode 100644 index 0000000000..502e53f3d1 --- /dev/null +++ b/keyboards/ergodox/keymaps/333fred/visualizer.c @@ -0,0 +1,42 @@ +/* +Copyright 2017 Fred Sundvik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "simple_visualizer.h" + +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + uint8_t saturation = 60; + if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { + saturation = 255; + } + if (state->status.layer & 0x4) { + state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF); + state->layer_text = "Media & Mouse"; + } + else if (state->status.layer & 0x2) { + state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF); + state->layer_text = "Symbol"; + } + else { + state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF); + state->layer_text = "Default"; + } +} -- cgit v1.2.3 From 95ae256482af8b28935522021ceb955f0acba5eb Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Tue, 30 May 2017 23:52:20 -0700 Subject: Completed iteration 1 of my layout --- keyboards/ergodox/keymaps/333fred/Makefile | 7 +- keyboards/ergodox/keymaps/333fred/README.md | 106 ++++++++++ keyboards/ergodox/keymaps/333fred/keymap.c | 275 +++++++++++++++++-------- keyboards/ergodox/keymaps/333fred/visualizer.c | 16 +- 4 files changed, 306 insertions(+), 98 deletions(-) create mode 100644 keyboards/ergodox/keymaps/333fred/README.md (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/Makefile b/keyboards/ergodox/keymaps/333fred/Makefile index 7b23b64a26..87985bda19 100644 --- a/keyboards/ergodox/keymaps/333fred/Makefile +++ b/keyboards/ergodox/keymaps/333fred/Makefile @@ -1,5 +1,10 @@ -LCD_BACKLIGHT_ENABLE = YES +SUBPROJECT_DEFAULT = infinity +LCD_BACKLIGHT_ENABLE = yes LCD_ENABLE = yes +LED_ENABLE = yes +BACKLIGHT_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/keyboards/ergodox/keymaps/333fred/README.md new file mode 100644 index 0000000000..b9e82f7f08 --- /dev/null +++ b/keyboards/ergodox/keymaps/333fred/README.md @@ -0,0 +1,106 @@ +## Layout + +### Keymap 0: Basic layer +,--------------------------------------------------. ,--------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' | +|--------+------+------+------+------+------| L1 | |TT(3) |------+------+------+------+------+--------| +| LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | Home | End | | Alt |Ctrl/Esc| + ,------|------|------| |------+--------+------. + | | | PgUp | | PgDn | | | + | Bcksp|OSL(2)|------| |------| Ent |Space | + | | | Del | |OSL(2)| | | + `--------------------' `----------------------' + + +### Keymap 1: Code Layer +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | | | | F10 | | F11 | | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | |------| |------| | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,---------------. + | | | | Test | DTest | + ,------|------|------| |------+--------+------. + | | |Refact| | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `----------------------' +Refact - Visual Studio Refactor. Sends `CTRL + R, R` +Test - Visual Studio Run Test. Sends `CTRL + R, T` +DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` + +### Keymap 2: 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 | \ | | +`---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | EPRM | | | | | | | . | 0 | = | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | Caps | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | PScr | | | | | + `--------------------' `--------------------' + +### Keymap 3: Media and Mouse Keys +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | MsUp | | | | | | | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | |MsLeft|MsDown|MsRght| |------| |------| | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | Lclk | Rclk | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | Vol+ | | + ,------|------|------| |------+------+------. + | | | | | Vol- | | | + | | |------| |------| PL/PS| Next | + | | | | | Back | | | + `--------------------' `--------------------' + +### Keymap 4: Movement +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | |LShift| | |------| |------| Left | Down | Up | Right| | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | CTRL |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' + \ No newline at end of file diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c index be49cb3d80..9951144e90 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -4,121 +4,183 @@ #include "version.h" #define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys +#define CODE 1 // code layer +#define SYMB 2 // symbols +#define MDIA 3 // media keys +#define MOVE 4 // movement layer enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, VRSN, - RGB_SLD +}; + +enum custom_macros { + VERSION, + EEPROM, + REFACTOR, + TEST, + DEBUG_TEST, +}; + +// Tap Dance Definitions +enum tap_dance_custom_keys { + TD_SEMICOLON_COLON = 0 +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON) }; 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 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' | + * |--------+------+------+------+------+------| L1 | |TT(3) |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| + * | Home | End | | Alt |Ctrl/Esc| * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | + * | | | PgUp | | PgDn | | | + * | Bcksp|OSL(2)|------| |------| Ent |Space | + * | | | Del | |OSL(2)| | | * `--------------------' `----------------------' */ // 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_HOME, - KC_SPC,KC_BSPC,KC_END, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_ESC, KC_A, KC_S, KC_D, LT(MOVE, KC_F),KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(CODE), + KC_LCTRL, KC_F4, KC_F5, KC_LGUI,KC_LALT, + KC_HOME, KC_END, + KC_PGUP, + KC_BSPC,OSL(SYMB),KC_DEL, + // right hand + TG(CODE), 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, TD(TD_SEMICOLON_COLON),KC_QUOT, + TT(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, CTL_T(KC_ESC), + KC_PGDN, + OSL(SYMB),KC_ENT, KC_SPC + ), +/* Keymap 1: Code Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | F10 | | F11 | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | Test | DTest | + * ,------|------|------| |------+--------+------. + * | | |Refact| | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[CODE] = KEYMAP( // layer 1 : code + // left 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_F10, + 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, + M(REFACTOR), + KC_TRNS, KC_TRNS, KC_TRNS, // 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 + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_F11, 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, + M(TEST), M(DEBUG_TEST), + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), -/* Keymap 1: Symbol Layer +/* Keymap 2: Symbol Layer * * ,---------------------------------------------------. ,--------------------------------------------------. * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * | | ! | @ | ( | ) | | | | | | Up | 7 | 8 | 9 | * | F12 | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * | | # | $ | { | } | ` |------| |------| Down | 4 | 5 | 6 | + | | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | EPRM | | | | | | | . | 0 | = | | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |Animat| | |Toggle|Solid | + * | | Caps | | | | * ,------|------|------| |------+------+------. - * |Bright|Bright| | | |Hue- |Hue+ | - * |ness- |ness+ |------| |------| | | * | | | | | | | | + * | | |------| |------| | | + * | | | PScr | | | | | * `--------------------' `--------------------' */ // SYMBOLS [SYMB] = KEYMAP( // left hand VRSN, 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_EXLM,KC_AT, KC_LPRN,KC_RPRN,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LCBR,KC_RCBR,KC_GRV, KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - RGB_MOD,KC_TRNS, + KC_TRNS,KC_CAPS, KC_TRNS, - RGB_VAD,RGB_VAI,KC_TRNS, + KC_TRNS,KC_TRNS,KC_PSCR, // 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, - RGB_TOG, RGB_SLD, + KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_HUD, RGB_HUI + KC_TRNS, KC_TRNS, KC_TRNS ), -/* Keymap 2: Media and mouse keys +/* Keymap 3: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | + * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * | | | | Lclk | Rclk | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * | | | | Vol+ | | * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | + * | | | | | Vol- | | | + * | | |------| |------| PL/PS| Next | + * | | | | | Back | | | * `--------------------' `--------------------' */ // MEDIA AND MOUSE @@ -134,13 +196,55 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLU, KC_TRNS, + KC_VOLD, + KC_MPRV, KC_MPLY, KC_MNXT +), +/* Keymap 4: Movement + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | |LShift| | |------| |------| Left | Down | Up | Right| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | CTRL |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MOVE] = 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_LSFT, 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_LCTRL,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_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_WBAK -), + KC_TRNS, KC_TRNS, KC_TRNS + +) }; const uint16_t PROGMEM fn_actions[] = { @@ -151,16 +255,31 @@ 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; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; + case VERSION: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case EEPROM: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case REFACTOR: + if (record->event.pressed) { // VS Refactor CTRL+R, R + return MACRO(D(LCTL), T(R), U(LCTL), T(R), END); + } + break; + case TEST: + if (record->event.pressed) { // VS Run Tests CTRL+R, T + return MACRO(D(LCTL), T(R), U(LCTL), T(T), END); + } + break; + case DEBUG_TEST: + if (record->event.pressed) { // VS Debug Tests CTRL+R, CTRL+T + return MACRO(D(LCTL), T(R), T(T), U(LCTL), END); + } + break; } return MACRO_NONE; }; @@ -180,14 +299,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; - break; } return true; } @@ -200,25 +311,7 @@ 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; - } - + ergodox_board_led_on(); + ergodox_led_all_on(); }; diff --git a/keyboards/ergodox/keymaps/333fred/visualizer.c b/keyboards/ergodox/keymaps/333fred/visualizer.c index 502e53f3d1..eaeea6b898 100644 --- a/keyboards/ergodox/keymaps/333fred/visualizer.c +++ b/keyboards/ergodox/keymaps/333fred/visualizer.c @@ -27,15 +27,19 @@ static void get_visualizer_layer_and_color(visualizer_state_t* state) { if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { saturation = 255; } - if (state->status.layer & 0x4) { + if (state->status.layer & 0x10) { + state->target_lcd_color = LCD_COLOR(140, 100, 60); + state->layer_text = "Movement"; + } else if (state->status.layer & 0x8) { state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF); - state->layer_text = "Media & Mouse"; - } - else if (state->status.layer & 0x2) { + state->layer_text = "Media"; + } else if (state->status.layer & 0x4) { state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF); state->layer_text = "Symbol"; - } - else { + } else if (state->status.layer & 0x2) { + state->target_lcd_color = LCD_COLOR(216, 90, 0xFF); + state->layer_text = "Code"; + } else { state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF); state->layer_text = "Default"; } -- cgit v1.2.3 From 4eba71841e983006c81c2acea08556e1055e6b89 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Tue, 30 May 2017 23:56:28 -0700 Subject: Use code blocks for keyboard layouts --- keyboards/ergodox/keymaps/333fred/README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/keyboards/ergodox/keymaps/333fred/README.md index b9e82f7f08..182d923a9b 100644 --- a/keyboards/ergodox/keymaps/333fred/README.md +++ b/keyboards/ergodox/keymaps/333fred/README.md @@ -1,6 +1,7 @@ ## Layout ### Keymap 0: Basic layer +``` ,--------------------------------------------------. ,--------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - | |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| @@ -19,9 +20,11 @@ | Bcksp|OSL(2)|------| |------| Ent |Space | | | | Del | |OSL(2)| | | `--------------------' `----------------------' +``` ### Keymap 1: Code Layer +``` ,--------------------------------------------------. ,--------------------------------------------------. | | | | | | | | | | | | | | | | |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| @@ -40,11 +43,13 @@ | | |------| |------| | | | | | | | | | | `--------------------' `----------------------' -Refact - Visual Studio Refactor. Sends `CTRL + R, R` -Test - Visual Studio Run Test. Sends `CTRL + R, T` -DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` +``` +* Refact - Visual Studio Refactor. Sends `CTRL + R, R` +* Test - Visual Studio Run Test. Sends `CTRL + R, T` +* DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` ### Keymap 2: Symbol Layer +``` ,---------------------------------------------------. ,--------------------------------------------------. |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| @@ -63,8 +68,10 @@ DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` | | |------| |------| | | | | | PScr | | | | | `--------------------' `--------------------' +``` ### Keymap 3: Media and Mouse Keys +``` ,--------------------------------------------------. ,--------------------------------------------------. | | | | | | | | | | | | | | | | |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| @@ -83,8 +90,10 @@ DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` | | |------| |------| PL/PS| Next | | | | | | Back | | | `--------------------' `--------------------' +``` ### Keymap 4: Movement +``` ,--------------------------------------------------. ,--------------------------------------------------. | | | | | | | | | | | | | | | | |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| @@ -103,4 +112,5 @@ DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` | | CTRL |------| |------| | | | | | | | | | | `--------------------' `--------------------' +``` \ No newline at end of file -- cgit v1.2.3 From f35c82ccb25781f3f552d24ff3ae45af6d906503 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 31 May 2017 10:27:39 -0700 Subject: Fixed numpad 0 layout --- keyboards/ergodox/keymaps/333fred/README.md | 2 +- keyboards/ergodox/keymaps/333fred/keymap.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/keyboards/ergodox/keymaps/333fred/README.md index 182d923a9b..7d40f92c54 100644 --- a/keyboards/ergodox/keymaps/333fred/README.md +++ b/keyboards/ergodox/keymaps/333fred/README.md @@ -59,7 +59,7 @@ |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - | EPRM | | | | | | | . | 0 | = | | + | EPRM | | | | | | 0 | 0 | . | = | | `-----------------------------------' `----------------------------------' ,-------------. ,-------------. | | Caps | | | | diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c index 9951144e90..21386e270e 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | EPRM | | | | | | | . | 0 | = | | + * | EPRM | | | | | | 0 | 0 | . | = | | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | Caps | | | | @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -- cgit v1.2.3 From aa1b1c575602d934cf35c90128504e0f985cfc56 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 31 May 2017 17:42:50 -0700 Subject: Added several new macros --- keyboards/ergodox/keymaps/333fred/keymap.c | 82 +++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 19 deletions(-) (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c index 21386e270e..a63c9704f9 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -18,9 +18,21 @@ enum custom_keycodes { enum custom_macros { VERSION, EEPROM, + + // Windows macros + DLEFT, + DRIGHT, + PSCREEN_APP, + + // VS Macros REFACTOR, TEST, DEBUG_TEST, + FORMAT, + + // KeePass macros + KEEPASS_OPEN, + KEEPASS_TYPE, }; // Tap Dance Definitions @@ -32,6 +44,8 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON) }; +// NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -41,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' | - * |--------+------+------+------+------+------| L1 | |TT(3) |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| L1 | |MO(3) |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI | @@ -70,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(CODE), 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, TD(TD_SEMICOLON_COLON),KC_QUOT, - TT(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, KC_RALT, CTL_T(KC_ESC), KC_PGDN, @@ -79,18 +93,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 1: Code Layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | | | | | | | |ACCESS| | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | | | | F10 | | F11 | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |--------+------+------+------+------+------|ACCESS| | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,---------------. - * | | | | Test | DTest | + * |Format| | | Test | DTest | * ,------|------|------| |------+--------+------. * | | |Refact| | | | | * | | |------| |------| | | @@ -106,7 +120,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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, + M(FORMAT), KC_TRNS, M(REFACTOR), KC_TRNS, KC_TRNS, KC_TRNS, // right hand @@ -125,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------------------------------. ,--------------------------------------------------. * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | | ! | @ | ( | ) | | | | | | Up | 7 | 8 | 9 | * | F12 | + * | | ! | @ | ( | ) | | |ACCESS| |ACCESS| Up | 7 | 8 | 9 | * | F12 | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | # | $ | { | } | ` |------| |------| Down | 4 | 5 | 6 | + | | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -136,9 +150,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | Caps | | | | * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | PScr | | | | | + * | | |APScr | | | | | + * | |ACCESS|------| |------| | | + * | | | PScr | |ACCESS| | | * `--------------------' `--------------------' */ // SYMBOLS @@ -150,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_CAPS, - KC_TRNS, + M(PSCREEN_APP), KC_TRNS,KC_TRNS,KC_PSCR, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, @@ -170,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| | |ACCESS|------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | Lclk | Rclk | | | | | | | @@ -210,9 +224,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | |LShift| | |------| |------| Left | Down | Up | Right| | | + * | |DLeft |DRight|LShift|ACCESS| |------| |------| Left | Down | Up | Right| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | |KOpen |KType | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -226,11 +240,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MOVE] = 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_LSFT, 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, M(DLEFT), M(DRIGHT), KC_LSFT, KC_TRNS, KC_TRNS, + KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),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_LCTRL,KC_TRNS, @@ -265,6 +279,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) eeconfig_init(); } break; + case DLEFT: + if (record->event.pressed) { // Windows move desktop left + return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); + } + break; + case DRIGHT: + if (record->event.pressed) { // Windows move desktop right + return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); + } + break; + case PSCREEN_APP; + if (record->event.pressed) { + return MACRO(D(LALT), T(PSCR), U(LALT)); + } + break; case REFACTOR: if (record->event.pressed) { // VS Refactor CTRL+R, R return MACRO(D(LCTL), T(R), U(LCTL), T(R), END); @@ -280,6 +309,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO(D(LCTL), T(R), T(T), U(LCTL), END); } break; + case FORMAT: + if (record->event.pressed) { // VS Format Document, CTRL+K, CTRL+D + return MACRO(D(LCTL), T(K), T(D), U(LCTL), END); + } + break; + case KEEPASS_OPEN: + if (record->event.pressed) { // Keepass open application + return MACRO(D(LCTL), D(LALT), T(K), U(LALT), U(LCTL), END); + } + break; + case KEEPASS_TYPE: + if (record->event.pressed) { // Keepass autotype + return MACRO(D(LCTL), D(LALT), T(A), U(LALT), U(LCTL), END); + } + break; } return MACRO_NONE; }; -- cgit v1.2.3 From cfaf34daec85e73fb878578ab86661a5b61d29b5 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 31 May 2017 17:57:38 -0700 Subject: Updated readme --- keyboards/ergodox/keymaps/333fred/README.md | 18 ++++++++++++------ keyboards/ergodox/keymaps/333fred/keymap.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/keyboards/ergodox/keymaps/333fred/README.md index 7d40f92c54..af8042d859 100644 --- a/keyboards/ergodox/keymaps/333fred/README.md +++ b/keyboards/ergodox/keymaps/333fred/README.md @@ -21,7 +21,8 @@ | | | Del | |OSL(2)| | | `--------------------' `----------------------' ``` - +* Double-click `;` to get a `:` +* Press-and-hold `f` to go to the movement layer ### Keymap 1: Code Layer ``` @@ -37,13 +38,14 @@ | | | | | | | | | | | | `----------------------------------' `----------------------------------' ,-------------. ,---------------. - | | | | Test | DTest | + |Format| | | Test | DTest | ,------|------|------| |------+--------+------. | | |Refact| | | | | | | |------| |------| | | | | | | | | | | `--------------------' `----------------------' ``` +* Format - Visual Studio Format. Sends `CTRL + K, CTRL + D` * Refact - Visual Studio Refactor. Sends `CTRL + R, R` * Test - Visual Studio Run Test. Sends `CTRL + R, T` * DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T` @@ -64,11 +66,12 @@ ,-------------. ,-------------. | | Caps | | | | ,------|------|------| |------+------+------. - | | | | | | | | + | | |APscr | | | | | | | |------| |------| | | | | | PScr | | | | | `--------------------' `--------------------' ``` +* APscr - Take a printscreen of the current app. Sends `Alt + Print Screen` ### Keymap 3: Media and Mouse Keys ``` @@ -99,9 +102,9 @@ |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | | | | | | | | | | | | | | | | |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| -| | | |LShift| | |------| |------| Left | Down | Up | Right| | | +| |DLeft |DRight|LShift| | |------| |------| Left | Down | Up | Right| | | |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| -| | | | | | | | | | | | | | | | +| |KOpen |KType | | | | | | | | | | | | | `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | | | | | | | | | | | | `----------------------------------' `----------------------------------' @@ -113,4 +116,7 @@ | | | | | | | | `--------------------' `--------------------' ``` - \ No newline at end of file +* DLeft - Move to the left Desktop. Sends `Ctrl + Win + Left Arrow` +* DRight - Move to the right Desktop. Sends `Ctrl + Win + Right Arrow` +* KOpen - Opens KeePass. Sends `Ctrl + Alt + k` +* KType - Autotypes KeePass password. Sends `Ctrl + Alt + a` diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c index a63c9704f9..070ad1f72a 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -289,7 +289,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); } break; - case PSCREEN_APP; + case PSCREEN_APP: if (record->event.pressed) { return MACRO(D(LALT), T(PSCR), U(LALT)); } -- cgit v1.2.3 From dded79a412f6e93af2df7b96c2624980400680f4 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 31 May 2017 18:07:02 -0700 Subject: Update licensing on visualizer.c --- keyboards/ergodox/keymaps/333fred/visualizer.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'keyboards/ergodox/keymaps/333fred') diff --git a/keyboards/ergodox/keymaps/333fred/visualizer.c b/keyboards/ergodox/keymaps/333fred/visualizer.c index eaeea6b898..2a30562ae7 100644 --- a/keyboards/ergodox/keymaps/333fred/visualizer.c +++ b/keyboards/ergodox/keymaps/333fred/visualizer.c @@ -1,18 +1,5 @@ /* -Copyright 2017 Fred Sundvik - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . +Note: this is a modified copy of ../default/visualizer.c, originally licensed GPL. */ #include "simple_visualizer.h" -- cgit v1.2.3