From a398d2cece1ee69006cf26e9a86fbf38e1acb0d1 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 30 Sep 2018 22:06:29 -0700 Subject: Keymap: Add noroadsleft keymap for KC60 (#3876) * Add personal KC60 keymap * Update personal KC60 keymap * Keymap update 2018-05-30 01:53 UTC-7 * Added macro: T_PEEKR * Added macro for MacOS Select All; modified MacOS function layer * Added git branch-name macro * Added GitHub signature macro * Added readme files * Added Quake 2 and System layers * Refactored keymap readme * Refactored to add userspace files; added Colemak layer * Minor code cleanup; updated readme files * Reverted use of userspace Decided not to make use of the Userspace feature at this time. Reverted its addition, and updated the readme files where needed (they were linking to userspace files). * Updated per review comments by @drashna * Refactor buggy macros I'm still not sure these work properly * Fix Windows shortcuts * Fix Mac shortcuts, possibly Untested; still may be broken. * Remove PREVENT_STUCK_MODIFIERS from config.h Deprecated by #3107 --- keyboards/kc60/keymaps/noroadsleft/config.h | 8 + keyboards/kc60/keymaps/noroadsleft/keymap.c | 393 +++++++++++++++++++++++ keyboards/kc60/keymaps/noroadsleft/readme.md | 29 ++ keyboards/kc60/keymaps/noroadsleft/readme_ch1.md | 70 ++++ keyboards/kc60/keymaps/noroadsleft/readme_ch2.md | 26 ++ keyboards/kc60/keymaps/noroadsleft/readme_ch3.md | 39 +++ keyboards/kc60/keymaps/noroadsleft/readme_ch4.md | 54 ++++ keyboards/kc60/keymaps/noroadsleft/readme_ch5.md | 84 +++++ keyboards/kc60/keymaps/noroadsleft/readme_git.md | 56 ++++ keyboards/kc60/keymaps/noroadsleft/rules.mk | 2 + 10 files changed, 761 insertions(+) create mode 100644 keyboards/kc60/keymaps/noroadsleft/config.h create mode 100644 keyboards/kc60/keymaps/noroadsleft/keymap.c create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme_ch1.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme_ch2.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme_ch3.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme_ch4.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme_ch5.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/readme_git.md create mode 100644 keyboards/kc60/keymaps/noroadsleft/rules.mk (limited to 'keyboards/kc60') diff --git a/keyboards/kc60/keymaps/noroadsleft/config.h b/keyboards/kc60/keymaps/noroadsleft/config.h new file mode 100644 index 0000000000..e216d050b1 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define PERMISSIVE_HOLD // https://docs.qmk.fm/#/feature_advanced_keycodes?id=permissive-hold + +// Enable single-color backlighting +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 +#define BREATHING_PERIOD 4 diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c new file mode 100644 index 0000000000..f28f2144f0 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c @@ -0,0 +1,393 @@ +#include QMK_KEYBOARD_H +#include +//#include +#include + + +/********************** +** LAYER DEFINITIONS ** +**********************/ +enum layers_keymap { + // BASE LAYERS + _QWERTY = 0, + _DVORAK, + _COLEMAK, + _MAC, + _QUAKE2, + _QUAKE2_DVORAK, + _QUAKE2_CONSOLE, + + // FUNCTION LAYERS + _FUNCWIN, + _FUNCMAC, + _FUNCQ2, + + // OTHER LAYERS + _NUMPAD, + _MACROS, + _SYSTEM +}; + +// LAYER SHORT CODES +#define _QW _QWERTY +#define _DV _DVORAK +#define _CM _COLEMAK +#define _MC _MAC +#define _Q2 _QUAKE2 +#define _QD _QUAKE2_DVORAK +#define _QC _QUAKE2_CONSOLE +#define _FW _FUNCWIN +#define _FM _FUNCMAC +#define _FQ _FUNCQ2 +#define _NP _NUMPAD +#define _MA _MACROS +#define _SY _SYSTEM + + +// KEYCODE DEFINITIONS +#define NO_CHNG KC_TRNS // Note for me for keys I need to leave as Pass-through + +#define FW_CAPS LT(_FUNCWIN, KC_CAPS) // _FUNCWIN when held, Caps Lock when tapped +#define FM_CAPS LT(_FUNCMAC, KC_CAPS) // _FUNCMAC when held, Caps Lock when tapped +#define Q2_CAPS LT(_FUNCQ2, KC_CAPS) // _FUNCQ2 when held, Caps Lock when tapped + +#define WN_SALL LCTL(DV_A) // Windows/Linux Select All +#define WN_UNDO LCTL(DV_Z) // Windows/Linux Undo +#define WN_CUT LCTL(DV_X) // Windows/Linux Cut +#define WN_COPY LCTL(DV_C) // Windows/Linux Copy +#define WN_PSTE LCTL(DV_V) // Windows/Linux Paste + +#define MC_PSCR LGUI(LSFT(KC_3)) // MacOS Print Screen (Command + Shift + 3) +#define MC_HOME LGUI(KC_LEFT) // MacOS Home (Command + Left Arrow) +#define MC_END LGUI(KC_RGHT) // MacOS End (Command + Right Arrow) +#define MC_SALL LGUI(KC_A) // MacOS Select All +//#define MC_UNDO LGUI(KC_Z) // MacOS Undo // replaced by macro +#define MC_CUT LGUI(KC_X) // MacOS Cut +#define MC_COPY LGUI(KC_C) // MacOS Copy +//#define MC_PSTE LGUI(KC_V) // MacOS Paste // replaced by macro + + +// MACRO DEFINITIONS +enum custom_keycodes { + F_CAPS = SAFE_RANGE, + T_L3DED, + G_PUSH, + G_FTCH, + G_COMM, + G_RST, + G_C10R, + G_BRCH, + SIGNA, + GO_Q2, + Q2_ON, + Q2_OFF, + Q2_ESC, + Q2_GRV, + MC_UNDO, + MC_PSTE +}; + + +// define modifiers +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint8_t modifiers = get_mods(); + switch(keycode) { + // these are our macros! + case F_CAPS: + /* + Objective: write a macro that checks the current layers that are + enabled, and activates the appropriate function layer. + */ + if ( biton32(layer_state) == _MAC ) { + if (record->event.pressed) { + layer_on(_FUNCMAC); + } else { + layer_off(_FUNCMAC); + } + } else { + if (record->event.pressed) { + layer_on(_FUNCWIN); + } else { + layer_off(_FUNCWIN); + } + }; + return false; + break; + case T_L3DED: + if (record->event.pressed) { + SEND_STRING("lavak3DED "); + }; + return false; + break; + case G_PUSH: + if (record->event.pressed) { + SEND_STRING("git push origin "); + }; + return false; + break; + case G_FTCH: + if (record->event.pressed) { + SEND_STRING("git fetch upstream"); + }; + return false; + break; + case G_COMM: + if (record->event.pressed) { + SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT)); + layer_off(_MACROS); + }; + return false; + break; + case G_RST: + if (record->event.pressed) { + SEND_STRING("git histt -n 10" SS_TAP(X_ENTER) "git reset --soft "); + layer_off(_MACROS); + }; + return false; + break; + case G_C10R: + if (record->event.pressed) { + SEND_STRING("cf/"); + layer_off(_MACROS); + }; + return false; + break; + case G_BRCH: + if (record->event.pressed) { + SEND_STRING("$(git branch-name)"); + layer_off(_MACROS); + }; + return false; + break; + case SIGNA: + if (record->event.pressed) { + SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER)); + layer_off(_MACROS); + }; + return false; + break; + case GO_Q2: + if (record->event.pressed) { + //default_layer_set(_QWERTY); + layer_move(_QWERTY); // TO(_QWERTY); + layer_on(_QUAKE2); + //layer_off(_SYSTEM); + }; + return false; + break; + case Q2_ON: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER)); + layer_on(_DVORAK); + layer_on(_QUAKE2_DVORAK); + }; + return false; + break; + case Q2_OFF: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER)); + layer_move(_QWERTY); // TO(_QWERTY); + layer_on(_QUAKE2); + }; + return false; + break; + case Q2_ESC: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ESCAPE)); + layer_move(_QWERTY); // TO(_QWERTY); + layer_on(_QUAKE2); + }; + return false; + break; + case Q2_GRV: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_GRAVE)); + layer_on(_DVORAK); + layer_on(_QUAKE2_DVORAK); + layer_on(_QUAKE2_CONSOLE); + }; + return false; + break; + case MC_UNDO: + if (record->event.pressed) { + if ( modifiers & MODS_SHIFT_MASK ) { + SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); + } else { + SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) ); + } + }; + return false; + break; + case MC_PSTE: + if (record->event.pressed) { + if ( modifiers & MODS_SHIFT_MASK ) { + SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); + } else { + SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) ); + } + }; + return false; + break; + } // switch() + return true; +}; + + +// KEYMAPS +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /**************** + ** BASE LAYERS ** + ****************/ + + /* QWERTY */ + [_QWERTY] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + FW_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + ), + + /* Dvorak */ + [_DVORAK] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ + FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + ), + + /* Colemak */ + [_COLEMAK] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ + FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + ), + + /**************** + ** OS OVERLAYS ** + ****************/ + + /* Mac */ + [_MAC] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FM), _______ \ + ), + + /********************* + ** QUAKE 2 OVERLAYS ** + *********************/ + + /* Quake 2 */ + [_QUAKE2] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ + ), + + [_QUAKE2_DVORAK] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ + ), + + [_QUAKE2_CONSOLE] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ + ), + + /******************** + ** FUNCTION LAYERS ** + ********************/ + + /* Windows Fn layer */ + [_FUNCWIN] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \ + NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \ + _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \ + _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \ + ), + + /* MacOS Fn layer */ + [_FUNCMAC] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \ + NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \ + _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \ + _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \ + ), + + /* Quake 2 Fn layer */ + [_FUNCQ2] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \ + NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \ + _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ + ), + + /***************** + ** OTHER LAYERS ** + *****************/ + + /* Numpad layer */ + [_NUMPAD] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \ + _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \ + _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \ + _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \ + ), + + /* Macro layer */ + [_MACROS] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, G_RST, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ + _______, _______, _______, G_C10R, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ + ), + + /* System layer */ + [_SYSTEM] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \ + ), + +}; diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md new file mode 100644 index 0000000000..737fdc06bb --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme.md @@ -0,0 +1,29 @@ +# @noroadsleft's KC60 keymap + +### Last updated: September 2, 2018, 1:03 PM UTC-0700 + +![](https://i.imgur.com/tzhXQYI.jpg) + +I am a full-time Dvorak typist, and occasional semi-serious FPS gamer. The layers are oriented towards a mix of typing and gaming. + + +---- + +# Outline + +- [Base Layers](./readme_ch1.md) + - Layer 0: QWERTY `_QW` + - Layer 1: Hardware Dvorak `_DV` + - Layer 2: Hardware Colemak `_CM` +- [OS Overlays](./readme_ch2.md) + - Layer 3: MacOS Overlay `_MC` +- [Quake 2 Overlays](./readme_ch3.md) + - Layers 4, 5 and 6: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC` +- [Function Layers](./readme_ch4.md) + - Layer 7: Windows Fn layer `_FW` + - Layer 8: MacOS-oriented Fn layer `_FM` + - Layer 9: Quake 2 Fn layer `_FQ` +- [Other Layers](./readme_ch5.md) + - Layer 10: Numpad layer `_NP` + - Layer 11: Macro layer `_MA` + - Layer 12: System layer `_SY` diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md new file mode 100644 index 0000000000..bee0709f48 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md @@ -0,0 +1,70 @@ +# @noroadsleft's KC60 keymap + +- [Table of Contents](./readme.md) + 1. **Base Layers** + 2. [**OS Overlays**](./readme_ch2.md) + 3. [Quake 2 Overlays](./readme_ch3.md) + 4. [Function Layers](./readme_ch4.md) + 5. [Other Layers](./readme_ch5.md) + +### Last updated: September 2, 2018, 1:03 PM UTC-0700 + + +---- + +## Layer 0: QWERTY - `_QW` + +Standard QWERTY layout, with three QMK features: + +- The `Menu` key has been replaced by `MO(_FW)`, which moves to my Windows Fn layer when held. +- The `Caps Lock` key has been replaced with a dual function `LT()` key, which opens the Windows Fn layer when held, and is `Caps Lock` when tapped +- The `Escape` key has been replaced with a `KC_GESC` `` ` ~ `` key when used with a `Fn` key or a `Shift` key + +###### For the rest of this readme, the physical location of keys will be referred to by their function in a US QWERTY layout. + +![QWERTY layer](https://i.imgur.com/2eVsefw.png) + +Keycode(s) Sent | Notes +:---------------------------------------------------- | :---- +[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. +`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. +`MO(_FW)` | Opens the Windows Fn layer when held. + + +---- + +## Layer 1: Hardware Dvorak - `_DV` + +### Accessed by holding either `Fn` and tapping `/?` key, then tapping `2@`. + +A hardware-based Dvorak Simplified layout. At my weekend job, I use a shared computer that runs MacOS Sierra, in US QWERTY layout. In this layer, I can leave the system in QWERTY, plug my keyboard in, and still type in Dvorak. + +![Hardware Dvorak layer](https://i.imgur.com/a6hYedB.png) + +Keycode(s) Sent | Notes +:---------------------------------------------------- | :---- +[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. +`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. +`MO(_FW)` | Opens the Windows Fn layer when held. + + +---- + +## Layer 2: Hardware Colemak `_CM` + +### Accessed by holding either `Fn` and tapping `/?` key, then tapping `3#`. + +A hardware-based Colemak layout. Been thinking of trying it, so it's here. + +![Hardware Colemak layer](https://i.imgur.com/dbQ6HDW.png) + +Keycode(s) Sent | Notes +:---------------------------------------------------- | :---- +[`KC_GESC`](https://docs.qmk.fm/#/feature_grave_esc) | `Esc` when tapped alone, `` ` ~ `` when used with a `Shift` or `GUI` key. +`LT(_FW, KC_CAPS)` | Opens the Windows Fn layer when held; toggles Caps Lock when tapped. +`MO(_FW)` | Opens the Windows Fn layer when held. + + +---- + +Next Chapter: [OS Overlays](./readme_ch2.md) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md new file mode 100644 index 0000000000..75a4fc5244 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md @@ -0,0 +1,26 @@ +# @noroadsleft's KC60 keymap + +- [Table of Contents](./readme.md) + 1. [Base Layers](./readme_ch1.md) + 2. **OS Overlays** + 3. [Quake 2 Overlays](./readme_ch3.md) + 4. [Function Layers](./readme_ch4.md) + 5. [Other Layers](./readme_ch5.md) + +### Last updated: September 2, 2018, 1:03 PM UTC-0700 + + +---- + +## Layer 3: Layer 3: MacOS Overlay `_MC` + +### Toggled by holding either `Fn` and tapping `/?` key, then tapping `W`. + +This layer overrides the `Fn` keys on whichever base layer is currently enabled, sending the keyboard to the MacOS-oriented Fn layer `_FM`, instead of the Windows Fn layer `_FW`. + +![MacOS Overlay](https://i.imgur.com/lxsEVpm.png) + + +---- + +Next Chapter: [Quake 2 Overlays](./readme_ch3.md) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md new file mode 100644 index 0000000000..80549ba5ce --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md @@ -0,0 +1,39 @@ +# @noroadsleft's KC60 keymap + +- [Table of Contents](./readme.md) + 1. [Base Layers](./readme_ch1.md) + 2. [OS Overlays](./readme_ch2.md) + 3. **Quake 2 Overlays** + 4. [Function Layers](./readme_ch4.md) + 5. [Other Layers](./readme_ch5.md) + +### Last updated: September 2, 2018, 1:03 PM UTC-0700 + + +---- + +## Layers 4, 5 and 6: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC` + +### Accessed by holding either `Fn` key and tapping the `/?` key, then tapping `4$` + +These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method. + +I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L386), is a [macro](./keymap.c#L175-183) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. + +When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L184-L191) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L192-L199) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L200-L207) that cancels the sending of the message, and undoes the layers. + +I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet. + +### Layer 4: Quake 2 +![Quake 2](https://i.imgur.com/WEZ9p2u.png) + +### Layer 5: Quake 2 Dvorak +![Quake 2 Dvorak](https://i.imgur.com/rhugHN4.png) + +### Layer 6: Quake 2 Console +![Quake 2 Console](https://i.imgur.com/dRTAjcy.png) + + +---- + +Next Chapter: [Function Layers](./readme_ch4.md) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md new file mode 100644 index 0000000000..f1b50846d9 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md @@ -0,0 +1,54 @@ +# @noroadsleft's KC60 keymap + +- [Table of Contents](./readme.md) + 1. [Base Layers](./readme_ch1.md) + 2. [OS Overlays](./readme_ch2.md) + 3. [Quake 2 Overlays](./readme_ch3.md) + 4. **Function Layers** + 5. [Other Layers](./readme_ch5.md) + +### Last updated: September 2, 2018, 1:03 PM UTC-0700 + + +---- + +## Layer 7: Windows Fn layer - `_FW` + +### Accessed by holding either `Fn` key in Layer 0 + +Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are here. Also has keys for Calculator, Menu, Volume Control, and shortcuts for Select All, Undo, Cut, Copy, and Paste. Numpad Enter for when I'm working in Adobe Photoshop, because it treats Numpad Enter differently from the regular Enter key. + +![Windows Fn layer](https://i.imgur.com/XwCshcz.png) + + +---- + +## Layer 8: MacOS-oriented Fn layer - `_FM` + +### Accessed by holding either `Fn` key in Layer 1 + +Based on my Windows Fn layer, but swaps a few functions for a MacOS environment. Arrow, Navigation, and Function keys are basically unchanged from Layer 2. This layer enables using either `Fn` key as a sort of simulated `Command` key, which I find easier to reach and use. + +![MacOS-oriented Fn layer](https://i.imgur.com/Z11kRu2.png) + + +---- + +## Layer 9: Quake 2 Fn layer - `_FQ` + +### Accessed by holding either `Fn` key while either Quake 2 overlay is active. + +Based on the Windows function layer, but removes some functions that are pointless to have while in the game. + +![Quake 2 Fn layer](https://i.imgur.com/9PG7yWb.png) + +Keycode(s) Sent | Notes +:-------------------------------- | :---- +[`Q2_GRV`](./keymap.c#L208-L216) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. + + + + +---- + +Next Chapter: [Other Layers](./readme_ch5.md) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md new file mode 100644 index 0000000000..64102eb88d --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md @@ -0,0 +1,84 @@ +# @noroadsleft's KC60 keymap + +- [Table of Contents](./readme.md) + 1. [Base Layers](./readme_ch1.md) + 2. [OS Overlays](./readme_ch2.md) + 3. [Quake 2 Overlays](./readme_ch3.md) + 4. [Function Layers](./readme_ch4.md) + 5. **Other Layers** + +### Last updated: September 2, 2018, 1:03 PM UTC-0700 + + +---- + +## Layer 10: Numpad layer - `_NP` + +### Accessed by holding either `Fn` key and tapping `Space`, from any of the Base Layers + +Puts a Numpad on the right-hand side of the keyboard. A through F included for hexadecimal input. Tapping `Space` returns to the previous Base Layer. + +![Numpad layer](https://i.imgur.com/fKVRkGH.png) + + +---- + +## Layer 11: Macro layer - `_MA` + +### Accessed by holding the `Fn` key and tapping the right-side `Win` key + +Has some macros that I use in Git, and some frequently-typed strings. + +Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatically. + +![Macro layer](https://i.imgur.com/wgbsluI.png) + + +### Macros + +[![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0)](./keymap.c#L122-L127) +Inputs: `lavak3DED ` +Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). + +[G_PUSH](./keymap.c#L128-L133) +Inputs: `git push origin ` +Everything from here down is related to Git or GitHub. + +[G_FTCH](./keymap.c#L134-L139) +Inputs: `git fetch upstream` + +[G_COMM](./keymap.c#L140-L146) +Inputs: `git commit -m ""` `[Left]` +Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer. + +[G_RST](./keymap.c#L147-L153) +Inputs: `git histt -n 10`, Enter, `git reset --soft ` +Runs a [git alias](./readme_git.md) that shows my last ten commits, then readies a `git reset --soft`. For when I commit something too soon. Disables the Macro layer when complete. + +[G_C10R](./keymap.c#L154-L160) +Inputs: `cf/` +A branch prefix I use for my current work in QMK. Disables the Macro layer when finished. + +[G_BRCH](./keymap.c#L161-L167) +Inputs: `$(git branch-name)` +A [git alias](./readme_git.md) that returns the name of the current branch. Disables the Macro layer when finished. + +[SIGNA](./keymap.c#L168-L174) +Inputs: `\- @noroadsleft` `[Enter]` +Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished. + + +---- + +### Layer 12: System layer - `_SY` + +#### Accessed by holding either `Fn` key and tapping the `/?` key + +This is where I change my keyboard function. Base layer select on `1` through `3`, Backlight controls on `C` through `N`, Reset on `8*`, Debug on `0)`. + +![System layer](https://i.imgur.com/95ovTBn.png) + + +---- + +[Back to the index.](./) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md new file mode 100644 index 0000000000..585d9c8909 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md @@ -0,0 +1,56 @@ +# @noroadsleft's Git aliases + +[Return to the directory index.](./) + +``` +[alias] + # change branches + co = checkout + cob = checkout -b + + # sync master + sync = "!f() { if [ $(git branch-name) != "master" ]; then git checkout master; fi; git pull upstream master; git push origin master; }; f" + + # Return the last five commits on the branch, in a more compact format + hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset%n %w(100,0,3)%s%d [%an]%n\" --graph --date=iso-local -n 5 + histm = log --pretty=format:\"%C(yellow)%h%Creset %w(100,0,3)%s%d [%an]\" --graph --date=iso-local -n 5 + histt = log --pretty=format:\"%C(yellow)%h%Creset %<(88,trunc)%s [%an]\" --graph --date=iso-local -n 5 + histb = log --reverse --pretty=format:\"- %<(98,trunc)%s [%an]\" --date=iso-local -n 5 + + # compact diff + df = "diff --compact-summary" + + # Short-form status + st = "!git status --short" + + # Returns the name of the current branch + branch-name = "!git rev-parse --abbrev-ref HEAD" + + # short-form of the above + bn = "!git branch-name" + + po = "push origin ($(git branch-name))" + + # List the stashes + sl = "stash list" + + # Show the contents of a numbered stash + # Syntax: + # git st-show + st-show = "!f() { git stash show stash@{$1} -p; }; f" + + # Apply a stash, without deleting it from the list of stashes + # Syntax: + # git st-copy + st-copy = "!f() { git stash apply stash@{$1}; }; f" + + # Unstage a file + unstage = "reset HEAD" + + # Restore a file to the state it was in when checked out + restore = "checkout --" + + # Compare local master repo to its upstream branch. If anything is returned, local branch has diverged from upstream. + cm = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master --compact-summary; }; f" + cml = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master; }; f" +``` diff --git a/keyboards/kc60/keymaps/noroadsleft/rules.mk b/keyboards/kc60/keymaps/noroadsleft/rules.mk new file mode 100644 index 0000000000..9d78fc0fb3 --- /dev/null +++ b/keyboards/kc60/keymaps/noroadsleft/rules.mk @@ -0,0 +1,2 @@ +# https://github.com/qmk/qmk_firmware/issues/3448#issuecomment-406636125 +EXTRAFLAGS += -flto -- cgit v1.2.3