summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-06-03 06:07:03 +0000
committerQMK Bot <hello@qmk.fm>2021-06-03 06:07:03 +0000
commiteaa2e0cb24772d055414a7819da627e66701d03c (patch)
tree0a16426c773a90ac79cbb7d844914e0f1467570a
parent65fe74fde06d2574c1cd5145283b963cf441a17a (diff)
parenta0cc2dc6d0b4fafc9f7d70b98254e32d032c3f17 (diff)
downloadqmk_firmware-eaa2e0cb24772d055414a7819da627e66701d03c.tar.gz
qmk_firmware-eaa2e0cb24772d055414a7819da627e66701d03c.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h20
-rw-r--r--keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c8
-rw-r--r--keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/rules.mk1
-rw-r--r--keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h3
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/config.h3
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/keymap.c2
-rw-r--r--users/noroadsleft/noroadsleft.c28
-rw-r--r--users/noroadsleft/readme.md38
8 files changed, 67 insertions, 36 deletions
diff --git a/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h
new file mode 100644
index 0000000000..1c1f66c89f
--- /dev/null
+++ b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/config.h
@@ -0,0 +1,20 @@
+/* Copyright 2021 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
+
+#define ANSI_NUBS_ROW 3
+#define ANSI_NUBS_COL 2
diff --git a/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c
index ed8e98a05d..b948c9fb1d 100644
--- a/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c
+++ b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c
@@ -54,10 +54,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_FN] = LAYOUT_65_ansi(
- 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,
- _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, _______,
- _______, M_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______,
- _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TO(_SY), _______, _______, _______,
+ 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, DM_REC1,
+ _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, DM_REC2,
+ _______, M_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, DM_RSTP, DM_PLY1,
+ _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TO(_SY), _______, _______, DM_PLY2,
_______, _______, _______, TG(_NP), _______, _______, _______, _______, _______, _______
),
diff --git a/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/rules.mk b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/rules.mk
new file mode 100644
index 0000000000..9e6797ed30
--- /dev/null
+++ b/keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/rules.mk
@@ -0,0 +1 @@
+DYNAMIC_MACRO_ENABLE = yes
diff --git a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h
index 0ff70e95cc..73bb22aea4 100644
--- a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h
+++ b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h
@@ -22,3 +22,6 @@
#define PRODUCT KBD75 rev1
#define BACKLIGHT_BREATHING
+
+#define ANSI_NUBS_ROW 4
+#define ANSI_NUBS_COL 2
diff --git a/keyboards/kc60/keymaps/noroadsleft/config.h b/keyboards/kc60/keymaps/noroadsleft/config.h
index 267407ded9..1078f3b025 100644
--- a/keyboards/kc60/keymaps/noroadsleft/config.h
+++ b/keyboards/kc60/keymaps/noroadsleft/config.h
@@ -31,3 +31,6 @@
#endif
#define NO_ACTION_ONESHOT
+
+#define ANSI_NUBS_ROW 3
+#define ANSI_NUBS_COL 2
diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c
index fc56ea54ff..a72c96cfa6 100644
--- a/keyboards/kc60/keymaps/noroadsleft/keymap.c
+++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c
@@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_SY] = LAYOUT_60_ansi(
- TG(_SY), TO(_QW), TO(_DV), TO(_CM), TG(_Q2), XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX,
+ TG(_SY), TO(_DV), TO(_QW), TO(_CM), TG(_Q2), XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX,
XXXXXXX, XXXXXXX, M_MDSWP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
diff --git a/users/noroadsleft/noroadsleft.c b/users/noroadsleft/noroadsleft.c
index ac63427256..82b0b0568f 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) {
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);
+ SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " # @ " QMK_VERSION);
}
return false;
case G_PUSH:
@@ -118,21 +129,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
macroMode ^= 1;
}
return false;
- case KC_Z:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_RALT ) {
- register_code(KC_NUBS);
- } else {
- register_code(KC_Z);
- }
- } else {
- if ( get_mods() & MOD_MASK_RALT ) {
- unregister_code(KC_NUBS);
- } else {
- unregister_code(KC_Z);
- }
- };
- return false;
case KC_1 ... KC_0:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_RALT) {
diff --git a/users/noroadsleft/readme.md b/users/noroadsleft/readme.md
index 0a2153471b..bee6ee272f 100644
--- a/users/noroadsleft/readme.md
+++ b/users/noroadsleft/readme.md
@@ -21,9 +21,9 @@ Some frequently used Git commands.
| Keycode | Output | Output with <kbd>Shift</kbd> |
| :---------------------------------- | :--------------------- | :--------------------------- |
-| [`G_PUSH`](./noroadsleft.c#L38-L42) | `git push origin ` | `git push origin ` |
-| [`G_FTCH`](./noroadsleft.c#L43-L52) | `git fetch upstream ` | `git pull upstream ` |
-| [`G_BRCH`](./noroadsleft.c#L53-L62) | `master` | `$(git branch-name)` |
+| [`G_PUSH`](./noroadsleft.c#L49-L53) | `git push origin ` | `git push origin ` |
+| [`G_FTCH`](./noroadsleft.c#L54-L63) | `git fetch upstream ` | `git pull upstream ` |
+| [`G_BRCH`](./noroadsleft.c#L64-L73) | `master` | `$(git branch-name)` |
`$(git branch-name)` is an alias for `git rev-parse --abbrev-ref HEAD`, which normally returns the name of the current branch.
@@ -33,24 +33,28 @@ Some of my macros and keycodes do different things depending on the value of the
| Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with <kbd>Shift</kbd> |
| :------------------------------------- | :--------------- | :--------------- | :------------------------------------- |
-| [`M_SALL`](./noroadsleft.c#L63-L71) | `Ctrl+A` | `Cmd+A` | `Cmd+A` |
-| [`M_UNDO`](./noroadsleft.c#L72-L84) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` |
-| [`M_CUT`](./noroadsleft.c#L85-L93) | `Ctrl+X` | `Cmd+X` | `Cmd+X` |
-| [`M_COPY`](./noroadsleft.c#L94-L102) | `Ctrl+C` | `Cmd+C` | `Cmd+C` |
-| [`M_PASTE`](./noroadsleft.c#L103-L115) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` |
-| [`KC_PSCR`](./noroadsleft.c#L166-L174) | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` |
-| [`KC_HOME`](./noroadsleft.c#L175-L183) | `KC_HOME` | `Cmd+Left` | `Cmd+Left` |
-| [`KC_END`](./noroadsleft.c#L184-L192) | `KC_END` | `Cmd+Right` | `Cmd+Right` |
+| [`M_SALL`](./noroadsleft.c#L74-L82) | `Ctrl+A` | `Cmd+A` | `Cmd+A` |
+| [`M_UNDO`](./noroadsleft.c#L83-L95) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` |
+| [`M_CUT`](./noroadsleft.c#L96-L104) | `Ctrl+X` | `Cmd+X` | `Cmd+X` |
+| [`M_COPY`](./noroadsleft.c#L105-L113) | `Ctrl+C` | `Cmd+C` | `Cmd+C` |
+| [`M_PASTE`](./noroadsleft.c#L114-L126) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` |
+| [`KC_PSCR`](./noroadsleft.c#L162-L170) | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` |
+| [`KC_HOME`](./noroadsleft.c#L171-L179) | `KC_HOME` | `Cmd+Left` | `Cmd+Left` |
+| [`KC_END`](./noroadsleft.c#L180-L188) | `KC_END` | `Cmd+Right` | `Cmd+Right` |
-### [Emulated Non-US Backslash](./noroadsleft.c#L121-L135)
+### [Emulated Non-US Backslash](./noroadsleft.c#L32-L42)
-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`.
+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.
-### [Emulated Numeric Keypad](./noroadsleft.c#L136-L150)
+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>2</sup>](#footnotes)
+
+### [Emulated Numeric Keypad](./noroadsleft.c#L132-L146)
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#L151-L165)
+### [Emulated Extended Function Keys](./noroadsleft.c#L147-L161)
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`.
@@ -79,3 +83,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
- [KC60](../../keyboards/kc60/keymaps/noroadsleft/keymap.c#L111)
- [KBDfans KBD75 rev1](../../keyboards/kbdfans/kbd75/keymaps/noroadsleft/keymap.c#L93)
- [CoseyFannitutti Discipline](../../keyboards/coseyfannitutti/discipline/keymaps/noroadsleft/keymap.c#L66)
+- 2: [^](#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)