From 9d6debd9b23ffb045f63bc77dd44cafe2c7ce851 Mon Sep 17 00:00:00 2001 From: Nathan Sharfi Date: Wed, 25 May 2016 17:25:04 -0700 Subject: Add double quote for everyone; update Zweihander --- keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c b/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c index e9963886be..91a60304a6 100644 --- a/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c +++ b/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c @@ -6,6 +6,13 @@ #define SYMB 1 // symbols #define MDIA 2 // media keys +#define SGWK 0 // "sagewick", ⌘S ⌘⇥ +#define SGWF 1 // "sagewick freshly", ⌘S ⌘⇥ ⌘R +#define BBED 2 // BBEdit +#define TMNL 3 // Terminal +#define SAFA 4 // Safari +#define ALFRED_LEAD_TIME 100 // time, in milliseconds, to let Alfred come to the fore and accept keyboard input + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -55,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | [ | ] | { | } | | | | | / | 7 | 8 | 9 | * | F12 | + * | | [ | ] | { | } | " | | | | / | 7 | 8 | 9 | * | F12 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | < | > | ( | ) | |------| |------| - | 4 | 5 | 6 | + | | + * | | < | > | ( | ) | ' |------| |------| - | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | & | 1 | 2 | 3 | = | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -75,8 +82,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = KEYMAP( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_TRNS,KC_TRNS, - KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_TRNS, + KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_DQUO,KC_TRNS, + KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_QUOT, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, -- cgit v1.2.3 From 376403276b21aac87c40367386183cdf524a3153 Mon Sep 17 00:00:00 2001 From: Nathan Sharfi Date: Wed, 25 May 2016 18:13:00 -0700 Subject: Add single and double quotes to numpad layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …as well as recover from a bunch of Git user errors. --- .../ergodox_ez/keymaps/zweihander-osx/keymap.c | 99 +++++++++++++++------- 1 file changed, 69 insertions(+), 30 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c b/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c index 91a60304a6..3444152bc3 100644 --- a/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c +++ b/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c @@ -17,15 +17,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ← | | → | 6 | 7 | 8 | 9 | 0 | - | + * | = | 1 | 2 | 3 | 4 | 5 | L1 | | L1 | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | ⌦ | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * | ⌦ | Q | W | E | R | T | ~L1 | | ~L1 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | ⌫ | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' / L⌘ | * |--------+------+------+------+------+------| L⌘ | | L⌘ |------+------+------+------+------+--------| * | L⇧ | Z | X | C | V | B | | | | N | M | , | . | / / ⌃| R⇧ | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | L⌃ | L⌥ | L⌘ | ← | → | | ↑ | ↓ | [ | ] | ~L1 | + * | L⌃ | L⌥ | L⌘ | ← | → | | ↑ | ↓ | [ | ] | | * `----------------------------------' `----------------------------------' * ,-------------. ,---------------. * | `~ | '" | | ⎋ | ⌫ | @@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB), + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT, @@ -48,11 +48,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_SPC,KC_BSPC,KC_LALT, // 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), - KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + 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, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_SPC , KC_ESC, KC_BSPC, KC_PGDN, KC_LCTL, KC_TAB, KC_ENT @@ -102,20 +102,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | ⌥⇧⇥ | ⌥⇥ | Power | + * | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | PgUp | | | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | | + * | | | | PgUp |⌘S⌘⇥⌘R| Term | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | Home | PgDn | End | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ | + * | | |Safari| PgDn | | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | |L⇧+Spc| Spc | ⏮ | ⏭ | | | + * | | | | | |BBEdit| | | |L⇧+Spc| Spc | ⏮ | ⏭ | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | Home | | End | | | * | | |------| |------| ⌘C | ⌘V | * | | | | | ⌘X | | | * `--------------------' `--------------------' @@ -123,15 +123,15 @@ 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_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END , KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, + KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), LALT(LSFT(KC_TAB)), LALT(KC_TAB), KC_PWR, + 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, @@ -146,23 +146,62 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; -// action_get_macro() is unused — remove the “#if 0” and “#endif” lines to reenable -#if 0 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; + case SGWK: + if (record->event.pressed) { + return MACRO( + I(10), + D(LGUI), T(S), U(LGUI), + D(LGUI), T(TAB), U(LGUI), + END); + } + break; + case SGWF: + if (record->event.pressed) { + return MACRO( + I(10), + D(LGUI), T(S), U(LGUI), + D(LGUI), T(TAB), U(LGUI), + D(LGUI), T(R), U(LGUI), + END); + } + break; + case BBED: + if (record->event.pressed) { + return MACRO( + I(10), + D(LALT), T(SPC), U(LALT), W(ALFRED_LEAD_TIME), + T(B), T(B), T(E), T(D), T(I), T(T), + T(ENT), + END); + } + break; + case TMNL: + if (record->event.pressed) { + return MACRO( + I(10), + D(LALT), T(SPC), U(LALT), W(ALFRED_LEAD_TIME), + T(T), T(E), T(R), T(M), T(I), T(N), T(A), T(L), + T(ENT), + END); + } + break; + case SAFA: + if (record->event.pressed) { + return MACRO( + I(10), + D(LALT), T(SPC), U(LALT), W(ALFRED_LEAD_TIME), + T(S), T(A), T(F), T(A), T(R), T(I), + T(ENT), + END); + } + break; } return MACRO_NONE; }; -#endif // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3