You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
5.0 KiB

  1. # @noroadsleft's Userspace
  2. This directory holds the code that's the same for every keyboard I use in QMK, which is currently:
  3. - `kc60`
  4. - `kbdfans/kbd75/rev1`
  5. - `coseyfannitutti/discipline`
  6. ## Macro Features and Custom Keycodes
  7. ### [VRSN](./noroadsleft.c#L33-L37)
  8. Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
  9. kc60:noroadsleft @ 0.6.326-6-gae6d7b-dirty
  10. ### Git Macros
  11. Some frequently used Git commands.
  12. | Keycode | Output | Output with <kbd>Shift</kbd> |
  13. | :---------------------------------- | :--------------------- | :--------------------------- |
  14. | [`G_PUSH`](./noroadsleft.c#L49-L53) | `git push origin ` | `git push origin ` |
  15. | [`G_FTCH`](./noroadsleft.c#L54-L63) | `git fetch upstream ` | `git pull upstream ` |
  16. | [`G_BRCH`](./noroadsleft.c#L64-L73) | `master` | `$(git branch-name)` |
  17. `$(git branch-name)` is an alias for `git rev-parse --abbrev-ref HEAD`, which normally returns the name of the current branch.
  18. ### "Macro Mode" Macros and Customized Keycodes
  19. Some 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).
  20. | Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with <kbd>Shift</kbd> |
  21. | :------------------------------------- | :--------------- | :--------------- | :------------------------------------- |
  22. | [`M_SALL`](./noroadsleft.c#L74-L82) | `Ctrl+A` | `Cmd+A` | `Cmd+A` |
  23. | [`M_UNDO`](./noroadsleft.c#L83-L95) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` |
  24. | [`M_CUT`](./noroadsleft.c#L96-L104) | `Ctrl+X` | `Cmd+X` | `Cmd+X` |
  25. | [`M_COPY`](./noroadsleft.c#L105-L113) | `Ctrl+C` | `Cmd+C` | `Cmd+C` |
  26. | [`M_PASTE`](./noroadsleft.c#L114-L126) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` |
  27. | [`KC_PSCR`](./noroadsleft.c#L162-L170) | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` |
  28. | [`KC_HOME`](./noroadsleft.c#L171-L179) | `KC_HOME` | `Cmd+Left` | `Cmd+Left` |
  29. | [`KC_END`](./noroadsleft.c#L180-L188) | `KC_END` | `Cmd+Right` | `Cmd+Right` |
  30. ### [Emulated Non-US Backslash](./noroadsleft.c#L32-L42)
  31. 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.
  32. This macro simulates the Non-US Backslash key if I hold Right Alt and tap the key to the right of Left Shift.
  33. Requires defining `ANSI_NUBS_ROW` and `ANSI_NUBS_COL` in `config.h` at the keymap level.[<sup>2</sup>](#footnotes)
  34. ### [Emulated Numeric Keypad](./noroadsleft.c#L132-L146)
  35. 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 °.
  36. ### [Emulated Extended Function Keys](./noroadsleft.c#L147-L161)
  37. 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`.
  38. ## License
  39. Copyright 2020-2021 James Young (@noroadsleft)
  40. This program is free software: you can redistribute it and/or modify
  41. it under the terms of the GNU General Public License as published by
  42. the Free Software Foundation, either version 2 of the License, or
  43. (at your option) any later version.
  44. This program is distributed in the hope that it will be useful,
  45. but WITHOUT ANY WARRANTY; without even the implied warranty of
  46. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  47. GNU General Public License for more details.
  48. You should have received a copy of the GNU General Public License
  49. along with this program. If not, see <http://www.gnu.org/licenses/>.
  50. ## Footnotes
  51. - 1: [^](#macro-mode-macros-and-customized-keycodes) The `M_MDSWP` keycode is used in my keymaps in the following locations:
  52. - [KC60](../../keyboards/kc60/keymaps/noroadsleft/keymap.c#L111)
  53. - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c#L93)
  54. - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c#L66)
  55. - 2: [^](#emulated-non-us-backslash) `ANSI_NUBS_ROW` and `ANSI_NUBS_COL` are in the following locations:
  56. - [KC60](../../keyboards/kc60/keymaps/noroadsleft/config.h#L35-L36)
  57. - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h#L26-L27)
  58. - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h#L19-L20)