diff options
| author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2021-06-02 23:06:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 23:06:30 -0700 |
| commit | a0cc2dc6d0b4fafc9f7d70b98254e32d032c3f17 (patch) | |
| tree | f90757663c60b7ea6dfa53cbb2a6c6222baedb80 /users/noroadsleft | |
| parent | 597d2e0e7bdc3f2629965a5b393b725e9ab8442b (diff) | |
| download | qmk_firmware-a0cc2dc6d0b4fafc9f7d70b98254e32d032c3f17.tar.gz qmk_firmware-a0cc2dc6d0b4fafc9f7d70b98254e32d032c3f17.zip | |
Update noroadsleft userspace and keymaps (2021-06-02) (#13086)
Diffstat (limited to 'users/noroadsleft')
| -rw-r--r-- | users/noroadsleft/noroadsleft.c | 28 | ||||
| -rw-r--r-- | users/noroadsleft/readme.md | 38 |
2 files changed, 35 insertions, 31 deletions
diff --git a/users/noroadsleft/noroadsleft.c b/users/noroadsleft/noroadsleft.c index ac6342725..82b0b0568 100644 --- a/users/noroadsleft/noroadsleft.c +++ b/users/noroadsleft/noroadsleft.c | |||
| @@ -29,10 +29,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 29 | if (!process_record_keymap(keycode, record)) { | 29 | if (!process_record_keymap(keycode, record)) { |
| 30 | return false; | 30 | return false; |
| 31 | } | 31 | } |
| 32 | #if defined(ANSI_NUBS_ROW) && defined(ANSI_NUBS_COL) | ||
| 33 | // if ANSI_NUBS_ROW and ANSI_NUBS_COL are both defined, and Right Alt mod is active | ||
| 34 | if ( record->event.key.row == ANSI_NUBS_ROW && record->event.key.col == ANSI_NUBS_COL && get_mods() & MOD_MASK_RALT ) { | ||
| 35 | if (record->event.pressed) { | ||
| 36 | register_code(KC_NUBS); | ||
| 37 | } else { | ||
| 38 | unregister_code(KC_NUBS); | ||
| 39 | } | ||
| 40 | return false; | ||
| 41 | } | ||
| 42 | #endif | ||
| 32 | switch (keycode) { | 43 | switch (keycode) { |
| 33 | case VRSN: | 44 | case VRSN: |
| 34 | if (record->event.pressed) { | 45 | if (record->event.pressed) { |
| 35 | SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " @ " QMK_VERSION); | 46 | SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " # @ " QMK_VERSION); |
| 36 | } | 47 | } |
| 37 | return false; | 48 | return false; |
| 38 | case G_PUSH: | 49 | case G_PUSH: |
| @@ -118,21 +129,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 118 | macroMode ^= 1; | 129 | macroMode ^= 1; |
| 119 | } | 130 | } |
| 120 | return false; | 131 | 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: | 132 | case KC_1 ... KC_0: |
| 137 | if (record->event.pressed) { | 133 | if (record->event.pressed) { |
| 138 | if (get_mods() & MOD_MASK_RALT) { | 134 | if (get_mods() & MOD_MASK_RALT) { |
diff --git a/users/noroadsleft/readme.md b/users/noroadsleft/readme.md index 0a2153471..bee6ee272 100644 --- a/users/noroadsleft/readme.md +++ b/users/noroadsleft/readme.md | |||
| @@ -21,9 +21,9 @@ Some frequently used Git commands. | |||
| 21 | 21 | ||
| 22 | | Keycode | Output | Output with <kbd>Shift</kbd> | | 22 | | Keycode | Output | Output with <kbd>Shift</kbd> | |
| 23 | | :---------------------------------- | :--------------------- | :--------------------------- | | 23 | | :---------------------------------- | :--------------------- | :--------------------------- | |
| 24 | | [`G_PUSH`](./noroadsleft.c#L38-L42) | `git push origin ` | `git push origin ` | | 24 | | [`G_PUSH`](./noroadsleft.c#L49-L53) | `git push origin ` | `git push origin ` | |
| 25 | | [`G_FTCH`](./noroadsleft.c#L43-L52) | `git fetch upstream ` | `git pull upstream ` | | 25 | | [`G_FTCH`](./noroadsleft.c#L54-L63) | `git fetch upstream ` | `git pull upstream ` | |
| 26 | | [`G_BRCH`](./noroadsleft.c#L53-L62) | `master` | `$(git branch-name)` | | 26 | | [`G_BRCH`](./noroadsleft.c#L64-L73) | `master` | `$(git branch-name)` | |
| 27 | 27 | ||
| 28 | `$(git branch-name)` is an alias for `git rev-parse --abbrev-ref HEAD`, which normally returns the name of the current branch. | 28 | `$(git branch-name)` is an alias for `git rev-parse --abbrev-ref HEAD`, which normally returns the name of the current branch. |
| 29 | 29 | ||
| @@ -33,24 +33,28 @@ Some of my macros and keycodes do different things depending on the value of the | |||
| 33 | 33 | ||
| 34 | | Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with <kbd>Shift</kbd> | | 34 | | Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with <kbd>Shift</kbd> | |
| 35 | | :------------------------------------- | :--------------- | :--------------- | :------------------------------------- | | 35 | | :------------------------------------- | :--------------- | :--------------- | :------------------------------------- | |
| 36 | | [`M_SALL`](./noroadsleft.c#L63-L71) | `Ctrl+A` | `Cmd+A` | `Cmd+A` | | 36 | | [`M_SALL`](./noroadsleft.c#L74-L82) | `Ctrl+A` | `Cmd+A` | `Cmd+A` | |
| 37 | | [`M_UNDO`](./noroadsleft.c#L72-L84) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` | | 37 | | [`M_UNDO`](./noroadsleft.c#L83-L95) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` | |
| 38 | | [`M_CUT`](./noroadsleft.c#L85-L93) | `Ctrl+X` | `Cmd+X` | `Cmd+X` | | 38 | | [`M_CUT`](./noroadsleft.c#L96-L104) | `Ctrl+X` | `Cmd+X` | `Cmd+X` | |
| 39 | | [`M_COPY`](./noroadsleft.c#L94-L102) | `Ctrl+C` | `Cmd+C` | `Cmd+C` | | 39 | | [`M_COPY`](./noroadsleft.c#L105-L113) | `Ctrl+C` | `Cmd+C` | `Cmd+C` | |
| 40 | | [`M_PASTE`](./noroadsleft.c#L103-L115) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` | | 40 | | [`M_PASTE`](./noroadsleft.c#L114-L126) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` | |
| 41 | | [`KC_PSCR`](./noroadsleft.c#L166-L174) | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` | | 41 | | [`KC_PSCR`](./noroadsleft.c#L162-L170) | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` | |
| 42 | | [`KC_HOME`](./noroadsleft.c#L175-L183) | `KC_HOME` | `Cmd+Left` | `Cmd+Left` | | 42 | | [`KC_HOME`](./noroadsleft.c#L171-L179) | `KC_HOME` | `Cmd+Left` | `Cmd+Left` | |
| 43 | | [`KC_END`](./noroadsleft.c#L184-L192) | `KC_END` | `Cmd+Right` | `Cmd+Right` | | 43 | | [`KC_END`](./noroadsleft.c#L180-L188) | `KC_END` | `Cmd+Right` | `Cmd+Right` | |
| 44 | 44 | ||
| 45 | ### [Emulated Non-US Backslash](./noroadsleft.c#L121-L135) | 45 | ### [Emulated Non-US Backslash](./noroadsleft.c#L32-L42) |
| 46 | 46 | ||
| 47 | Sometimes 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`. | 47 | Sometimes I type in languages from countries that use ISO layout, but my keyboards are all ANSI layout, so I have one key fewer than necessary. |
| 48 | 48 | ||
| 49 | ### [Emulated Numeric Keypad](./noroadsleft.c#L136-L150) | 49 | This macro simulates the Non-US Backslash key if I hold Right Alt and tap the key to the right of Left Shift. |
| 50 | |||
| 51 | Requires defining `ANSI_NUBS_ROW` and `ANSI_NUBS_COL` in `config.h` at the keymap level.[<sup>2</sup>](#footnotes) | ||
| 52 | |||
| 53 | ### [Emulated Numeric Keypad](./noroadsleft.c#L132-L146) | ||
| 50 | 54 | ||
| 51 | If 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 °. | 55 | If 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 | 56 | ||
| 53 | ### [Emulated Extended Function Keys](./noroadsleft.c#L151-L165) | 57 | ### [Emulated Extended Function Keys](./noroadsleft.c#L147-L161) |
| 54 | 58 | ||
| 55 | Similar 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`. | 59 | Similar 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`. |
| 56 | 60 | ||
| @@ -79,3 +83,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 79 | - [KC60](../../keyboards/kc60/keymaps/noroadsleft/keymap.c#L111) | 83 | - [KC60](../../keyboards/kc60/keymaps/noroadsleft/keymap.c#L111) |
| 80 | - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c#L93) | 84 | - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c#L93) |
| 81 | - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c#L66) | 85 | - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c#L66) |
| 86 | - 2: [^](#emulated-non-us-backslash) `ANSI_NUBS_ROW` and `ANSI_NUBS_COL` are in the following locations: | ||
| 87 | - [KC60](../../keyboards/kc60/keymaps/noroadsleft/config.h#L35-L36) | ||
| 88 | - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h#L26-L27) | ||
| 89 | - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h#L19-L20) | ||
