summaryrefslogtreecommitdiff
path: root/users/noroadsleft
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-11-26 18:36:45 +0000
committerGitHub <noreply@github.com>2023-11-27 05:36:45 +1100
commit1ed03f498fa204178c2696c510ac6a2cd8524e2d (patch)
treeb97c1f983b7e4b57c007d0feedadd3ad3e39062b /users/noroadsleft
parent4908d4b1ca260efecf3613e6517aa3a6f2034876 (diff)
Remove userspace keymaps (#22544)
Diffstat (limited to 'users/noroadsleft')
-rw-r--r--users/noroadsleft/noroadsleft.c140
-rw-r--r--users/noroadsleft/noroadsleft.h37
-rw-r--r--users/noroadsleft/readme.md85
-rw-r--r--users/noroadsleft/rules.mk1
4 files changed, 0 insertions, 263 deletions
diff --git a/users/noroadsleft/noroadsleft.c b/users/noroadsleft/noroadsleft.c
deleted file mode 100644
index 80d18f4026..0000000000
--- a/users/noroadsleft/noroadsleft.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright 2020-2022 James Young (@noroadsleft)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "noroadsleft.h"
-#include "version.h"
-
-__attribute__((weak))
-bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; };
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_keymap(keycode, record)) {
- return false;
- }
-#if defined(ANSI_NUBS_ROW) && defined(ANSI_NUBS_COL)
- // if ANSI_NUBS_ROW and ANSI_NUBS_COL are both defined, and Right Alt mod is active
- if ( record->event.key.row == ANSI_NUBS_ROW && record->event.key.col == ANSI_NUBS_COL && get_mods() & MOD_MASK_RALT ) {
- if (record->event.pressed) {
- register_code(KC_NUBS);
- } else {
- unregister_code(KC_NUBS);
- }
- return false;
- }
-#endif
- switch (keycode) {
- case VRSN:
- if (record->event.pressed) {
- SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " # @ " QMK_VERSION);
- }
- return false;
- case G_PUSH:
- if (record->event.pressed) {
- SEND_STRING("git push origin ");
- };
- return false;
- case G_FTCH:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- clear_mods();
- SEND_STRING("git pull upstream ");
- } else {
- SEND_STRING("git fetch upstream ");
- }
- };
- return false;
- case G_BRCH:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- clear_mods();
- SEND_STRING("master");
- } else {
- SEND_STRING("$(git branch-name)");
- }
- };
- return false;
- case G_PWD:
- if (record->event.pressed) {
- clear_mods();
- SEND_STRING("$( pwd | sed -e 's;^.*/keyboards/;;' -e 's;/;_;g')");
- };
- return false;
- case M_SALL:
- if (record->event.pressed) {
- tap_code16(C(KC_A));
- }
- return false;
- case M_UNDO:
- if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(KC_Z);
- } else {
- unregister_code(KC_Z);
- unregister_code(KC_LCTL);
- }
- return false;
- case M_CUT:
- if (record->event.pressed) {
- tap_code16(C(KC_X));
- }
- return false;
- case M_COPY:
- if (record->event.pressed) {
- tap_code16(C(KC_C));
- }
- return false;
- case M_PASTE:
- if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(KC_V);
- } else {
- unregister_code(KC_V);
- unregister_code(KC_LCTL);
- }
- return false;
- case KC_1 ... KC_0:
- if (record->event.pressed) {
- if (get_mods() & MOD_MASK_RALT) {
- register_code(keycode + 0x3B);
- } else {
- register_code(keycode);
- }
- } else {
- if (get_mods() & MOD_MASK_RALT) {
- unregister_code(keycode + 0x3B);
- } else {
- unregister_code(keycode);
- }
- }
- return false;
- case KC_F1 ... KC_F12:
- if (record->event.pressed) {
- if (get_mods() & MOD_MASK_RALT) {
- register_code(keycode + 0x2E);
- } else {
- register_code(keycode);
- }
- } else {
- if (get_mods() & MOD_MASK_RALT) {
- unregister_code(keycode + 0x2E);
- } else {
- unregister_code(keycode);
- }
- }
- return false;
- } // switch()
- return true;
-};
diff --git a/users/noroadsleft/noroadsleft.h b/users/noroadsleft/noroadsleft.h
deleted file mode 100644
index 1d1a547562..0000000000
--- a/users/noroadsleft/noroadsleft.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright 2020-2022 James Young (@noroadsleft)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include QMK_KEYBOARD_H
-
-#define MOD_MASK_RALT (MOD_BIT(KC_RALT))
-
-enum userspace_keycodes {
- VRSN = SAFE_RANGE,
- G_PUSH,
- G_FTCH,
- G_BRCH,
- G_PWD,
- M_SALL,
- M_UNDO,
- M_CUT,
- M_COPY,
- M_PASTE,
- KEYMAP_SAFE_RANGE
-};
-
-bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
diff --git a/users/noroadsleft/readme.md b/users/noroadsleft/readme.md
deleted file mode 100644
index d32e66917f..0000000000
--- a/users/noroadsleft/readme.md
+++ /dev/null
@@ -1,85 +0,0 @@
-# @noroadsleft's Userspace
-
-This directory holds the code that's the same for every keyboard I use in QMK, which is currently:
-
-- `kc60`
-- `kbdfans/kbd75/rev1`
-- `coseyfannitutti/discipline`
-
-
-## Macro Features and Custom Keycodes
-
-### [VRSN](./noroadsleft.c#L44-L48)
-
-Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
-
- kc60:noroadsleft # @ 0.6.326-6-gae6d7b-dirty
-
-### Git Macros
-
-Some frequently used Git commands.
-
-| Keycode | Output | Output with <kbd>Shift</kbd> |
-| :---------------------------------- | :---------------------------------------------------- | :---------------------------------------------------- |
-| [`G_PUSH`](./noroadsleft.c#L44-L48) | `git push origin ` | `git push origin ` |
-| [`G_FTCH`](./noroadsleft.c#L49-L58) | `git fetch upstream ` | `git pull upstream ` |
-| [`G_BRCH`](./noroadsleft.c#L59-L68) | `master` | `$(git branch-name)` |
-| [`G_PWD`](./noroadsleft.c#L69-L74) | `$( pwd \| sed -e 's;^.*/keyboards/;;' -e 's;/;_;g')` | `$( pwd \| sed -e 's;^.*/keyboards/;;' -e 's;/;_;g')` |
-
-`$(git branch-name)` is an alias for `git rev-parse --abbrev-ref HEAD`, which normally returns the name of the current branch.
-
-The `G_PWD` macro outputs a shell expansion that returns the current working directory in relation to `qmk_firmware/keyboards/`, and with the slashes replaced with underscores. I do a lot of keyboard refactoring in QMK, and this is a string I use regularly.
-
-### Customized Keycodes
-
-I used to have a boolean variable that changed the functionality of these keycodes, but I no longer work in the environment that I wrote the functionality for, so I took it out. The keycodes still exist because all my `keymap.c` files reference the custom keycodes I defined.
-
-| Keycode | Action |
-| :------------------------------------ | :-------- |
-| [`M_SALL`](./noroadsleft.c#L75-L79) | `Ctrl+A` |
-| [`M_UNDO`](./noroadsleft.c#L80-L88) | `Ctrl+Z` |
-| [`M_CUT`](./noroadsleft.c#L89-L93) | `Ctrl+X` |
-| [`M_COPY`](./noroadsleft.c#L94-L98) | `Ctrl+C` |
-| [`M_PASTE`](./noroadsleft.c#L99-L107) | `Ctrl+V` |
-
-### [Emulated Non-US Backslash](./noroadsleft.c#L27-L37)
-
-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.
-
-This macro simulates the Non-US Backslash key if I hold Right Alt and tap the key to the right of Left Shift.
-
-Requires defining `ANSI_NUBS_ROW` and `ANSI_NUBS_COL` in `config.h` at the keymap level.[<sup>1</sup>](#footnotes)
-
-### [Emulated Numeric Keypad](./noroadsleft.c#L108-L122)
-
-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 °.
-
-### [Emulated Extended Function Keys](./noroadsleft.c#L123-L137)
-
-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`.
-
-
-## License
-
-Copyright 2020-2022 James Young (@noroadsleft)
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-## Footnotes
-
-- 1: [^](#emulated-non-us-backslash) `ANSI_NUBS_ROW` and `ANSI_NUBS_COL` are in the following locations:
- - [KC60](../../keyboards/kc60/keymaps/noroadsleft/config.h#L35-L36)
- - [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h#L26-L27)
- - [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h#L19-L20)
diff --git a/users/noroadsleft/rules.mk b/users/noroadsleft/rules.mk
deleted file mode 100644
index 2ae1988142..0000000000
--- a/users/noroadsleft/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-SRC += noroadsleft.c \ No newline at end of file