From fd0bd29a0a3f2de93a3e561007805fac67e7e0cd Mon Sep 17 00:00:00 2001 From: ishtob Date: Fri, 10 Aug 2018 11:30:21 -0400 Subject: Keymap: adding my personal userspace to QMK master (#3605) * Adding my personal planck keymap * Adding readme.md to my keymap * Create my userspace add users/ishtob/ * Moved macros off keymap macros now exsists in my userspace, moved them off keyboard specific keymaps * Create my userspace add users/ishtob/ * rebase from main QMK repo --- users/ishtob/config.h | 76 +++++++++++++++++++++++++++++++++++++++++++ users/ishtob/ishtob.c | 69 +++++++++++++++++++++++++++++++++++++++ users/ishtob/ishtob.h | 76 +++++++++++++++++++++++++++++++++++++++++++ users/ishtob/readme.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ users/ishtob/rules.mk | 7 ++++ 5 files changed, 315 insertions(+) create mode 100755 users/ishtob/config.h create mode 100644 users/ishtob/ishtob.c create mode 100644 users/ishtob/ishtob.h create mode 100644 users/ishtob/readme.md create mode 100755 users/ishtob/rules.mk (limited to 'users') diff --git a/users/ishtob/config.h b/users/ishtob/config.h new file mode 100755 index 0000000000..9c4a7ed8dd --- /dev/null +++ b/users/ishtob/config.h @@ -0,0 +1,76 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +//#define LEADER_TIMEOUT 300 +//#define BACKLIGHT_BREATHING +#define PREVENT_STUCK_MODIFIERS +//#define PERMISSIVE_HOLD +// #define QMK_KEYS_PER_SCAN 4 + +//audio clicky + //#define AUDIO_CLICKY + // to enable clicky on startup + //#define AUDIO_CLICKY_ON + //#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f + +/* ws2812 RGB LED +#define RGB_DI_PIN B5 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +*/ +#undef PLANCK_MIT_LAYOUT + +//#define MUON_LEFT + +#undef DEBOUNCE +#define DEBOUNCE 0 + +//rgb-reactive +//#define RGB_MATRIX_KEYPRESSES +//#define EECONFIG_RGB_MATRIX (uint32_t *)16 + +//skip usb startup check +//#define NO_USB_STARTUP_CHECK + + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + +#endif diff --git a/users/ishtob/ishtob.c b/users/ishtob/ishtob.c new file mode 100644 index 0000000000..1b847d6306 --- /dev/null +++ b/users/ishtob/ishtob.c @@ -0,0 +1,69 @@ +/* +Based on userspace written by @drashna 2017 +Copyright 2018 Hsian Chang @ishtob + +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 "ishtob.h" +#include "action.h" +#include "action_layer.h" +// #include "dynamic_macro.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + + +// 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) {} + +__attribute__ ((weak)) +void matrix_scan_keymap(void) {} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// Call user matrix init, then call the keymap's init function +void matrix_init_user(void) { + matrix_init_keymap(); +} + +// No global matrix scan code, so just run keymap's matix +// scan function +void matrix_scan_user(void) { + matrix_scan_keymap(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DFU: + if (record->event.pressed) { + clear_keyboard(); + reset_keyboard(); + } + return false; + break; + } + return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); +} + diff --git a/users/ishtob/ishtob.h b/users/ishtob/ishtob.h new file mode 100644 index 0000000000..2c47fce791 --- /dev/null +++ b/users/ishtob/ishtob.h @@ -0,0 +1,76 @@ +#ifndef USERSPACE +#define USERSPACE +#include "quantum.h" + +enum userspace_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, + DFU, + P_CITRIX, //these macro exsists in macros_private.c, which is excluded from git + P_MPASS, + P_META, + O_DAYRN, + O_RTQ6H, + O_3DRN, + O_AUTODC, + M_EMAIL, + M_EMAIL2 +}; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _PLOVER 5 +#define _FNLAYER 6 +#define _NUMLAY 7 +#define _MOUSECURSOR 8 +#define _ADJUST 16 + + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl +#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define LT_FN(kc) LT(_FNLAYER, kc) // L-ayer T-ap Function Layer +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise +#define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY +/* +enum userspace_layers { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _FNLAYER, + _NUMLAY, + _MOUSECURSOR, + _ADJUST +}; +*/ + + + +#endif // !USERSPACE \ No newline at end of file diff --git a/users/ishtob/readme.md b/users/ishtob/readme.md new file mode 100644 index 0000000000..5b7064de9e --- /dev/null +++ b/users/ishtob/readme.md @@ -0,0 +1,87 @@ +# Ishtob's userspace + +under developement + +# Secret Macros + +This section is a modified version of what @drashna did in his userspace: https://github.com/qmk/qmk_firmware/tree/master/users/drashna#secret-macros + +`macros_private.c` will be used if it exsists in the userspace folder during compiling. + +To get started, put the following in rules.mk. this will have the compiler include the macros_private.c file if it exsists. +``` +SRC += ishtob.c +ifneq ($(wildcard $(USER_PATH)/macros_private.c),"") + SRC += macros_private.c +endif +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif +``` + +Remember that all macro keycode has to be present in the header file (ishtob.h) to prevent error during compile. + +Next, you setup macros_private.c, ensure the keycodes are defined in ishtob.h (or your keymap.h). +Here is an example of my macros with the sensitive login information removed: +``` +#include "ishtob.h" //replace this with your userspace or keymap +#include "quantum.h" + +#pragma message "secret macros included" //debug line to let me know this file is included in the compile + +//this str is for the monthly password rotation per my workplace's security policy +char my_str[5] = "stuff"; + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + //my login macros + case P_CITRIX: + SEND_STRING("username"SS_TAP(X_TAB)"something"); + send_string(my_str); + return false; + case P_MPASS: + SEND_STRING("something"); + send_string(my_str); + return false; + case P_META: + SEND_STRING("metausername"); + return false; + //my work macros for the meta application + case O_RTQ6H: + SEND_STRING(SS_TAP(X_TAB)"0300"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"0900"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"1500"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"2100"SS_TAP(X_TAB)SS_LALT("o")); + return false; + case O_AUTODC: + SEND_STRING(SS_LALT("v")SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)"T"SS_TAP(X_TAB)"N"SS_LALT("s")); + return false; + case O_DAYRN: + SEND_STRING(SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)"1"SS_LALT("s")); + return false; + //Ops macros + case M_EMAIL: + SEND_STRING("privatemail@email.com"); + return false; + case M_EMAIL2: + SEND_STRING("workemail@work.com"); + return false; + } + } + return true; +} +``` + + +Finally, add the following to .git/info/exclude to prevent private macros from being committed to git. +``` +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +/users/ishtob/macros_private.c +``` + +# Special mentions + +special thanks to @drashna for helping me through quite a bit of these codes. \ No newline at end of file diff --git a/users/ishtob/rules.mk b/users/ishtob/rules.mk new file mode 100755 index 0000000000..d19e952667 --- /dev/null +++ b/users/ishtob/rules.mk @@ -0,0 +1,7 @@ +SRC += ishtob.c +ifneq ($(wildcard $(USER_PATH)/macros_private.c),"") + SRC += macros_private.c +endif +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif -- cgit v1.2.3 From c19d949b72844120fff5159bc7e637ada4dd2579 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Wed, 15 Aug 2018 17:38:41 -0500 Subject: Keymap: Revamp replicaJunction keymaps (#3589) * Revamp replicaJunction keymaps Updates both the replicaJunction Ergodox and Atreus keymaps and moves most of the logic into a new user directory. * Cleanup as requested in #3589 * Slightly increased TAPPING_TERM * Fixed typo in #pragma once * Fix TAPPING_TERM redefined in config.h * Add include of replicaJunction.h Due to the tap dance references, without this include, I was getting compiler errors about both internal QMK items like `qk_tap_dance_state_t` and constants defined in my replicaJunction.h file like TD_LAYER_TOGGLE. Also remove some commented-out code that defined an enum which has since moved to replicaJunction.h. --- users/replicaJunction/config.h | 72 +++++++++++++++ users/replicaJunction/readme.md | 14 +++ users/replicaJunction/replicaJunction.c | 149 ++++++++++++++++++++++++++++++++ users/replicaJunction/replicaJunction.h | 115 ++++++++++++++++++++++++ users/replicaJunction/rules.mk | 1 + 5 files changed, 351 insertions(+) create mode 100644 users/replicaJunction/config.h create mode 100644 users/replicaJunction/readme.md create mode 100644 users/replicaJunction/replicaJunction.c create mode 100644 users/replicaJunction/replicaJunction.h create mode 100644 users/replicaJunction/rules.mk (limited to 'users') diff --git a/users/replicaJunction/config.h b/users/replicaJunction/config.h new file mode 100644 index 0000000000..f3556c87ed --- /dev/null +++ b/users/replicaJunction/config.h @@ -0,0 +1,72 @@ +#pragma once + + +//////////////////////////////////////////////////////////////////////////////// +// Features That Can Be Enabled +// https://docs.qmk.fm/reference/config-options#features-that-can-be-enabled +//////////////////////////////////////////////////////////////////////////////// + +// Prevent modifiers from sticking when switching layers +// Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers +#define PREVENT_STUCK_MODIFIERS + + + +//////////////////////////////////////////////////////////////////////////////// +// Behaviors That Can Be Configured +// https://docs.qmk.fm/reference/config-options#behaviors-that-can-be-configured +//////////////////////////////////////////////////////////////////////////////// + +// MS the button needs to be held before a tap becomes a hold (default: 200) +#undef TAPPING_TERM +#define TAPPING_TERM 250 + +// Makes it easier for fast typists to use dual-role keys. See additional details here: +// https://docs.qmk.fm/features/advanced-keycodes#permissive-hold +#define PERMISSIVE_HOLD + +// MS after tapping the Leader key to listen for a sequence (default: 300) +#undef LEADER_TIMEOUT +#define LEADER_TIMEOUT 750 + +// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold +// (for example, if z becomes ctrl when you hold it, when this option isn't enabled, z rapidly +// followed by x actually sends Ctrl-x. That's bad.) +#define IGNORE_MOD_TAP_INTERRUPT + + + +//////////////////////////////////////////////////////////////////////////////// +// Mouse Key Options +// https://docs.qmk.fm/reference/config-options#mouse-key-options +//////////////////////////////////////////////////////////////////////////////// + +#ifdef MOUSEKEY_ENABLE +// Mouse key config + +// Frequency with which cursor movements are sent. Lower means more resolution / DPI. +// Default: 20 +// #undef MOUSEKEY_INTERVAL +// #define MOUSEKEY_INTERVAL 20 + +// MS after pressing the key before initial movement begins. Lower means quicker response. +// Default: 0 +// #undef MOUSEKEY_DELAY +// #define MOUSEKEY_DELAY 0 + +// MS it takes the cursor to accelerate to max speed +// Default: 60 +// #undef MOUSEKEY_TIME_TO_MAX +// #define MOUSEKEY_TIME_TO_MAX 60 + +// Maximum speed for the mouse keys +// Default: 7 +// #undef MOUSEKEY_MAX_SPEED +// #define MOUSEKEY_MAX_SPEED 7 + +// Delay before the mouse wheel +// Default: 0 +// #undef MOUSEKEY_WHEEL_DELAY +// #define MOUSEKEY_WHEEL_DELAY 0 + +#endif // MOUSEKEY_ENABLE diff --git a/users/replicaJunction/readme.md b/users/replicaJunction/readme.md new file mode 100644 index 0000000000..2a9cad2729 --- /dev/null +++ b/users/replicaJunction/readme.md @@ -0,0 +1,14 @@ +Copyright 2018 @ + +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 . \ No newline at end of file diff --git a/users/replicaJunction/replicaJunction.c b/users/replicaJunction/replicaJunction.c new file mode 100644 index 0000000000..f0bc59d257 --- /dev/null +++ b/users/replicaJunction/replicaJunction.c @@ -0,0 +1,149 @@ +#include "replicaJunction.h" +#include "version.h" + +#ifdef TAP_DANCE_ENABLE +void dance_layer(qk_tap_dance_state_t *state, void *user_data) +{ + uint8_t layer = biton32(layer_state); + + if (state->count >= 5) + { + // 5 or more taps resets the keyboard + reset_keyboard(); + } + #ifdef L_QWERTY + else if (state->count == 3) + { + // Triple tap changes to QWERTY layer + if (layer == L_QWERTY) + { + layer_off(L_QWERTY); + } + else + { + layer_on(L_QWERTY); + } + } + #endif + #ifdef L_NUM + else if (state->count == 2) + { + // Double tap toggles Number layer + if (layer == L_NUM) + { + layer_off(L_NUM); + } + else + { + layer_on(L_NUM); + } + } + #endif + else + { + // Single tap sends Escape, and also turns off layers + // That's mostly in case I get stuck and forget where I am + #ifdef L_NUM + layer_off(L_NUM); + #endif + #ifdef L_EXTEND + layer_off(L_EXTEND); + #endif + #ifdef L_SYMBOL + layer_off(L_SYMBOL); + #endif + #ifdef L_QWERTY + layer_off(L_QWERTY); + #endif + register_code(KC_ESC); + unregister_code(KC_ESC); + } +}; + +// Tap Dance Definitions +// Note - this needs to come AFTER the function is declared +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_LAYER_TOGGLE] = ACTION_TAP_DANCE_FN(dance_layer) +}; + +#endif // TAP_DANCE_ENABLE + +// These functions can be overridden in individual keymap files. +// This allows a user function to be shared for all my keyboards, while each +// keyboard can also have a keyboard-specific section. + +// Note that keymaps don't need to override these if there's nothing to +// override them with. +__attribute__ ((weak)) +void matrix_init_keymap(void) {} + +__attribute__ ((weak)) +void matrix_scan_keymap(void) {} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + #ifdef UNICODEMAP_ENABLE + // Set Unicode input to use WinCompose + // https://github.com/samhocevar/wincompose + set_unicode_input_mode(UC_WINC); + #endif // UNICODEMAP_ENABLE + + matrix_init_keymap(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + matrix_scan_keymap(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) + return true; + + switch(keycode) + { + case RJ_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP + #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) + ":dfu" + #elif defined(BOOTLOADER_HALFKAY) + ":teensy" + #elif defined(BOOTLOADER_CATERINA) + ":avrdude" + #endif // bootloader options + //SS_TAP(X_ENTER) + ); + return false; + case RJ_QMKV: + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + case RJ_EQ: + SEND_STRING("=="); + return false; + case RJ_NEQ: + SEND_STRING("!="); + return false; + case RJ_GEQ: + SEND_STRING(">="); + return false; + case RJ_LEQ: + SEND_STRING("<="); + return false; + case RJ_GEQR: + SEND_STRING("=>"); + return false; + case RJ_DUND: + SEND_STRING("$_"); + return false; + case RJ_SELS: + SEND_STRING("select *"); + return false; + } + + return process_record_keymap(keycode, record); +}; diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h new file mode 100644 index 0000000000..ab0e8ab3e3 --- /dev/null +++ b/users/replicaJunction/replicaJunction.h @@ -0,0 +1,115 @@ +#pragma once + +#include "quantum.h" + +/////////////////////////////////////////////////////////////////////////////// +// Keymap definitions +/////////////////////////////////////////////////////////////////////////////// + +// Layer definitions +// #define L_COLEMAK 0 +// #define L_QWERTY 1 +// #define L_NUM 2 +// #define L_EXTEND 3 +// #define L_FUNC 4 +// #define L_GAMING 5 +// #define L_SYMBOL 6 +// #define L_LL_R 7 +// #define L_LL_S 8 +// #define L_LL_E 9 +// #define L_LL_I 10 + +// Keyboard aliases +#define _______ KC_TRNS +#define ooooooo KC_TRNS + +#define MO_FUNC MO(L_FUNC) +#define TT_NUM TT(L_NUM) +#define TG_GAME TG(L_GAMING) +#define OSL_SYM OSL(L_SYMBOL) + +#define OSM_LSF OSM(MOD_LSFT) +#define OSM_RSF OSM(MOD_RSFT) + +#define KX_CTSF LCTL(KC_LSFT) +#define KX_STAB LSFT(KC_TAB) +#define KX_CGR LCTL(KC_GRV) +#define KX_PAST LCTL(LGUI(LALT(KC_V))) +#define KX_SRCH LCTL(LGUI(LALT(KC_S))) + +#define KX_BKNM LT(L_NUM, KC_BSPC) +#define KX_DCTL CTL_T(KC_DEL) +#define KX_NALT ALT_T(KC_ENT) +#define KX_ECTL CTL_T(KC_ESC) +#define KX_SPAC LT(L_EXTEND, KC_SPC) + +#define KX_Z_MT CTL_T(KC_Z) +#define KX_X_MT GUI_T(KC_X) +#define KX_C_MT MT(MOD_LCTL | MOD_LALT, KC_C) +#define KX_D_MT ALT_T(KC_D) + +#define KX_SLMT CTL_T(KC_SLSH) +#define KX_DOMT GUI_T(KC_DOT) +#define KX_COMT MT(MOD_LCTL | MOD_LALT, KC_COMM) +#define KX_H_MT ALT_T(KC_H) + +#ifdef L_LL_R + #define KC_R_LT LT(L_LL_R, KC_R) +#else + #define KC_R_LT KC_R +#endif + +#ifdef L_LL_S + #define KC_S_LT LT(L_LL_S, KC_S) +#else + #define KC_S_LT KC_S +#endif + +#ifdef L_LL_E + #define KC_E_LT LT(L_LL_E, KC_E) +#else + #define KC_E_LT KC_E +#endif + +#ifdef L_LL_I + #define KC_I_LT LT(L_LL_I, KC_I) +#else + #define KC_I_LT KC_I +#endif + +// "Macro" functions +enum userspace_custom_keycodes { + RJ_MAKE = SAFE_RANGE, // QMK make command + RJ_QMKV, // QMK version + RJ_EQ, // == + RJ_NEQ, // != + RJ_GEQ, // >= + RJ_LEQ, // <= + RJ_GEQR, // => ("greater than or equal - right") + RJ_DUND, // $_ + RJ_SELS, // select * (used for PowerShell) + RJ_MUTE, // Discord mute (GUI+Shift+M) + RJ_DEAF, // Discord deafen (GUI+Shift+D) + RJ_DOVR // Toggle Discord overlay (GUI+Shift+O) +}; + +// Mouse keys +#define M_UP KC_MS_UP +#define M_DOWN KC_MS_DOWN +#define M_LEFT KC_MS_LEFT +#define M_RIGHT KC_MS_RIGHT +#define M_LCLIK KC_MS_BTN1 +#define M_RCLIK KC_MS_BTN2 +#define M_MCLIK KC_MS_BTN3 +#define M_WHLUP KC_WH_U +#define M_WHLDN KC_WH_D + +// Used in macro definitions +#define TAP(code) register_code (code); unregister_code (code); + +// Tap Dance +#ifdef TAP_DANCE_ENABLE +#define TD_LAYER_TOGGLE 0 +extern void dance_layer(qk_tap_dance_state_t *state, void *user_data); +#define TD_LAYR TD(TD_LAYER_TOGGLE) +#endif // TAP_DANCE_ENABLE diff --git a/users/replicaJunction/rules.mk b/users/replicaJunction/rules.mk new file mode 100644 index 0000000000..30a330195d --- /dev/null +++ b/users/replicaJunction/rules.mk @@ -0,0 +1 @@ +SRC += replicaJunction.c -- cgit v1.2.3 From 9175eebc8796f31a481ba16b1ca2ba9e4432502e Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Fri, 17 Aug 2018 16:11:21 -0700 Subject: Keymap: Wanleg userspace (#3670) * configure wanleg userspace * additional layout support * additional layout support * userspace edits * fix swap hands between 30 and 40 percent * add additional keymaps * userspace edits * userspace configuration * userspace configuration * Update readme.md * userspace work * swap hands userspace fix * made requested edits * Update readme.md * use relative paths instead of copying file * Update wanleg.h * fixing layer order --- users/wanleg/config.h | 32 +++++ users/wanleg/readme.md | 14 +++ users/wanleg/rules.mk | 19 +++ users/wanleg/tapdances.c | 110 +++++++++++++++++ users/wanleg/wanleg.c | 158 ++++++++++++++++++++++++ users/wanleg/wanleg.h | 308 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 641 insertions(+) create mode 100644 users/wanleg/config.h create mode 100644 users/wanleg/readme.md create mode 100644 users/wanleg/rules.mk create mode 100644 users/wanleg/tapdances.c create mode 100644 users/wanleg/wanleg.c create mode 100644 users/wanleg/wanleg.h (limited to 'users') diff --git a/users/wanleg/config.h b/users/wanleg/config.h new file mode 100644 index 0000000000..22073449b2 --- /dev/null +++ b/users/wanleg/config.h @@ -0,0 +1,32 @@ +#ifndef USERSPACE_CONFIG_H +#define USERSPACE_CONFIG_H + +#define PREVENT_STUCK_MODIFIERS + +//TAPPING_TERM +#ifdef TAP_DANCE_ENABLE +#define TAPPING_TERM 200 +#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 + +#endif // !USERSPACE_CONFIG_H 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 . diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk new file mode 100644 index 0000000000..8dcc911cef --- /dev/null +++ b/users/wanleg/rules.mk @@ -0,0 +1,19 @@ +ifeq ($(strip $(KEYBOARD)), lets_split_rev2) +SRC += ../../keyboards/lets_split/lets_split.c +endif + +SRC += wanleg.c tapdances.c + +ifndef TAP_DANCE_ENABLE +TAP_DANCE_ENABLE = yes +endif + +ifndef MOUSEKEY_ENABLE +MOUSEKEY_ENABLE = yes +endif + +#If using a ProMicro and it has the QMK DFU bootloader instead of Caterina, +#run "make : dfu=qmk" when compiling to ensure it is flagged properly after being flashed +ifeq ($(strip $(dfu)), qmk) + BOOTLOADER = qmk-dfu +endif diff --git a/users/wanleg/tapdances.c b/users/wanleg/tapdances.c new file mode 100644 index 0000000000..318810b1b2 --- /dev/null +++ b/users/wanleg/tapdances.c @@ -0,0 +1,110 @@ +//Tap Dance Settings +#include "wanleg.h" + +///// 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 + // 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; + } + else return 6; //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 ///// +//instantialize an instance of 'tap' for the 'ENT' tap dance. +static tap ENTtap_state = { + .is_press_action = true, + .state = 0 +}; + +void ENT_finished (qk_tap_dance_state_t *state, void *user_data) { + ENTtap_state.state = cur_dance(state); + switch (ENTtap_state.state) { + case SINGLE_TAP: register_code(KC_SPC); break; + case SINGLE_HOLD: register_code(KC_LSFT); break; + case DOUBLE_TAP: register_code(KC_ENT); break; + case DOUBLE_HOLD: register_code(KC_NO); break; // setting double hold to do nothing (change this if you want) + case DOUBLE_SINGLE_TAP: register_code(KC_SPC); unregister_code(KC_SPC); register_code(KC_SPC); + //Last case is for fast typing. Assuming your key is `f`: + //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. + //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. + } +} + +void ENT_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (ENTtap_state.state) { + case SINGLE_TAP: unregister_code(KC_SPC); break; + case SINGLE_HOLD: unregister_code(KC_LSFT); break; + case DOUBLE_TAP: unregister_code(KC_ENT); break; + case DOUBLE_HOLD: unregister_code(KC_NO); + case DOUBLE_SINGLE_TAP: unregister_code(KC_SPC); + } + ENTtap_state.state = 0; +} + +//instanalize an instance of 'tap' for the 'DEL' tap dance. +static tap DELtap_state = { + .is_press_action = true, + .state = 0 +}; + +void DEL_finished (qk_tap_dance_state_t *state, void *user_data) { + DELtap_state.state = cur_dance(state); + switch (DELtap_state.state) { + case SINGLE_TAP: register_code(KC_BSPC); break; + case SINGLE_HOLD: register_code(KC_LCTL); break; + case DOUBLE_TAP: register_code(KC_DEL); break; + case DOUBLE_HOLD: register_code(KC_NO); break; + case DOUBLE_SINGLE_TAP: register_code(KC_BSPC); unregister_code(KC_BSPC); register_code(KC_BSPC); + } +} + +void DEL_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (DELtap_state.state) { + case SINGLE_TAP: unregister_code(KC_BSPC); break; + case SINGLE_HOLD: unregister_code(KC_LCTL); break; + case DOUBLE_TAP: unregister_code(KC_DEL); break; + case DOUBLE_HOLD: unregister_code(KC_NO); + case DOUBLE_SINGLE_TAP: unregister_code(KC_BSPC); + } + DELtap_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) + ,[ENT_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ENT_finished, ENT_reset) + ,[DEL_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, DEL_finished, DEL_reset) +}; + +//In Layer declaration, add tap dance item in place of a key code +//TD(TD_SFT_CAPS) \ No newline at end of file diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c new file mode 100644 index 0000000000..0175ae2010 --- /dev/null +++ b/users/wanleg/wanleg.c @@ -0,0 +1,158 @@ +#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 QWERTY75: + if (record->event.pressed) { + set_single_persistent_default_layer(QW75); + } + return false; + break; + case GHERKIN75: + if (record->event.pressed) { + set_single_persistent_default_layer(GK75); + } + 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 SUBTER75: + if (record->event.pressed) { + layer_on(SUB75); + } else { + layer_off(SUB75); + } + return false; + break; + case SUPRA75: + if (record->event.pressed) { + layer_on(SUP75); + } else { + layer_off(SUP75); + } + return false; + break; + case NUMBER75: + if (record->event.pressed) { + layer_on(NUM75); + } else { + layer_off(NUM75); + } + return false; + break; + case DIRECTION75: + if (record->event.pressed) { + layer_on(DIR75); + } else { + layer_off(DIR75); + } + return false; + break; + case ETCETERA75: + if (record->event.pressed) { + layer_on(ETC75); + } else { + layer_off(ETC75); + } + return false; + break; + case FUNCTION75: + if (record->event.pressed) { + layer_on(FN75); + } else { + layer_off(FN75); + } + return false; + break; + } + return true; +} diff --git a/users/wanleg/wanleg.h b/users/wanleg/wanleg.h new file mode 100644 index 0000000000..da14dcdf5a --- /dev/null +++ b/users/wanleg/wanleg.h @@ -0,0 +1,308 @@ +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" + +// Define layer names and order +#ifdef KEYBOARD_gherkin +enum userspace_layers { + gGK = 0, + gNUM, + gDIR, + gETC, + _GK, + _QW, + QW75, + GK75, + ONE, + SUB, + SUP, + NUM, + DIR, + ETC, + SUB75, + SUP75, + NUM75, + DIR75, + ETC75, + FN75 +}; +#elif KEYBOARD_xd75 +enum userspace_layers { + GK75 = 0, + QW75, + SUB75, + SUP75, + NUM75, + DIR75, + ETC75, + FN75, + gGK, + _GK, + _QW, + ONE, + SUB, + SUP, + NUM, + DIR, + ETC, + gNUM, + gDIR, + gETC, +}; +#else + enum userspace_layers { + _GK = 0, + _QW, + QW75, + GK75, + gGK, + ONE, + SUB, + SUP, + NUM, + DIR, + ETC, + gNUM, + gDIR, + gETC, + SUB75, + SUP75, + NUM75, + DIR75, + ETC75, + FN75 +}; +#endif + +enum userspace_custom_keycodes { + gGHERKIN = SAFE_RANGE, + GHERKIN, + QWERTY, + QWERTY75, + GHERKIN75, + ONEHAND, + SUBTER, + SUPRA, + NUMBER, + DIRECTION, + ETCETERA, + gNUMBER, + gDIRECTION, + gETCETERA, + SUBTER75, + SUPRA75, + NUMBER75, + DIRECTION75, + ETCETERA75, + FUNCTION75 + +}; + +//Tap Dance Declarations (list of my tap dance configurations) +#ifdef TAP_DANCE_ENABLE +enum { + TD_SFT_CAPS = 0 + ,TD_Q_ESC + ,ENT_TAP_DANCE + ,DEL_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_4x12_wrapper(...) LAYOUT_ortho_4x12(__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 | BKSC | + * | 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 | BKSC | + * | | | | | | | | | |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 | mScrUp | mScrDn | | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Sft//Cp| | | | | C-A-D | mScrL | mScrR | ALT | DEL | + * '-----------------------------------------------------------------------------------------' + */ +#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_U, KC_WH_D, _______, 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),_______, _______,_______, _______, 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 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | 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 | BKSC | 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, KC_DEL, KC_RCTL + +/* Qwerty + * .-------------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |-------+------+------+------+------+-------------+------+------+------+------+-------| + * | 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 | BKSC | | + * | | | | | | | | | | |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 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F11 | F12 | | | | ENTER | SHIFT | RGUI | ./ALT | BKSC | | + * | | | | | | | | | | |CTRLhold| | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | ENTER | SHIFT | RGUI | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ +#define _______________NUMBERS_Row_0_______________ _______, _______________Gherkin_NUM_0_______________, KC_DEL +#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)), _______, _______, _______, _______, _______ + +#endif // !USERSPACE -- cgit v1.2.3 From 8bc771a84247b59ab924cc241f455beec6384362 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Sat, 18 Aug 2018 19:38:44 -0700 Subject: Added arrow layout. --- users/333fred/333fred.h | 1 + 1 file changed, 1 insertion(+) (limited to 'users') diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h index 8599198a57..3b6f21133b 100644 --- a/users/333fred/333fred.h +++ b/users/333fred/333fred.h @@ -8,6 +8,7 @@ #define MDIA 3 // media keys #define VIM 4 #define GAME 5 +#define GAME_ARROW 6 // Tap dance config shared between my keyboards enum tap_dance_declarations { -- cgit v1.2.3 From 6d1536db1da117345156ed36255f10f235f0b915 Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Wed, 22 Aug 2018 20:16:49 -0700 Subject: Keymap: fix conditionals in userspace rules.mk (#3726) * fix conditionals in rules.mk * minor keymap change --- users/wanleg/rules.mk | 5 ----- 1 file changed, 5 deletions(-) (limited to 'users') diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk index 8dcc911cef..ac86769538 100644 --- a/users/wanleg/rules.mk +++ b/users/wanleg/rules.mk @@ -4,13 +4,8 @@ endif SRC += wanleg.c tapdances.c -ifndef TAP_DANCE_ENABLE TAP_DANCE_ENABLE = yes -endif - -ifndef MOUSEKEY_ENABLE MOUSEKEY_ENABLE = yes -endif #If using a ProMicro and it has the QMK DFU bootloader instead of Caterina, #run "make : dfu=qmk" when compiling to ensure it is flagged properly after being flashed -- cgit v1.2.3 From 2410f023598af65a551b42f569a2703a5621bdca Mon Sep 17 00:00:00 2001 From: ishtob Date: Mon, 27 Aug 2018 17:10:22 -0400 Subject: Fixes STM32F303XC timer issue for Planck Rev 6 (#3777) * Adding my personal planck keymap * Adding readme.md to my keymap * Create my userspace add users/ishtob/ * Moved macros off keymap macros now exsists in my userspace, moved them off keyboard specific keymaps * Create my userspace add users/ishtob/ * rebase from main QMK repo * fixed compile error with planck rev6 keymap * fixed compile error with planck rev6 keymap * Revert "Merge branch 'master' of https://github.com/ishtob/qmk_firmware" This reverts commit 6c8a9a6eec7ec311802338ea361099612182465d, reversing changes made to 5c598d9a53a7f794d5be283ac40ca97631ae5578. * fixed issue where compile errors if private macro file is not present * Revert "fixed issue where compile errors if private macro file is not present" This reverts commit e0035df48ffb9a95aa94e8339c58ef539e0449cf. * Fixed STM32 timer issue with Planck Rev6 with tap mods * Revert "fixed compile error with planck rev6 keymap" This reverts commit 5c598d9a53a7f794d5be283ac40ca97631ae5578. * Revert "Revert "fixed compile error with planck rev6 keymap"" This reverts commit c36896ca718f8b9bb3c653d7532797e9129477e3. * Fixed compile issues with my personal userspace and keymap utilizing the userspace --- users/ishtob/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users') diff --git a/users/ishtob/rules.mk b/users/ishtob/rules.mk index d19e952667..909502b50a 100755 --- a/users/ishtob/rules.mk +++ b/users/ishtob/rules.mk @@ -1,5 +1,5 @@ SRC += ishtob.c -ifneq ($(wildcard $(USER_PATH)/macros_private.c),"") +ifneq ("$(wildcard $(USER_PATH)/macros_private.c)","") SRC += macros_private.c endif ifeq ($(strip $(NO_SECRETS)), yes) -- cgit v1.2.3 From 444def8411d6ac67203c14ec92f8e33d77330895 Mon Sep 17 00:00:00 2001 From: Jacob Jerrell Date: Tue, 28 Aug 2018 18:48:41 -0500 Subject: Keymap: Bocaj - Create Userspace and Ergodox Layout (#3750) * Bocaj Layout Revamp * Pull in Upstream (#1) * Various tweaks for some Input:Club build processes * change KEYMAP to LAYOUT for all new keyboards made using this script * Add support for rev3 of the Atom47 (#2672) * Added support for rev3 of the Atom47 * Updated Atom47 readme's * Fix redefine error on rev2 and add maartenwut's keymap * Fix redefine error on LEdiodes keymap * Add Nyquist keymap (#2692) * nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr * Adds Phantom TKL support (#2696) * Add an info.json to phantom keyboard * Add layouts - KEYMAP_WINKEYLESS - KEYMAP_7BIT - KEYMAP_ISO - KEYMAP_ISO_WINKEYLESS * Add key_counts * Add 2 missing F-Row keys * Add TKC1800 info.json Created an info.json for the tkc1800. * Clueboard 60 info.json - adds - LAYOUT_60_ansi - LAYOUT_60_iso - KEYMAP_AEK - KEYMAP - LAYOUT_60_ansi_split_bs_rshift * Add the Speedo keyboard * Fix KC60 info.json file (#2707) * change KEYMAP to LAYOUT in all the KC60 files * Redo the info.json file * Small fixes to TKC1800 - adjust F-row to use 0.25 spacing - split left shift - add key_count * Fix some Configurator Warnings regarding LAYOUT vs KEYMAP (#2708) * change diverge 3 KC_KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for handwired arrow pad * change M10A to LAYOUT for m10-a * Change KC_KEYMAP to LAYOUT_kc and KEYMAP to LAYOUT for mf68 * change KC_KEYMAP to LAYOUT for nano * Refactor to LAYOUT * refactor to LAYOUT-ansi and LAYOUT_iso for s65 * LAYOUT conversions for lfkkeyboards * missed a few renames * mini1800 for lfkeyobards support of LAYOUT * Improve state/chord handling and clean up namespace Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false. * Pull information from config.h and rules.mk (#2711) * Pull information from config.h and rules.mk * Readd the kbd75 maintainer * Remove obsolete info.json entries (#2712) * Clean up some long-standing errors when populating the API (#2715) * More Configurator Warning Fixes (#2716) * mf68_ble did not have the correct .c and .h files * Fix JC65 KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for s60_x * Convert KEYMAP to LAYOUT for lets_split boards * Convert KEYMAP to LAYOUT * more fixes to keymap for iris * convert KEYMAP to LAYOUT for levinson keyboard * change losinggeneration's KEYMAP to LAYOUT * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for nyquist * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for viterbi * convert KEYMAP to LAYOUT * convert KEYMAP and its subsidiries to the LAYOUT standard * convert KEYMAP and its subsidiries to the new LAYOUT standard * Normacos keymap for let's split keyboard (#2691) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * hhkb jp personal keymap (#2698) * Add JJ40 Cockpit personal keymap (#2713) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Add readme for "major" keyboards to eliminate more QMK Configurator errors (#2718) * add readme to ktype keyboard * add readme to m10a * add readme to mini1800 * add readme to parent directory * Revert "Pull in Upstream (#1)" This reverts commit eeba0cec17ccb636e4225eed88aeae72b99f5e45. * Updates to Bocaj Files - Gave up on Tap Dance for ' -> ' + Added another 'Secret' + Add ' -> ' to the Swap Hands key + Add Swap Hands to the ' -> ' key + Made Hand Swapping a momentary toggle - Removed Auto Shift + Added Layer Toggle to KC_QUOTE for the _TOOLS layer - Disabled Tap Dance * Merge remote-tracking branch 'upstream/master' * Updates to Bocaj Added Game Layers, Removed Unused Macros * Removed 'secrets.h' * Updates to Bocaj Remove 'secrets'. Remove 'sendstring_workman.h' and set related layer back to qwerty due to macro compatibility issues * Total revisioning of keymap and layout structure * Missed readme.md file * Bocaj - Permissive Hold setting enabled * Switching from ErgoDox EZ centric configuration to the layout/user approach * Bocaj - Create Userspace and Ergodox layout * Update settings.json --- users/bocaj/bocaj.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++ users/bocaj/bocaj.h | 141 +++++++++++++++++++++++++++++++++++++ users/bocaj/config.h | 33 +++++++++ users/bocaj/readme.md | 14 ++++ users/bocaj/rules.mk | 5 ++ users/bocaj/tap_dances.c | 65 +++++++++++++++++ users/bocaj/tap_dances.h | 7 ++ 7 files changed,