aboutsummaryrefslogtreecommitdiff
path: root/users/noroadsleft
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-04-26 23:44:45 -0700
committerGitHub <noreply@github.com>2021-04-26 23:44:45 -0700
commitf9fb52951de60e9428a6c397bf167a6e7e9433f3 (patch)
tree0ed96c47bdd4261d1afc18760dd261e7c8aa2b80 /users/noroadsleft
parentb5419bd574600565bf4b2479bf07c7cc39dbfeea (diff)
downloadqmk_firmware-f9fb52951de60e9428a6c397bf167a6e7e9433f3.tar.gz
qmk_firmware-f9fb52951de60e9428a6c397bf167a6e7e9433f3.zip
Update noroadsleft userspace and keymaps (2021-04-26) (#12711)
* Update noroadsleft userspace and keymaps (2021-04-26) - add Discipline keymap - move Emulated Non-US Backslash, Numeric Keypad and F13-F24 code fully to userspace - re-add some custom keycode handling I accidentally deleted - update VRSN keycode - update KC60 and userspace readmes * remove Git readme from kc60 keymap * update kc60:noroadsleft readme Concatenates this readme into one file, and updates the image links.
Diffstat (limited to 'users/noroadsleft')
-rw-r--r--users/noroadsleft/noroadsleft.c46
-rw-r--r--users/noroadsleft/noroadsleft.h2
-rw-r--r--users/noroadsleft/readme.md65
3 files changed, 98 insertions, 15 deletions
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)