From a0cc2dc6d0b4fafc9f7d70b98254e32d032c3f17 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 2 Jun 2021 23:06:30 -0700 Subject: Update noroadsleft userspace and keymaps (2021-06-02) (#13086) --- users/noroadsleft/noroadsleft.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'users/noroadsleft/noroadsleft.c') 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) { -- cgit v1.2.3