diff options
author | Alex Ong <the.onga@gmail.com> | 2019-01-04 19:39:14 +1100 |
---|---|---|
committer | Alex Ong <the.onga@gmail.com> | 2019-01-04 19:39:14 +1100 |
commit | 47c91fc7f75ae0a477e55b687aa0fc30da0a283c (patch) | |
tree | 65ad39452748ff2e6d4a83ce54ede6ca22c9ada9 /users/wanleg | |
parent | ac9b88e8ccbbf38762871504cd827ff0d941c426 (diff) | |
parent | 563ce3f225d981ce460c12ca5130dfe47af41df0 (diff) |
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'users/wanleg')
-rw-r--r-- | users/wanleg/config.h | 44 | ||||
-rw-r--r-- | users/wanleg/readme.md | 14 | ||||
-rw-r--r-- | users/wanleg/rules.mk | 39 | ||||
-rw-r--r-- | users/wanleg/tapdances.c | 264 | ||||
-rw-r--r-- | users/wanleg/wanleg.c | 139 | ||||
-rw-r--r-- | users/wanleg/wanleg.h | 309 |
6 files changed, 809 insertions, 0 deletions
diff --git a/users/wanleg/config.h b/users/wanleg/config.h new file mode 100644 index 0000000000..0c8b048af7 --- /dev/null +++ b/users/wanleg/config.h @@ -0,0 +1,44 @@ +#pragma once + +//TAPPING_TERM +//tapping term short (<100): on multi-purpose keys, slow taps may not register, but "holds" register easier. multi-tap keys may be difficult to activate. +//tapping term long (>200): holds don't register as easily - noticeable when typing quickly (e.g. shift doesn't want to engage.) + + +//MIGHT HAVE TO SPLIT THIS INTO TWO CONDITIONS +#if defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_lets_split_rev2) || defined(KEYBOARD_iris_rev2) +//Kailh Coppers activate quickly and don't need a long tapping term +#define TAPPING_TERM 100 + +#elif defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_bigswitch) +#define TAPPING_TERM 700 + +#else +#define TAPPING_TERM 145 +#endif + +//Mousekey Settings +#ifdef MOUSEKEY_ENABLE +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 +#endif + +// Disable action_get_macro and fn_actions, since we don't use these +// and it saves on space in the firmware. +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +#define NO_PRINT +#endif // !NO_PRINT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT + +// Disable mod tap interrrupt +#ifndef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT +#endif // !mod tap interrrupt
\ No newline at end of file diff --git a/users/wanleg/readme.md b/users/wanleg/readme.md new file mode 100644 index 0000000000..f687b92f48 --- /dev/null +++ b/users/wanleg/readme.md @@ -0,0 +1,14 @@ +Copyright 2018 Brian Fong @wanleg + +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 <http://www.gnu.org/licenses/>. diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk new file mode 100644 index 0000000000..b069cd8d38 --- /dev/null +++ b/users/wanleg/rules.mk @@ -0,0 +1,39 @@ +SRC += wanleg.c tapdances.c + +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes + +#If using a ProMicro and it has the QMK DFU bootloader instead of Caterina, +#run "make <keyboard>:<keymap> dfu=qmk" when compiling to ensure it is flagged properly after being flashed +ifeq ($(strip $(dfu)), qmk) + BOOTLOADER = qmk-dfu +endif + +#use alternate settings for boards using ProMicro instead of Micro +#example usage: make 4x4:wanleg PM=yes +ifeq ($(strip $(PM)), yes) + OPT_DEFS += -DPRO_MICRO +endif + +#use alternate settings for boards using "Adafruit Feather 32u4 Bluefruit LE" instead of Micro +#example usage: make 5x5:wanleg BT=yes +ifeq ($(strip $(BT)), yes) + #opt_defs for alternate pin usage + OPT_DEFS += -DBLUEFRUIT + #Adafruit Bluefruit controller settings + BLUETOOTH = AdafruitBLE + BLUETOOTH_ENABLE = yes + F_CPU = 8000000 + CONSOLE_ENABLE = no # Console for debug(+400) + COMMAND_ENABLE = no # Commands for debug and configuration + RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +endif + +#move numpad to Left/Centre/Right(default) on 5x15 boards +#example usage: make 4x4:wanleg padc=yes +ifeq ($(strip $(padc)), yes) + OPT_DEFS += -DPADC +endif +ifeq ($(strip $(padl)), yes) + OPT_DEFS += -DPADL +endif
\ No newline at end of file diff --git a/users/wanleg/tapdances.c b/users/wanleg/tapdances.c new file mode 100644 index 0000000000..1be5636dc7 --- /dev/null +++ b/users/wanleg/tapdances.c @@ -0,0 +1,264 @@ +//Tap Dance Settings +#include "wanleg.h" + +//audio settings for one of the tap dances below +#ifdef AUDIO_ENABLE + float lyrup_song[][2] = SONG(MUSIC_ON_SOUND); + float lyrdown_song[][2] = SONG(MUSIC_OFF_SOUND); +#endif + +///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION START ///// +///// (no need to edit this section) ///// +//Enums used to clearly convey the state of the tap dance +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //send SINGLE_TAP twice - NOT DOUBLE_TAP + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7, + TRIPLE_SINGLE_TAP = 8 + // Add more enums here if you want for triple, quadruple, etc. +}; + +typedef struct { + bool is_press_action; + int state; +} tap; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP + if (state->interrupted || !state->pressed) return SINGLE_TAP; + if (state->interrupted) return SINGLE_TAP; + else return SINGLE_HOLD; + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + + //If count = 3, and it has been interrupted - assume that user is trying to type the letter associated + //with double tap. + else if (state->count == 3) { + if (state->interrupted) return TRIPLE_SINGLE_TAP; + else if (state->pressed) return TRIPLE_HOLD; + else return TRIPLE_TAP; + } + else return 9; //magic number. At some point this method will expand to work for more presses +} +///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION END ///// +///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION START ///// +//instantiate 'tap' for the 'CAD' tap dance. +static tap CADtap_state = { + .is_press_action = true, + .state = 0 +}; + +void CAD_finished (qk_tap_dance_state_t *state, void *user_data) { + CADtap_state.state = cur_dance(state); + switch (CADtap_state.state) { + case SINGLE_TAP: + //register_code(KC_SPC); + SEND_STRING(SS_LGUI("l")); + #ifdef BACKLIGHT_ENABLE + backlight_level(3); + #endif + break; + case SINGLE_HOLD: + //register_code(KC_NO); + //take a screenshot of a single window, open Paint and paste + SEND_STRING(SS_LALT(SS_TAP(X_PSCREEN)) SS_LGUI("r")); + wait_ms(500); + SEND_STRING("mspaint" SS_TAP(X_ENTER)); + wait_ms(700); + SEND_STRING(SS_LCTRL("v")); + break; //register this keycode when button is held + case DOUBLE_TAP: + //register_code(KC_ENT); + SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_DELETE)))); + #ifdef BACKLIGHT_ENABLE + backlight_level(0); + #endif + break; + //case DOUBLE_HOLD: register_code(KC_NO); break; //register this keycode when button is tapped and then held + case DOUBLE_HOLD: + reset_keyboard(); + break; //register this keycode when button is tapped and then held + case TRIPLE_TAP: + SEND_STRING("wanleg@github.com"); + break; + case TRIPLE_HOLD: + set_single_persistent_default_layer(1); + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(lyrup_song); + #endif + break; + } +} + +void CAD_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (CADtap_state.state) { +//nothing to do + } + CADtap_state.state = 0; +} + +//instantiate 'tap' for the 'RST' tap dance. +static tap RSTtap_state = { + .is_press_action = true, + .state = 0 +}; + +void RST_finished (qk_tap_dance_state_t *state, void *user_data) { + RSTtap_state.state = cur_dance(state); + switch (RSTtap_state.state) { + case SINGLE_TAP: register_code(KC_LCTL); break; + case SINGLE_HOLD: register_code(KC_LCTL); break; + case DOUBLE_TAP: reset_keyboard(); break; + case DOUBLE_SINGLE_TAP: register_code(KC_LCTL); unregister_code(KC_LCTL); register_code(KC_LCTL); break; + } +} + +void RST_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (RSTtap_state.state) { + case SINGLE_TAP: unregister_code(KC_LCTL); break; + case SINGLE_HOLD: unregister_code(KC_LCTL); break; + case DOUBLE_SINGLE_TAP: unregister_code(KC_LCTL); break; + } + RSTtap_state.state = 0; +} + +//instantiate 'tap' for the 'LYR' tap dance. +static tap LYRtap_state = { + .is_press_action = true, + .state = 0 +}; + +void LYR_finished (qk_tap_dance_state_t *state, void *user_data) { + LYRtap_state.state = cur_dance(state); + switch (LYRtap_state.state) { + case SINGLE_TAP: register_code(KC_PSLS); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; + case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); + } +} + +void LYR_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (LYRtap_state.state) { + case SINGLE_TAP: unregister_code(KC_PSLS); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; + case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); + } + LYRtap_state.state = 0; +} + +//instantiate 'tap' for the 'LYR75' tap dance. +static tap LYR75tap_state = { + .is_press_action = true, + .state = 0 +}; + +void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) { + LYR75tap_state.state = cur_dance(state); + switch (LYR75tap_state.state) { + case SINGLE_TAP: register_code(KC_PSLS); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; + case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); + } +} + +void LYR75_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (LYR75tap_state.state) { + case SINGLE_TAP: unregister_code(KC_PSLS); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; + case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); + } + LYR75tap_state.state = 0; +} + +//instantiate 'tap' for the 'LYR50' tap dance. +static tap LYR50tap_state = { + .is_press_action = true, + .state = 0 +}; + +void LYR50_finished (qk_tap_dance_state_t *state, void *user_data) { + LYR50tap_state.state = cur_dance(state); + switch (LYR75tap_state.state) { + case SINGLE_TAP: register_code(KC_PSLS); break; + case DOUBLE_TAP: set_single_persistent_default_layer(GK50); break; + case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); + } +} + +void LYR50_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (LYR50tap_state.state) { + case SINGLE_TAP: unregister_code(KC_PSLS); break; + case DOUBLE_TAP: set_single_persistent_default_layer(GK50); break; + case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); + } + LYR50tap_state.state = 0; +} + +//instantiate 'tap' for the 'BSW' tap dance. +static tap BSWtap_state = { + .is_press_action = true, + .state = 0 +}; + +void BSW_finished (qk_tap_dance_state_t *state, void *user_data) { + BSWtap_state.state = cur_dance(state); + switch (BSWtap_state.state) { + case SINGLE_TAP: register_code(KC_ENTER); break; + case SINGLE_HOLD: + set_single_persistent_default_layer(0); + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(lyrdown_song); + #endif + break; + case DOUBLE_TAP: + register_code(KC_LCTRL); + register_code(KC_C); + break; + case DOUBLE_HOLD: + reset_keyboard(); + break; //register this keycode when button is tapped and then held + } +} + +void BSW_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (BSWtap_state.state) { + case SINGLE_TAP: unregister_code(KC_ENTER); break; + case DOUBLE_TAP: + unregister_code(KC_LCTRL); + unregister_code(KC_C); + break; + } + BSWtap_state.state = 0; +} + +///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION END ///// + +//Tap Dance Definitions +//THIS SECTION HAS TO BE AT THE END OF THE TAP DANCE SECTION +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) +// Other declarations would go here, separated by commas, if you have them + ,[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC) + ,[RST_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, RST_finished, RST_reset) + ,[CAD_TD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, CAD_finished, CAD_reset) + ,[LYR_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LYR_finished, LYR_reset) + ,[LYR75_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LYR75_finished, LYR75_reset) + ,[LYR50_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LYR50_finished, LYR50_reset) + ,[BSW_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, BSW_finished, BSW_reset) +}; + +//In Layer declaration, add tap dance item in place of a key code +//TD(TD_SFT_CAPS) diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c new file mode 100644 index 0000000000..274c74f728 --- /dev/null +++ b/users/wanleg/wanleg.c @@ -0,0 +1,139 @@ +#include "wanleg.h" + +// Defines actions for my global custom keycodes. Defined in wanleg.h file +// Then runs the _keymap's record handier if not processed here +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QW); + } + return false; + break; + case GHERKIN: + if (record->event.pressed) { + set_single_persistent_default_layer(_GK); + } + return false; + break; + case gGHERKIN: + if (record->event.pressed) { + set_single_persistent_default_layer(gGK); + } + return false; + break; + case ONEHAND: + if (record->event.pressed) { + set_single_persistent_default_layer(ONE); + } + return false; + break; + case NUMPAD: + if (record->event.pressed) { + set_single_persistent_default_layer(PAD); + } + return false; + break; + case GHERKIN50: + if (record->event.pressed) { + set_single_persistent_default_layer(GK50); + } + return false; + break; + case SUBTER: + if (record->event.pressed) { + layer_on(SUB); + } else { + layer_off(SUB); + } + return false; + break; + case SUPRA: + if (record->event.pressed) { + layer_on(SUP); + } else { + layer_off(SUP); + } + return false; + break; + case NUMBER: + if (record->event.pressed) { + layer_on(NUM); + } else { + layer_off(NUM); + } + return false; + break; + case DIRECTION: + if (record->event.pressed) { + layer_on(DIR); + } else { + layer_off(DIR); + } + return false; + break; + case ETCETERA: + if (record->event.pressed) { + layer_on(ETC); + } else { + layer_off(ETC); + } + return false; + break; + case gNUMBER: + if (record->event.pressed) { + layer_on(gNUM); + } else { + layer_off(gNUM); + } + return false; + break; + case gDIRECTION: + if (record->event.pressed) { + layer_on(gDIR); + } else { + layer_off(gDIR); + } + return false; + break; + case gETCETERA: + if (record->event.pressed) { + layer_on(gETC); + } else { + layer_off(gETC); + } + return false; + break; + case FUNCTION: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + break; + } + return true; +} + +/// Turn off LEDs on ProMicros of Let's Split /// +// LEDs only on by default on Let's Split +// Add reconfigurable functions here, for keymap customization +// This allows for a global, userspace functions, and continued +// customization of the keymap. Use _keymap instead of _user +// functions in the keymaps +__attribute__ ((weak)) +void matrix_init_keymap(void) {} + +// Call user matrix init, then call the keymap's init function +void matrix_init_user(void) { +#if defined(KEYBOARD_lets_split_rev2) + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +#endif + matrix_init_keymap(); +}
\ No newline at end of file diff --git a/users/wanleg/wanleg.h b/users/wanleg/wanleg.h new file mode 100644 index 0000000000..9d07760a7b --- /dev/null +++ b/users/wanleg/wanleg.h @@ -0,0 +1,309 @@ +#pragma once + +#include "quantum.h" + +// Define layer names and order +#ifdef KEYBOARD_gherkin +enum userspace_layers { + gGK = 0, + gNUM, + gDIR, + gETC, + _GK, + _QW, + ONE, + SUB, + SUP, + NUM, + DIR, + ETC, + _FN, + PAD, + GK50, +}; +#elif KEYBOARD_40percentclub_5x5 +enum userspace_layers { + GK50 = 0, + _GK, + _QW, + PAD, + gNUM, + gDIR, + gETC, + gGK, + ONE, + SUB, + SUP, + NUM, + DIR, + ETC, + _FN, +}; +#else + enum userspace_layers { + _GK = 0, + _QW, + PAD, + ONE, + SUB, + SUP, + NUM, + DIR, + ETC, + gGK, + gNUM, + gDIR, + gETC, + _FN, + GK50, +}; +#endif + +enum userspace_custom_keycodes { + gGHERKIN = SAFE_RANGE, + GHERKIN, + QWERTY, + ONEHAND, + SUBTER, + SUPRA, + NUMBER, + DIRECTION, + ETCETERA, + gNUMBER, + gDIRECTION, + gETCETERA, + FUNCTION, + NUMPAD, + GHERKIN50, + +}; + +//Tap Dance Declarations (list of my tap dance configurations) +#ifdef TAP_DANCE_ENABLE +enum { + TD_SFT_CAPS = 0 + ,TD_Q_ESC + ,CAD_TD + ,RST_TAP_DANCE + ,LYR_TAP_DANCE + ,LYR50_TAP_DANCE + ,LYR75_TAP_DANCE + ,BSW_TAP_DANCE +}; +#endif + +// Since our quirky block definitions are basically a list of comma separated +// arguments, we need a wrapper in order for these definitions to be +// expanded before being used as arguments to the LAYOUT_xxx macro. +#if (!defined(LAYOUT) && defined(KEYMAP)) +#define LAYOUT KEYMAP +#endif + +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ortho_3x10_wrapper(...) LAYOUT_ortho_3x10(__VA_ARGS__) +#define LAYOUT_ortho_4x4_wrapper(...) LAYOUT_ortho_4x4(__VA_ARGS__) +#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) +#define LAYOUT_ortho_5x5_wrapper(...) LAYOUT_ortho_5x5(__VA_ARGS__) +#define LAYOUT_ortho_5x10_wrapper(...) LAYOUT_ortho_5x10(__VA_ARGS__) +#define LAYOUT_ortho_5x15_wrapper(...) LAYOUT_ortho_5x15(__VA_ARGS__) + +// Blocks for each of the major keyboard layouts +// Organized so we can quickly adapt and modify all of them +// at once, rather than for each keyboard, one at a time. +// And this allows for much cleaner blocks in the keymaps. + +// NOTE: These are all the same length. If you do a search/replace +// then you need to add/remove underscores to keep the +// lengths consistent. + + +/* Pure Gherkin + * .-----------------------------------------------------------------------------------------. + * | Q//ESC | W | E | R | T | Y | U | I | O | P | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | A | S | D | F | G | H | J | K | L | SPACE | + * | | | | | | | | | |SFThold | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Z | X | C | V/gNUM | B/gETC | N | M/gDIR | ,/GUI | ./ALT | BSPC | + * | SFThold| | | | | | | | |CTRLhold| + * '-----------------------------------------------------------------------------------------' + */ +#define _______________Gherkin_Row_0_______________ TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P +#define _______________Gherkin_Row_1_______________ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SPC) +#define _______________Gherkin_Row_2_______________ SFT_T(KC_Z), KC_X, KC_C, LT(gNUM,KC_V), LT(gETC,KC_B), KC_N, LT(gDIR,KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) + +/* Directional Keys + * .-----------------------------------------------------------------------------------------. + * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | P-Brk | | | | | | | RGUI | ALT | / | + * '-----------------------------------------------------------------------------------------' + */ +#define _______________Gherkin_DIR_0_______________ KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL +#define _______________Gherkin_DIR_1_______________ KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC +#define _______________Gherkin_DIR_2_______________ KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_LALT, KC_SLSH + +/* Numbers + * .-----------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | F11 | F12 | | | | ENTER | SHIFT | GUI | ./ALT | BSPC | + * | | | | | | | | | |CTRLhold| + * '-----------------------------------------------------------------------------------------' + */ +#define _______________Gherkin_NUM_0_______________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 +#define _______________Gherkin_NUM_1_______________ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 +#define _______________Gherkin_NUM_2_______________ KC_F11, KC_F12, _______,_______, _______, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC) + +/* Et Cetera + * .-----------------------------------------------------------------------------------------. + * | ` | mUP | | | RESET | SHIFT | mScrDn | mScrUp | | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Sft//Cp| CAPS | | | | C-A-D | mScrL | mScrR | ALT | DEL | + * '-----------------------------------------------------------------------------------------' + */ +#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_D, KC_WH_U, _______, KC_BSLS +#define _______________Gherkin_ETC_1_______________ KC_MS_L, KC_MS_D, KC_MS_R,_______, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT +#define _______________Gherkin_ETC_2_______________ TD(TD_SFT_CAPS),KC_CAPS, _______,_______, _______, LALT(LCTL(KC_DEL)), KC_WH_L, KC_WH_R, KC_LALT, KC_DEL + +/* Gherkin-Like + * .-----------------------------------------------------------------------------------------------------------. + * | ESC | Q//ESC | W | E | R | T | Y | U | I | O | P | BSPC | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | A | S | D | F | G | H | J | K | L | SPACE | ' | + * | | | | | | | | | | |SFThold | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * |SFT/CAPS| Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BSPC | ENT/SFT| + * | |SFThold | | | | | | | | |CTRLhold| | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | LGUI | ALT | ONEHAND| NUM | ETC | SPACE | DIR | RGUI | ALT | DEL | CTRL | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define _______________GherkinLike_0_______________ KC_ESC, _______________Gherkin_Row_0_______________, KC_BSPC +#define _______________GherkinLike_1_______________ KC_TAB, _______________Gherkin_Row_1_______________, KC_QUOT +#define _______________GherkinLike_2_______________ TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V),LT(ETC, KC_B),KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT) +#define _______________GherkinLike_3_______________ KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL +#define _______________GherkinLike_3_OneHand_______ KC_LCTL, KC_LGUI, KC_LALT, ONEHAND, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, ONEHAND, KC_RCTL + +/* Qwerty + * .-------------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | BSPC | + * |-------+------+------+------+------+-------------+------+------+------+------+-------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |-------+------+------+------+------+------|------+------+------+------+------+-------| + * |Sft/Cps| Z | X | C | V | B | N | M | , | . | / |ENT/SFT| + * |-------+------+------+------+------+------+------+------+------+------+------+-------| + * | LCTRL | LGUI | ALT | ALT | SUB | SHIFT| SPACE| SUP | RGUI | RALT | DEL | CTRL | + * '-------------------------------------------------------------------------------------' + */ +#define _______________Qwerty_Row__0_______________ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC +#define _______________Qwerty_Row__1_______________ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT +#define _______________Qwerty_Row__2_______________ TD(TD_SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) +#define _______________Qwerty_Row__3_______________ KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, SUBTER, KC_LSFT, KC_SPC, SUPRA, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL + +/* SUPRA + * .-----------------------------------------------------------------------------------------------------------. + * | RESET | TAB | up | | INS | CTRL | SHIFT | PgUp | Home | - | = | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | left | down | right | PrScr | SHIFT | CTRL | PgDn | End | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | P-Brk | | | | | | | RGUI | ALT | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define ________________SUPRA_Row_0________________ RESET, KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_DEL +#define ________________SUPRA_Row_1________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC, KC_BSLS +#define ________________SUPRA_Row_2________________ _______, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, _______ +#define ________________SUPRA_Row_3________________ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + +/* SUBTER + * .-----------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F11 | F12 | | | | | | RGUI | ./ALT | BSPC | | + * | | | | | | | | | | |CTRLhold| | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | gherkin| | | | ENTER | SHIFT | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define _______________SUBTER_Row__0_______________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL +#define _______________SUBTER_Row__1_______________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______ +#define _______________SUBTER_Row__2_______________ _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_RGUI,ALT_T(KC_DOT), CTL_T(KC_BSPC), _______ +#define _______________SUBTER_Row__3_______________ _______, _______, GHERKIN, _______, _______, _______, KC_ENT, KC_LSFT, _______,_______, _______, _______ + +/* Gherkin Numbers + * .-----------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | BSPC | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F11 | F12 | | | | ENTER | SHIFT | RGUI | ./ALT | BSPC | | + * | | | | | | | | | | |CTRLhold| | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | ENTER | SHIFT | RGUI | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define _______________NUMBERS_Row_0_______________ _______, _______________Gherkin_NUM_0_______________, KC_BSPC +#define _______________NUMBERS_Row_1_______________ _______, _______________Gherkin_NUM_1_______________, _______ +#define _______________NUMBERS_Row_2_______________ _______, _______________Gherkin_NUM_2_______________, _______ +#define _______________NUMBERS_Row_3_______________ _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, KC_RGUI, _______, _______, _______ + + +/* Gherkin Directional Keys + * .-----------------------------------------------------------------------------------------------------------. + * | | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | P-Brk | | | | | | | RGUI | ALT | / | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | qwerty | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define _____________DIRECTIONS_Row__0_____________ _______, _______________Gherkin_DIR_0_______________, KC_DEL +#define _____________DIRECTIONS_Row__1_____________ _______, _______________Gherkin_DIR_1_______________, _______ +#define _____________DIRECTIONS_Row__2_____________ _______, _______________Gherkin_DIR_2_______________, _______ +#define _____________DIRECTIONS_Row__3_____________ _______, _______, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______ + +/* Gherkin Et Cetera + * .-----------------------------------------------------------------------------------------------------------. + * | | ` | mUP | | | RESET | SHIFT | mScrUp |mScrDown| | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Sft//Cp| | | | | C-A-D |mScrLeft| mScrRt | ALT | DEL | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | C-A-D | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define ______________ETCETERA_Row__0______________ _______, _______________Gherkin_ETC_0_______________, KC_DEL +#define ______________ETCETERA_Row__1______________ _______, _______________Gherkin_ETC_1_______________, _______ +#define ______________ETCETERA_Row__2______________ _______, _______________Gherkin_ETC_2_______________, _______ +#define ______________ETCETERA_Row__3______________ _______, _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), _______, _______, _______, _______, _______ + +/* Single 4x4 board only + * .-----------------------------------. + * | 7 | 8 | 9 | BSPC | + * |--------+--------+--------+--------| + * | 4 | 5 | 6 | SPACE | + * |--------+--------+--------+--------| + * | 1 | 2 | 3 | ENTER | + * |--------+--------+--------+--------| + * | 0 |/ //_GK | . | - | + * '-----------------------------------' + */ + +#define _______________NUMPAD_Row__0_______________ KC_KP_7, KC_KP_8, KC_KP_9, KC_BSPC +#define _______________NUMPAD_Row__1_______________ KC_KP_4, KC_KP_5, KC_KP_6, KC_SPC +#define _______________NUMPAD_Row__2_______________ KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT +#define _______________NUMPAD_Row__3_______________ KC_KP_0, TD(LYR_TAP_DANCE), KC_KP_DOT, KC_PMNS |