aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c73
-rw-r--r--keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c42
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/keymap.c62
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme.md132
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_ch1.md48
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_ch2.md36
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_ch3.md40
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_ch4.md110
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_git.md79
-rw-r--r--users/noroadsleft/noroadsleft.c46
-rw-r--r--users/noroadsleft/noroadsleft.h2
-rw-r--r--users/noroadsleft/readme.md65
12 files changed, 296 insertions, 439 deletions
diff --git a/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c
new file mode 100644
index 000000000..6ad9dd1d3
--- /dev/null
+++ b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c
@@ -0,0 +1,73 @@
1/* Copyright 2021 James Young (@noroadsleft)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "noroadsleft.h"
18#include "sendstring_dvorak.h"
19
20enum layer_names {
21 _QW,
22 _DV,
23 _NP,
24 _FN,
25 _SY
26};
27
28#define FN_CAPS LT(_FN, KC_CAPS)
29#define CTL_GRV MT(MOD_LCTL, KC_GRV)
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33 [_QW] = LAYOUT_65_ansi(
34 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_HOME,
35 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, KC_PGUP,
36 FN_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_PGDN,
37 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_UP, KC_END,
38 CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
39 ),
40
41 [_DV] = LAYOUT_65_ansi(
42 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_HOME,
43 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, KC_PGUP,
44 FN_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_PGDN,
45 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_UP, KC_END,
46 CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
47 ),
48
49 [_NP] = LAYOUT_65_ansi(
50 _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, _______,
51 _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, _______,
52 _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, _______,
53 _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, _______, _______,
54 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
55 ),
56
57 [_FN] = LAYOUT_65_ansi(
58 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_PSCR,
59 _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, _______,
60 _______, M_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______,
61 _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TO(_SY), _______, _______, _______,
62 _______, _______, _______, TG(_NP), _______, _______, _______, _______, _______, _______
63 ),
64
65 [_SY] = LAYOUT_65_ansi(
66 TG(_SY), TO(_QW), TO(_DV), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, XXXXXXX,
67 XXXXXXX, XXXXXXX, M_MDSWP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
68 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
69 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
70 XXXXXXX, XXXXXXX, XXXXXXX, TG(_NP), XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
71 )
72
73};
diff --git a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c
index c08e513a7..1648224fd 100644
--- a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c
+++ b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c
@@ -1,4 +1,4 @@
1/* Copyright 2020 James Young (@noroadsleft) 1/* Copyright 2020-2021 James Young (@noroadsleft)
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
@@ -114,31 +114,6 @@ bool led_update_user(led_t led_state) {
114 114
115bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 115bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
116 switch (keycode) { 116 switch (keycode) {
117 case G_PUSH:
118 if (record->event.pressed) {
119 SEND_STRING("git push origin ");
120 };
121 return false;
122 case G_FTCH:
123 if (record->event.pressed) {
124 if ( get_mods() & MOD_MASK_SHIFT ) {
125 clear_mods();
126 SEND_STRING("git pull upstream ");
127 } else {
128 SEND_STRING("git fetch upstream ");
129 }
130 };
131 return false;
132 case G_BRCH:
133 if (record->event.pressed) {
134 if ( get_mods() & MOD_MASK_SHIFT ) {
135 clear_mods();
136 SEND_STRING("master");
137 } else {
138 SEND_STRING("$(git branch-name)");
139 }
140 };
141 return false;
142 case GO_Q2: 117 case GO_Q2:
143 if (record->event.pressed) { 118 if (record->event.pressed) {
144 layer_move(_QW); 119 layer_move(_QW);
@@ -191,21 +166,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
191 } 166 }
192 }; 167 };
193 return true; 168 return true;
194 case KC_Z:
195 if (record->event.pressed) {
196 if ( get_mods() & MOD_MASK_RALT ) {
197 register_code(KC_NUBS);
198 } else {
199 register_code(KC_Z);
200 }
201 } else {
202 if ( get_mods() & MOD_MASK_RALT ) {
203 unregister_code(KC_NUBS);
204 } else {
205 unregister_code(KC_Z);
206 }
207 };
208 return false;
209 default: 169 default:
210 return true; 170 return true;
211 } 171 }
diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c
index 5ad100e0e..f69371061 100644
--- a/keyboards/kc60/keymaps/noroadsleft/keymap.c
+++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c
@@ -1,4 +1,4 @@
1/* Copyright 2018-2020 James Young (@noroadsleft) 1/* Copyright 2018-2021 James Young (@noroadsleft)
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
@@ -40,11 +40,7 @@ enum layer_names {
40 40
41 41
42// KEYCODE DEFINITIONS 42// KEYCODE DEFINITIONS
43#define NO_CHNG KC_TRNS // Note for me for keys I need to leave as Pass-through
44
45#define FN_CAPS LT(_FN, KC_CAPS) // Function Layer when held, Caps Lock when tapped 43#define FN_CAPS LT(_FN, KC_CAPS) // Function Layer when held, Caps Lock when tapped
46#define Q2_CAPS LT(_FQ, KC_CAPS) // Quake 2 Function Layer when held, Caps Lock when tapped
47
48#define CTL_GRV MT(MOD_LCTL, KC_GRV) // Left Control when held, Grave accent when tapped 44#define CTL_GRV MT(MOD_LCTL, KC_GRV) // Left Control when held, Grave accent when tapped
49 45
50 46
@@ -58,7 +54,6 @@ enum custom_keycodes {
58/******************* 54/*******************
59** MODIFIER MASKS ** 55** MODIFIER MASKS **
60*******************/ 56*******************/
61#define MOD_MASK_RALT (MOD_BIT(KC_RALT))
62unsigned char q2InputMode = 0; 57unsigned char q2InputMode = 0;
63 58
64 59
@@ -118,51 +113,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
118 } 113 }
119 }; 114 };
120 return false; 115 return false;
121 case KC_Z:
122 if (record->event.pressed) {
123 if ( get_mods() & MOD_MASK_RALT ) {
124 register_code(KC_NUBS);
125 } else {
126 register_code(KC_Z);
127 }
128 } else {
129 if ( get_mods() & MOD_MASK_RALT ) {
130 unregister_code(KC_NUBS);
131 } else {
132 unregister_code(KC_Z);
133 }
134 };
135 return false;
136 case KC_1 ... KC_0:
137 if (record->event.pressed) {
138 if ( get_mods() & MOD_MASK_RALT ) {
139 register_code( keycode + 0x3B );
140 } else {
141 register_code( keycode );
142 }
143 } else {
144 if ( get_mods() & MOD_MASK_RALT ) {
145 unregister_code( keycode + 0x3B );
146 } else {
147 unregister_code( keycode );
148 }
149 }
150 return false;
151 case KC_F1 ... KC_F12:
152 if (record->event.pressed) {
153 if ( get_mods() & MOD_MASK_RALT ) {
154 register_code( keycode + 0x2E );
155 } else {
156 register_code( keycode );
157 }
158 } else {
159 if ( get_mods() & MOD_MASK_RALT ) {
160 unregister_code( keycode + 0x2E );
161 } else {
162 unregister_code( keycode );
163 }
164 }
165 return false;
166 } // switch() 116 } // switch()
167 return true; 117 return true;
168}; 118};
@@ -223,9 +173,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
223 [_FN] = LAYOUT_60_ansi( 173 [_FN] = LAYOUT_60_ansi(
224 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, 174 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,
225 _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, 175 _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS,
226 NO_CHNG, M_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, 176 _______, M_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT,
227 _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, 177 _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______,
228 _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ 178 _______, _______, _______, TG(_NP), _______, _______, _______, _______
229 ), 179 ),
230 180
231 /***************** 181 /*****************
@@ -238,7 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
238 _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, 188 _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______,
239 _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, 189 _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT,
240 _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, 190 _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______,
241 _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ 191 _______, _______, _______, TG(_NP), _______, _______, _______, _______
242 ), 192 ),
243 193
244 /* Macro layer */ 194 /* Macro layer */
@@ -247,7 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
247 _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP, 197 _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP,
248 _______, _______, _______, G_FTCH, _______, _______, _______, _______, _______, _______, _______, _______, _______, 198 _______, _______, _______, G_FTCH, _______, _______, _______, _______, _______, _______, _______, _______, _______,
249 _______, _______, _______, _______, _______, G_BRCH, _______, _______, _______, _______, _______, _______, 199 _______, _______, _______, _______, _______, G_BRCH, _______, _______, _______, _______, _______, _______,
250 _______, _______, _______, _______, _______, _______, NO_CHNG, _______ 200 _______, _______, _______, _______, _______, _______, _______, _______
251 ), 201 ),
252 202
253 /* System layer */ 203 /* System layer */
@@ -256,7 +206,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
256 XXXXXXX, XXXXXXX, M_MDSWP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 206 XXXXXXX, XXXXXXX, M_MDSWP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
257 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 207 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
258 XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 208 XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
259 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX 209 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX
260 ), 210 ),
261 211
262}; 212};
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md
index 59f4386ee..8d0c6547a 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme.md
@@ -1,15 +1,15 @@
1# @noroadsleft's KC60 keymap 1# @noroadsleft's KC60 keymap
2 2
3### Last updated: November 5, 2019, 12:07 AM UTC-0800 3### Last updated: April 26, 2021 13:33 (-0700)
4 4
5![](https://i.imgur.com/tzhXQYI.jpg) 5![](https://i.imgur.com/tzhXQYIl.jpg)
6 6
7I am a full-time Dvorak typist, and occasional semi-serious FPS gamer. The layers are oriented towards a mix of typing and gaming. 7I am a full-time Dvorak typist, and occasional semi-serious FPS gamer. The layers are oriented towards a mix of typing and gaming.
8 8
9 9
10---- 10----
11 11
12# Preface 12## Preface
13 13
14Images in this readme follow the following format: 14Images in this readme follow the following format:
15 15
@@ -21,18 +21,122 @@ Descriptions of the physical locations of keys will use the key's function in a
21 21
22---- 22----
23 23
24# Outline 24## Outline
25 25
26- [Base Layers](./readme_ch1.md) 26- [Base Layers](#base-layers)
27 - Layer 0: QWERTY `_QW` 27 - Layer 0: QWERTY `_QW`
28 - Layer 1: Hardware Dvorak `_DV` 28 - Layer 1: Hardware Dvorak `_DV`
29 - Layer 2: Hardware Colemak `_CM` 29 - Layer 2: Hardware Colemak `_CM`
30- [Quake 2 Overlays](./readme_ch2.md) 30- [Quake 2 Layer](#quake-2-layer)
31 - Layers 3, 4 and 5: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC` 31 - Layer 3: Quake 2 `_Q2`
32- [Function Layers](./readme_ch3.md) 32- [Function Layer](#function-layer)
33 - Layer 6: Fn layer `_FN` 33 - Layer 4: Fn layer `_FN`
34 - Layer 7: Quake 2 Fn layer `_FQ` 34- [Other Layers](#other-layers)
35- [Other Layers](./readme_ch4.md) 35 - Layer 5: Numpad layer `_NP`
36 - Layer 8: Numpad layer `_NP` 36 - Layer 6: Macro layer `_MA`
37 - Layer 9: Macro layer `_MA` 37 - Layer 7: System layer `_SY`
38 - Layer 10: System layer `_SY` 38
39
40----
41
42## Base Layers
43
44### Layer 0: QWERTY - `_QW`
45
46Standard QWERTY layout, with four QMK features:
47
48- The `Menu` key has been replaced by `MO(_FW)`, which moves to my Windows Fn layer when held.
49- The Right `GUI` key has been replaced with a `MO(_MA)` key, which moves to the Macro layer when held.
50- 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
51- The Left `Control` key has been replaced with a `MT(MOD_CTRL, KC_GRV)` key, which is <code>&#96; ~</code> when tapped and `Ctrl` when held.
52
53![QWERTY layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/qwerty.png)
54
55
56----
57
58### Layer 1: Hardware Dvorak - `_DV`
59
60- Accessed by holding either `Fn` and tapping `/?` key, then tapping `2@`.
61
62A 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.
63
64![Hardware Dvorak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/dvorak.png)
65
66
67----
68
69### Layer 2: Hardware Colemak `_CM`
70
71- Accessed by holding either `Fn` and tapping `/?` key, then tapping `3#`.
72
73A hardware-based Colemak layout. Been thinking of trying it, so it's here.
74
75![Hardware Colemak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/colemak.png)
76
77
78----
79
80## Quake 2 Layer
81
82### Layer 3: Quake 2 `_Q2`
83
84- Accessed by holding either `Fn` key and tapping the `/?` key, then tapping `4$`
85
86These 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.
87
88I have solved this by writing a custom QMK macro. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L205), is a [macro](./keymap.c#L63-L70) 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 changes the dual-function Left Control/Grave key to a standard Left Control, and the Enter key into a special Enter key specific to Quake 2.
89
90When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L71-L86) I've created sends the keycode for `Enter`, then follows with flipping an internal boolean variable and enabling the Hardware Dvorak layer. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` key is sent, which sends the message, then the macro flips the boolean back to false and disables the Hardware Dvorak layer, which brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L87-L97) that cancels the sending of the message, and undoes the layers.
91
92![Quake 2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/quake2.png)
93
94
95----
96
97## Function Layer
98
99### Layer 4: Fn layer - `_FN`
100
101- Accessed by holding either `Fn` key from any base layer
102
103Arrows, 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.
104
105![Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/function.png)
106
107
108----
109
110## Other Layers
111
112### Layer 5: Numpad layer - `_NP`
113
114- Accessed by holding either `Fn` key and tapping `Space`, from any of the Base Layers
115
116Puts 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.
117
118![Numpad layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/numpad.png)
119
120
121----
122
123### Layer 6: Macro layer - `_MA`
124
125- Accessed by holding the right-side `Win` key
126
127Has some macros that I use in Git, and keys for use with the [Dynamic Macros feature](https://docs.qmk.fm/#/feature_dynamic_macros).
128
129For macro documentation, see [my userspace readme](../../../../users/noroadsleft/readme.md).
130
131![Macro layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/macros.png)
132
133
134----
135
136### Layer 7: System layer - `_SY`
137
138- Accessed by holding either `Fn` key and tapping the `/?` key
139
140This is where I change my keyboard function. Base layer select on `1` through `4`, Backlight controls on `C` through `N`, Reset on `8*`, Debug on `0)`. Hitting `Esc` exits the layer.
141
142![System layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/system.png)
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md
deleted file mode 100644
index 87fe99c65..000000000
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md
+++ /dev/null
@@ -1,48 +0,0 @@
1# @noroadsleft's KC60 keymap
2
3- [Table of Contents](./readme.md)
4 1. **Base Layers**
5 2. [Quake 2 Overlays](./readme_ch2.md)
6 3. [Function Layers](./readme_ch3.md)
7 4. [Other Layers](./readme_ch4.md)
8
9
10----
11
12## Layer 0: QWERTY - `_QW`
13
14Standard QWERTY layout, with four QMK features:
15
16- The `Menu` key has been replaced by `MO(_FW)`, which moves to my Windows Fn layer when held.
17- The Right `GUI` key has been replaced with a `MO(_MA)` key, which moves to the Macro layer when held.
18- 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
19- The Left `Control` key has been replaced with a `MT(MOD_CTRL, KC_GRV)` key, which is <code>&#96; ~</code> when tapped and `Ctrl` when held.
20
21![QWERTY layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/QWERTY.png)
22
23
24----
25
26## Layer 1: Hardware Dvorak - `_DV`
27
28### Accessed by holding either `Fn` and tapping `/?` key, then tapping `2@`.
29
30A 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.
31
32![Hardware Dvorak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Dvorak.png)
33
34
35----
36
37## Layer 2: Hardware Colemak `_CM`
38
39### Accessed by holding either `Fn` and tapping `/?` key, then tapping `3#`.
40
41A hardware-based Colemak layout. Been thinking of trying it, so it's here.
42
43![Hardware Colemak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Colemak.png)
44
45
46----
47
48Next Chapter: [Quake 2 Overlays](./readme_ch2.md)
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md
deleted file mode 100644
index 427bebb9a..000000000
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md
+++ /dev/null
@@ -1,36 +0,0 @@
1# @noroadsleft's KC60 keymap
2
3- [Table of Contents](./readme.md)
4 1. [Base Layers](./readme_ch1.md)
5 2. **Quake 2 Overlays**
6 3. [Function Layers](./readme_ch3.md)
7 4. [Other Layers](./readme_ch4.md)
8
9
10----
11
12## Layers 3, 4 and 5: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC`
13
14### Accessed by holding either `Fn` key and tapping the `/?` key, then tapping `4$`
15
16These 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.
17
18I'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#L387), is a [macro](./keymap.c#L101-L108) 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.
19
20When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L109-L115) 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#L116-L122) 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#L123-L129) that cancels the sending of the message, and undoes the layers.
21
22I 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.
23
24### Layer 3: Quake 2
25![Quake 2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202.png)
26
27### Layer 4: Quake 2 Dvorak
28![Quake 2 Dvorak](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202%20Dvorak.png)
29
30### Layer 5: Quake 2 Console
31![Quake 2 Console](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202%20Console.png)
32
33
34----
35
36Next Chapter: [Function Layers](./readme_ch3.md)
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
deleted file mode 100644
index 57c0bd490..000000000
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
+++ /dev/null
@@ -1,40 +0,0 @@
1# @noroadsleft's KC60 keymap
2
3- [Table of Contents](./readme.md)
4 1. [Base Layers](./readme_ch1.md)
5 2. [Quake 2 Overlays](./readme_ch2.md)
6 3. **Function Layers**
7 4. [Other Layers](./readme_ch4.md)
8
9
10----
11
12## Layer 6: Fn layer - `_FN`
13
14### Accessed by holding either `Fn` key from any base layer
15
16Arrows, 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.
17
18![Windows Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Fn.png)
19
20
21----
22
23## Layer 7: Quake 2 Fn layer - `_FQ`
24
25### Accessed by holding either `Fn` key while either Quake 2 overlay is active.
26
27Based on the Windows function layer, but removes some functions that are pointless to have while in the game.
28
29![Quake 2 Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202%20Fn.png)
30
31Keycode(s) Sent | Notes
32:-------------------------------- | :----
33[`Q2_GRV`](./keymap.c#L130-L137) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers.
34
35
36
37
38----
39
40Next Chapter: [Other Layers](./readme_ch4.md)
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md
deleted file mode 100644
index 97fa675a9..000000000
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md
+++ /dev/null
@@ -1,110 +0,0 @@
1# @noroadsleft's KC60 keymap
2
3- [Table of Contents](./readme.md)
4 1. [Base Layers](./readme_ch1.md)
5 2. [Quake 2 Overlays](./readme_ch2.md)
6 3. [Function Layers](./readme_ch3.md)
7 4. **Other Layers**
8
9
10----
11
12## Layer 8: Numpad layer - `_NP`
13
14### Accessed by holding either `Fn` key and tapping `Space`, from any of the Base Layers
15
16Puts 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.
17
18![Numpad layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Numpad.png)
19
20
21----
22
23## Layer 9: Macro layer - `_MA`
24
25### Accessed by holding the right-side `Win` key
26
27Has some macros that I use in Git, some frequently-typed strings, and keys for use with the [Dynamic Macros feature](https://docs.qmk.fm/#/feature_dynamic_macros).
28
29Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatically.
30
31![Macro layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Macro.png)
32
33
34### Macros
35
36#### [G_PUSH](./keymap.c#L71-L75)
37
38Output: `git push origin `
39
40Everything from here down is related to Git or GitHub.
41
42#### [G_FTCH](./keymap.c#L76-L85)
43
44| Condition | Output |
45| :-------- | :----- |
46| If <kbd>Shift</kbd> is active | `git pull upstream ` |
47| Otherwise | `git fetch upstream ` |
48
49#### [G_BRCH](./keymap.c#L86-L95)
50
51| Condition | Output |
52| :-------- | :----- |
53| If <kbd>Shift</kbd> is active | `master` |
54| Otherwise | `$(git branch-name)` |
55
56`$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch.
57
58#### [SIGNA](./keymap.c#L96-L100)
59
60Output: `\- @noroadsleft` <kbd>Enter</kbd>
61
62Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key.
63
64#### "Macro Mode" Macros and Customized Keycodes
65
66Some of my macros and keycodes do different things depending on the value of the [`macroMode` variable](./keymap.c#L65), which is toggled between `0` and `1` by the [`M_MDSWP` custom keycode](./keymap.c#L238-L242). This is mainly at attempt to make various shortcuts the same key combinations between Windows/Linux and MacOS (which I use at home and work, respectively).
67
68| Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with Shift |
69| :------------------------------ | :--------------- | :--------------- | :--------------------------- |
70| [M_SALL](./keymap.c#L138-L146) | `Ctrl+A` | `Cmd+A` | `Cmd+A` |
71| [M_UNDO](./keymap.c#L147-L159) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` |
72| [M_CUT](./keymap.c#L160-L168) | `Ctrl+X` | `Cmd+X` | `Cmd+X` |
73| [M_COPY](./keymap.c#L169-L177) | `Ctrl+C` | `Cmd+C` | `Cmd+C` |
74| [M_PASTE](./keymap.c#L178-L190) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` |
75| `KC_HOME` | `KC_HOME` | `Cmd+Left` | `Cmd+Left` |
76| `KC_END` | `KC_END` | `Cmd+Right` | `Cmd+Right` |
77| `KC_PSCR` | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` |
78
79#### [Emulated Non-US Backslash](./keymap.c#L218-L232)
80
81Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z.
82
83#### [VRSN](./keymap.c#L233-L237)
84
85Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
86
87 kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty
88
89#### [Emulated Numeric Keypad](./keymap.c#L243-L257)
90
91If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °.
92
93#### [Emulated Extended Function Keys](./keymap.c#L258-L272)
94
95Similar to the emulated numpad, if I hold the Right Alt key with the Fn key, the function row (`KC_F1` through `KC_F12`) will output keycodes `KC_F13` throught `KC_F24`.
96
97----
98
99### Layer 10: System layer - `_SY`
100
101#### Accessed by holding either `Fn` key and tapping the `/?` key
102
103This 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)`.
104
105![System layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/System.png)
106
107
108----
109
110[Back to the index.](./)
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md
deleted file mode 100644
index a8564703f..000000000
--- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md
+++ /dev/null
@@ -1,79 +0,0 @@
1# @noroadsleft's Git aliases
2
3[Return to the directory index.](./)
4
5```
6[alias]
7 # Change branches
8 co = checkout
9 cob = checkout -b
10
11 # Cherry Pick
12 cp = cherry-pick
13
14 # Check out a Pull Request locally
15 # e.g. `git cop 351` fetches the commits from Pull Request #351 and saves it to local branch 'pr/351'.
16 cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f"
17
18 # Sync master branch
19 sync = !git checkout master && git fetch upstream 2> /dev/null && git pull -n upstream master && git push origin master
20
21 # Return the abbreviated SHA-1 of the last three commits, oldest to newest
22 rl = rev-list -n 3 --abbrev-commit --reverse HEAD
23
24 # Add remote repo (for sending PRs to other forks, or checking out someone else's developments)
25 ar = "!f() { git remote add $1 https://github.com/$2/qmk_firmware.git; }; f"
26
27 # Return the last five commits on the branch, in a more compact format
28 hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset %Cblue[%an%Cgreen% GK%Cblue]%C(yellow)%d%Creset%n %w(100,0,2)%s%n\" --graph --date=iso-local -n 5
29 histt = log --pretty=format:\"* %C(yellow)%h%Creset %<(58,trunc)%s %Cblue%>(18,trunc)%an%Cgreen% G?%Creset @ %Cgreen%ad%Creset\" --date=iso-local -n 5
30 histb = log --reverse --pretty=format:\"- %Cblue%>(20,trunc)%an %Creset%<(97,trunc)%s\" --date=iso-local -n 5
31
32 # Follow a file's filename history
33 follow = log --follow --name-only --pretty=format:\"%C(yellow)commit %H%Creset%d\nAuthor: %an <%ae>\nDate: %ad%n%n %s%n\" --date=iso-local
34
35 # compact diff
36 df = "diff --compact-summary"
37
38 # List all the files changed in a commit
39 dt = "diff-tree --no-commit-id --name-only -r"
40
41 # Short-form status
42 st = "!git status --short --untracked-files=no"
43 stu = "!git ls-files --others -x '*/*'"
44
45 # Returns the name of the current branch
46 branch-name = "!git rev-parse --abbrev-ref HEAD"
47 bn = "!git branch-name" # short-form of the above
48 # List branches by the date of their last commit, newest to oldest
49 bbd = "for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='\e[33m%(objectname)\e[0m %(objecttype) \e[32m%(refname:short)\e[0m (%(authordate))'"
50
51 # Compare commit counts between current branch and QMK master
52 # e.g. `git cc dev_branch upstream/master` returns how many commits are on `dev_branch` and not on `upstream/master`, and vice versa.
53 cc = "!f() { git fetch upstream; echo \"\e[0;32m$(git branch-name)\e[0m vs. \e[0;31m$2\e[0m\"; git rev-list --left-right --count $1...$2; }; f"
54
55 # Push to origin repo
56 po = "push origin $(git branch-name)"
57
58 # List the stashes
59 sl = "stash list"
60
61 # Unstage a file
62 unstage = "reset HEAD"
63
64 # Restore a file to the state it was in when checked out
65 restore = "checkout --"
66
67 # Compare local master repo to its upstream branch. If anything is returned, local branch has diverged from upstream.
68 cm = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master --compact-summary; }; f"
69 cml = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master; }; f"
70
71 # Delete a branch from local and remote
72 del-branch = "!f() { git branch -d $1; git push origin :$1; git fetch -p origin; }; f"
73
74 # Rebase with signatures
75 rbv = rebase --exec 'git commit --amend --no-edit -n -S' -i
76
77 # Force push without overwriting established history
78 pushf = push --force-with-lease
79```
diff --git a/users/noroadsleft/noroadsleft.c b/users/noroadsleft/noroadsleft.c
index 6fb223f9e..ac6342725 100644
--- a/users/noroadsleft/noroadsleft.c
+++ b/users/noroadsleft/noroadsleft.c
@@ -1,4 +1,4 @@
1/* Copyright 2020 James Young (@noroadsleft) 1/* Copyright 2020-2021 James Young (@noroadsleft)
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
32 switch (keycode) { 32 switch (keycode) {
33 case VRSN: 33 case VRSN:
34 if (record->event.pressed) { 34 if (record->event.pressed) {
35 SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); 35 SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " @ " QMK_VERSION);
36 } 36 }
37 return false; 37 return false;
38 case G_PUSH: 38 case G_PUSH:
@@ -118,6 +118,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
118 macroMode ^= 1; 118 macroMode ^= 1;
119 } 119 }
120 return false; 120 return false;
121 case KC_Z:
122 if (record->event.pressed) {
123 if ( get_mods() & MOD_MASK_RALT ) {
124 register_code(KC_NUBS);
125 } else {
126 register_code(KC_Z);
127 }
128 } else {
129 if ( get_mods() & MOD_MASK_RALT ) {
130 unregister_code(KC_NUBS);
131 } else {
132 unregister_code(KC_Z);
133 }
134 };
135 return false;
121 case KC_1 ... KC_0: 136 case KC_1 ... KC_0:
122 if (record->event.pressed) { 137 if (record->event.pressed) {
123 if (get_mods() & MOD_MASK_RALT) { 138 if (get_mods() & MOD_MASK_RALT) {
@@ -148,6 +163,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
148 } 163 }
149 } 164 }
150 return false; 165 return false;
166 case KC_PSCR:
167 if (record->event.pressed) {
168 if ( macroMode == 1 ) {
169 tap_code16(G(S(KC_3)));
170 } else {
171 tap_code(KC_PSCR);
172 }
173 }
174 return false;
175 case KC_HOME:
176 if (record->event.pressed) {
177 if ( macroMode == 1 ) {
178 tap_code16(G(KC_LEFT));
179 } else {
180 tap_code(KC_HOME);
181 }
182 }
183 return false;
184 case KC_END:
185 if (record->event.pressed) {
186 if ( macroMode == 1 ) {
187 tap_code16(G(KC_RGHT));
188 } else {
189 tap_code(KC_END);
190 }
191 }
192 return false;
151 } // switch() 193 } // switch()
152 return true; 194 return true;
153}; 195};
diff --git a/users/noroadsleft/noroadsleft.h b/users/noroadsleft/noroadsleft.h
index 2d597219f..52bcec0ab 100644
--- a/users/noroadsleft/noroadsleft.h
+++ b/users/noroadsleft/noroadsleft.h
@@ -1,4 +1,4 @@
1/* Copyright 2020 James Young (@noroadsleft) 1/* Copyright 2020-2021 James Young (@noroadsleft)
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
diff --git a/users/noroadsleft/readme.md b/users/noroadsleft/readme.md
index f018a4227..6a454b7c7 100644
--- a/users/noroadsleft/readme.md
+++ b/users/noroadsleft/readme.md
@@ -2,29 +2,62 @@
2 2
3This directory holds the code that's the same for every keyboard I use in QMK, which is currently: 3This directory holds the code that's the same for every keyboard I use in QMK, which is currently:
4 4
5| Status | Keyboard | 5- `kc60`
6| :----------------- | :------- | 6- `kbdfans/kbd75/rev1`
7| :heavy_check_mark: | `kc60` 7- `coseyfannitutti/discipline`
8| :heavy_check_mark: | `kbdfans/kbd75/rev1`
9 8
10## Features
11 9
12### Emulated Non-US Backslash 10## Macro Features and Custom Keycodes
13 11
14Sends `KC_NUBS` when the Z key is tapped while the Right Alt key is being held. 12### [VRSN](./noroadsleft.c#L33-L37)
15 13
16### Emulated Numeric Keypad 14Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
17 15
18Turns number row keycodes into their numeric keypad equivalents while the Right Alt key is being held. 16 kc60:noroadsleft @ 0.6.326-6-gae6d7b-dirty
19 17
20### Emulated F13-F24 18### Git Macros
21 19
22Turns F1-F12 into F13-F24 while the Right Alt key is being held. 20Some frequently used Git commands.
21
22| Keycode | Output | Output with <kbd>Shift</kbd> |
23| :---------------------------------- | :--------------------- | :--------------------------- |
24| [`G_PUSH`](./noroadsleft.c#L38-L42) | `git push origin ` | `git push origin ` |
25| [`G_FTCH`](./noroadsleft.c#L43-L52) | `git fetch upstream ` | `git pull upstream ` |
26| [`G_BRCH`](./noroadsleft.c#L53-L62) | `master` | `$(git branch-name)` |
27
28`$(git branch-name)` is an alias for `git rev-parse --abbrev-ref HEAD`, which normally return the name of the current branch.
29
30### "Macro Mode" Macros and Customized Keycodes
31
32Some of my macros and keycodes do different things depending on the value of the [`macroMode` variable](./noroadsleft.c#L23), which is [toggled between `0` and `1`](./noroadsleft.c#L116-L120) by the `M_MDSWP` custom keycode.[<sup>1</sup>](#footnotes) This is mainly at attempt to make various shortcuts use the same physical key combinations between Windows/Linux and MacOS (which I use at home and work, respectively).
33
34| Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with <kbd>Shift</kbd> |
35| :------------------------------------- | :--------------- | :--------------- | :------------------------------------- |
36| [`M_SALL`](./noroadsleft.c#L63-L71) | `Ctrl+A` | `Cmd+A` | `Cmd+A` |
37| [`M_UNDO`](./noroadsleft.c#L72-L84) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` |
38| [`M_CUT`](./noroadsleft.c#L85-L93) | `Ctrl+X` | `Cmd+X` | `Cmd+X` |
39| [`M_COPY`](./noroadsleft.c#L94-L102) | `Ctrl+C` | `Cmd+C` | `Cmd+C` |
40| [`M_PASTE`](./noroadsleft.c#L103-L115) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` |
41| [`KC_PSCR`](./noroadsleft.c#L166-L174) | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` |
42| [`KC_HOME`](./noroadsleft.c#L175-L183) | `KC_HOME` | `Cmd+Left` | `Cmd+Left` |
43| [`KC_END`](./noroadsleft.c#L184-L192) | `KC_END` | `Cmd+Right` | `Cmd+Right` |
44
45### [Emulated Non-US Backslash](./noroadsleft.c#L121-L135)
46
47Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + `KC_Z`.
48
49### [Emulated Numeric Keypad](./noroadsleft.c#L136-L150)
50
51If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °.
52
53### [Emulated Extended Function Keys](./noroadsleft.c#L151-L165)
54
55Similar to the emulated numpad, if I hold the Right Alt key with the Fn key, the function row (`KC_F1` through `KC_F12`) will output keycodes `KC_F13` throught `KC_F24`.
23 56
24 57
25## License 58## License
26 59
27Copyright 2020 noroadsleft 60Copyright 2020-2021 James Young (@noroadsleft)
28 61
29This program is free software: you can redistribute it and/or modify 62This program is free software: you can redistribute it and/or modify
30it under the terms of the GNU General Public License as published by 63it under the terms of the GNU General Public License as published by
@@ -38,3 +71,11 @@ GNU General Public License for more details.
38 71
39You should have received a copy of the GNU General Public License 72You should have received a copy of the GNU General Public License
40along with this program. If not, see <http://www.gnu.org/licenses/>. 73along with this program. If not, see <http://www.gnu.org/licenses/>.
74
75
76## Footnotes
77
78- 1: [^](#macro-mode-macros-and-customized-keycodes) The `M_MDSWP` keycode is used in my keymaps in the following locations:
79 - [KC60](../../keyboards/kc60/keymaps/noroadsleft/keymap.c#L206)
80 - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c#L102)
81 - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c#L67)