From 0512e286a6aabe8645ed980abec82790a1f881cd Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 22 Feb 2023 01:15:18 +0000 Subject: [PATCH] Remove magic bodges from via keymaps (#19890) --- keyboards/durgod/dgk6x/dgk6x.c | 12 +++-------- keyboards/durgod/dgk6x/dgk6x.h | 16 --------------- .../dgk6x/galaxy/keymaps/default/keymap.json | 2 +- .../dgk6x/galaxy/keymaps/via/keymap.json | 2 +- .../dgk6x/hades/keymaps/default/keymap.json | 2 +- .../dgk6x/hades/keymaps/via/keymap.json | 2 +- .../dgk6x/venus/keymaps/default/keymap.json | 2 +- .../dgk6x/venus/keymaps/via/keymap.json | 2 +- keyboards/durgod/k310/k310.c | 12 +++-------- keyboards/durgod/k310/k310.h | 17 ---------------- .../durgod/k310/keymaps/default/keymap.json | 2 +- keyboards/durgod/k310/keymaps/via/keymap.c | 2 +- keyboards/durgod/k320/k320.c | 12 +++-------- keyboards/durgod/k320/k320.h | 17 ---------------- .../durgod/k320/keymaps/default/keymap.json | 2 +- keyboards/durgod/k320/keymaps/via/keymap.c | 2 +- keyboards/yandrstudio/buff67v3/buff67v3.c | 12 ----------- keyboards/yandrstudio/buff67v3/buff67v3.h | 10 ---------- keyboards/yandrstudio/nz64/nz64.c | 3 --- keyboards/yandrstudio/nz64/nz64.h | 2 -- keyboards/yandrstudio/nz67v2/nz67v2.c | 3 --- keyboards/yandrstudio/nz67v2/nz67v2.h | 2 -- keyboards/yandrstudio/wave75/wave75.c | 19 ------------------ keyboards/yandrstudio/wave75/wave75.h | 15 -------------- keyboards/yandrstudio/yr6095/yr6095.c | 19 ------------------ keyboards/yandrstudio/yr6095/yr6095.h | 15 -------------- keyboards/yandrstudio/yr80/yr80.c | 20 ------------------- keyboards/yandrstudio/yr80/yr80.h | 15 -------------- 28 files changed, 19 insertions(+), 222 deletions(-) diff --git a/keyboards/durgod/dgk6x/dgk6x.c b/keyboards/durgod/dgk6x/dgk6x.c index 49496689f2..649821c5f2 100644 --- a/keyboards/durgod/dgk6x/dgk6x.c +++ b/keyboards/durgod/dgk6x/dgk6x.c @@ -39,20 +39,14 @@ void led_init_ports(void) { #ifndef WINLOCK_DISABLED -static bool win_key_locked = false; - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_TGUI: + case GUI_TOG: if (record->event.pressed) { - // Toggle GUI lock on key press - win_key_locked = !win_key_locked; - writePin(LED_WIN_LOCK_PIN, !win_key_locked); + // Toggle LED on key press + togglePin(LED_WIN_LOCK_PIN); } break; - case KC_LGUI: - if (win_key_locked) { return false; } - break; } return process_record_user(keycode, record); } diff --git a/keyboards/durgod/dgk6x/dgk6x.h b/keyboards/durgod/dgk6x/dgk6x.h index e2c6d19c27..676240fb31 100644 --- a/keyboards/durgod/dgk6x/dgk6x.h +++ b/keyboards/durgod/dgk6x/dgk6x.h @@ -25,22 +25,6 @@ # include "galaxy.h" #endif -#ifndef WINLOCK_DISABLED -// Define the TGUI key here so it is available in QMK configurator -enum DGK6X_keycodes { -#ifdef VIA_ENABLE - KC_TGUI = USER00, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE = SAFE_RANGE -#else - KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE -#endif -}; - -#undef SAFE_RANGE -#define SAFE_RANGE NEW_SAFE_RANGE -#endif /* WINLOCK_DISABLED */ - /* Function Prototype */ void off_all_leds(void); void on_all_leds(void); diff --git a/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json index 6c986333fc..c40cfac303 100644 --- a/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json +++ b/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json @@ -17,7 +17,7 @@ "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS" + "KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS" ], [ "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_RMOD","RGB_MOD", "RGB_TOG", diff --git a/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json b/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json index b90b858e0a..e8073ff800 100644 --- a/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json +++ b/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json @@ -17,7 +17,7 @@ "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS" + "KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS" ], [ "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_RMOD","RGB_MOD", "RGB_TOG", diff --git a/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json index bf20d1fadf..6be7665280 100644 --- a/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json +++ b/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json @@ -15,7 +15,7 @@ "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SCRL", "KC_PAUS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_INS", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS" + "KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS" ], [ "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "KC_TRNS", diff --git a/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json b/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json index 3c525ee047..0cef377c84 100644 --- a/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json +++ b/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json @@ -15,7 +15,7 @@ "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SCRL", "KC_PAUS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_INS", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS" + "KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS" ], [ "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "KC_TRNS", diff --git a/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json index a13761a7d7..e7ef2e9d4b 100644 --- a/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json +++ b/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json @@ -15,7 +15,7 @@ "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL", "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_PGDN", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" + "KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" ], [ "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", diff --git a/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json b/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json index abd51438e9..fd45625534 100644 --- a/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json +++ b/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json @@ -15,7 +15,7 @@ "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL", "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_PGDN", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" + "KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" ], [ "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", diff --git a/keyboards/durgod/k310/k310.c b/keyboards/durgod/k310/k310.c index fc41ee5657..cf2b618158 100644 --- a/keyboards/durgod/k310/k310.c +++ b/keyboards/durgod/k310/k310.c @@ -53,20 +53,14 @@ void led_init_ports(void) { } #ifndef WINLOCK_DISABLED -static bool win_key_locked = false; - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_TGUI: + case GUI_TOG: if (record->event.pressed) { - // Toggle GUI lock on key press - win_key_locked = !win_key_locked; - writePin(LED_WIN_LOCK_PIN, !win_key_locked); + // Toggle LED on key press + togglePin(LED_WIN_LOCK_PIN); } break; - case KC_LGUI: - if (win_key_locked) { return false; } - break; } return process_record_user(keycode, record); } diff --git a/keyboards/durgod/k310/k310.h b/keyboards/durgod/k310/k310.h index e106c8dbe6..94c582a452 100644 --- a/keyboards/durgod/k310/k310.h +++ b/keyboards/durgod/k310/k310.h @@ -78,23 +78,6 @@ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \ } - -#ifndef WINLOCK_DISABLED -// Define the TGUI key here so it is available in QMK configurator -enum K3x0_keycodes { -#ifdef VIA_ENABLE - KC_TGUI = USER00, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE = SAFE_RANGE -#else - KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE -#endif -}; - -#undef SAFE_RANGE -#define SAFE_RANGE NEW_SAFE_RANGE -#endif /* WINLOCK_DISABLED */ - /* Function Prototype */ void off_all_leds(void); void on_all_leds(void); diff --git a/keyboards/durgod/k310/keymaps/default/keymap.json b/keyboards/durgod/k310/keymaps/default/keymap.json index 41cf2f7bf4..7b9c0e7efb 100644 --- a/keyboards/durgod/k310/keymaps/default/keymap.json +++ b/keyboards/durgod/k310/keymaps/default/keymap.json @@ -17,7 +17,7 @@ "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", - "_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + "_______", "GUI_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" ] ], "author": "tylert", diff --git a/keyboards/durgod/k310/keymaps/via/keymap.c b/keyboards/durgod/k310/keymaps/via/keymap.c index ad7b61dfe4..c2f0ebd65f 100644 --- a/keyboards/durgod/k310/keymaps/via/keymap.c +++ b/keyboards/durgod/k310/keymaps/via/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_LAYER3] = LAYOUT_all( /* Layer 3 */ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c index 3cb2fd7d67..98527ba1b5 100644 --- a/keyboards/durgod/k320/k320.c +++ b/keyboards/durgod/k320/k320.c @@ -53,20 +53,14 @@ void led_init_ports(void) { } #ifndef WINLOCK_DISABLED -static bool win_key_locked = false; - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_TGUI: + case GUI_TOG: if (record->event.pressed) { - // Toggle GUI lock on key press - win_key_locked = !win_key_locked; - writePin(LED_WIN_LOCK_PIN, !win_key_locked); + // Toggle LED on key press + togglePin(LED_WIN_LOCK_PIN); } break; - case KC_LGUI: - if (win_key_locked) { return false; } - break; } return process_record_user(keycode, record); } diff --git a/keyboards/durgod/k320/k320.h b/keyboards/durgod/k320/k320.h index 67f0f5f214..a595166fa0 100644 --- a/keyboards/durgod/k320/k320.h +++ b/keyboards/durgod/k320/k320.h @@ -75,23 +75,6 @@ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ } - -#ifndef WINLOCK_DISABLED -// Define the TGUI key here so it is available in QMK configurator -enum K3x0_keycodes { -#ifdef VIA_ENABLE - KC_TGUI = USER00, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE = SAFE_RANGE -#else - KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE -#endif -}; - -#undef SAFE_RANGE -#define SAFE_RANGE NEW_SAFE_RANGE -#endif /* WINLOCK_DISABLED */ - /* Function Prototype */ void off_all_leds(void); void on_all_leds(void); diff --git a/keyboards/durgod/k320/keymaps/default/keymap.json b/keyboards/durgod/k320/keymaps/default/keymap.json index 697e7ceaba..f3bc38a49b 100644 --- a/keyboards/durgod/k320/keymaps/default/keymap.json +++ b/keyboards/durgod/k320/keymaps/default/keymap.json @@ -17,7 +17,7 @@ "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", - "_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + "_______", "GUI_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" ] ], "author": "tylert", diff --git a/keyboards/durgod/k320/keymaps/via/keymap.c b/keyboards/durgod/k320/keymaps/via/keymap.c index 5035e8f6fd..f91e752a29 100644 --- a/keyboards/durgod/k320/keymaps/via/keymap.c +++ b/keyboards/durgod/k320/keymaps/via/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_LAYER3] = LAYOUT_all( /* Layer 3 */ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/yandrstudio/buff67v3/buff67v3.c b/keyboards/yandrstudio/buff67v3/buff67v3.c index 62a74c82bb..5ba95efbcc 100644 --- a/keyboards/yandrstudio/buff67v3/buff67v3.c +++ b/keyboards/yandrstudio/buff67v3/buff67v3.c @@ -41,18 +41,6 @@ void keyboard_post_init_kb(void) { #endif -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { return false; } - switch(keycode) { - case LOCK_GUI: - process_magic(GUI_TOG, record); - return false; - default: - break; - } - return true; -} - void board_init(void) { AFIO->MAPR |= AFIO_MAPR_TIM3_REMAP_PARTIALREMAP; } diff --git a/keyboards/yandrstudio/buff67v3/buff67v3.h b/keyboards/yandrstudio/buff67v3/buff67v3.h index dc6f334a58..64970d3863 100644 --- a/keyboards/yandrstudio/buff67v3/buff67v3.h +++ b/keyboards/yandrstudio/buff67v3/buff67v3.h @@ -30,13 +30,3 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, KC_NO, K312, K313, K314 }, \ { K400, K401, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, KC_NO, K412, K413, K414 } \ } - -enum keyboard_keycodes { -#ifdef VIA_ENABLE - LOCK_GUI = USER00, - NEW_SAFE_RANGE = SAFE_RANGE // Important! -#else - LOCK_GUI = SAFE_RANGE, - NEW_SAFE_RANGE // Important! -#endif -}; diff --git a/keyboards/yandrstudio/nz64/nz64.c b/keyboards/yandrstudio/nz64/nz64.c index f1777ccae3..b5a53273df 100644 --- a/keyboards/yandrstudio/nz64/nz64.c +++ b/keyboards/yandrstudio/nz64/nz64.c @@ -103,9 +103,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { eeconfig_update_kb(kb_cums.raw); return false; #endif - case LOCK_GUI: - process_magic(GUI_TOG, record); - return false; default: return true; } diff --git a/keyboards/yandrstudio/nz64/nz64.h b/keyboards/yandrstudio/nz64/nz64.h index fd28481d55..41b2a056c5 100644 --- a/keyboards/yandrstudio/nz64/nz64.h +++ b/keyboards/yandrstudio/nz64/nz64.h @@ -36,5 +36,3 @@ #else #define URGB_K KC_TRNS #endif - -#define LOCK_GUI KC_F23 diff --git a/keyboards/yandrstudio/nz67v2/nz67v2.c b/keyboards/yandrstudio/nz67v2/nz67v2.c index 64e287b868..346556c25e 100644 --- a/keyboards/yandrstudio/nz67v2/nz67v2.c +++ b/keyboards/yandrstudio/nz67v2/nz67v2.c @@ -108,9 +108,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { eeconfig_update_kb(kb_cums.raw); return false; #endif - case LOCK_GUI: - process_magic(GUI_TOG, record); - return false; default: break; } diff --git a/keyboards/yandrstudio/nz67v2/nz67v2.h b/keyboards/yandrstudio/nz67v2/nz67v2.h index af66280132..f538c624d9 100644 --- a/keyboards/yandrstudio/nz67v2/nz67v2.h +++ b/keyboards/yandrstudio/nz67v2/nz67v2.h @@ -85,5 +85,3 @@ #else # define URGB_K KC_TRNS #endif - -#define LOCK_GUI KC_F23 diff --git a/keyboards/yandrstudio/wave75/wave75.c b/keyboards/yandrstudio/wave75/wave75.c index 4e0d748c23..56ffa33ade 100644 --- a/keyboards/yandrstudio/wave75/wave75.c +++ b/keyboards/yandrstudio/wave75/wave75.c @@ -14,22 +14,3 @@ * along with this program. If not, see . */ #include "wave75.h" - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { return false; } - switch(keycode) { - case KC_LG: - if (record->event.pressed) { - process_magic(GUI_TOG, record); - } - return false; - case KC_MACOS: - if (record->event.pressed) { - process_magic(CG_TOGG, record); - } - return false; - default: - return true; - } - return true; -} diff --git a/keyboards/yandrstudio/wave75/wave75.h b/keyboards/yandrstudio/wave75/wave75.h index 209a044466..e3b2f19f42 100644 --- a/keyboards/yandrstudio/wave75/wave75.h +++ b/keyboards/yandrstudio/wave75/wave75.h @@ -32,18 +32,3 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO }, \ { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, K509, K510, KC_NO, K512, K513, K514 } \ } - -enum keyboard_keycodes { -#ifdef VIA_ENABLE - LOCK_GUI = USER00, - TOG_MACOS_KEYMAP, - NEW_SAFE_RANGE = SAFE_RANGE // Important! -#else - LOCK_GUI = SAFE_RANGE, - TOG_MACOS_KEYMAP, - NEW_SAFE_RANGE // Important! -#endif -}; - -#define KC_LG LOCK_GUI -#define KC_MACOS TOG_MACOS_KEYMAP diff --git a/keyboards/yandrstudio/yr6095/yr6095.c b/keyboards/yandrstudio/yr6095/yr6095.c index 3ce43eb297..b4168279a7 100644 --- a/keyboards/yandrstudio/yr6095/yr6095.c +++ b/keyboards/yandrstudio/yr6095/yr6095.c @@ -43,22 +43,3 @@ void keyboard_post_init_kb(void) { } #endif - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { return false; } - switch(keycode) { - case KC_LG: - if (record->event.pressed) { - process_magic(GUI_TOG, record); - } - return false; - case KC_MACOS: - if (record->event.pressed) { - process_magic(CG_TOGG, record); - } - return false; - default: - return true; - } - return true; -} diff --git a/keyboards/yandrstudio/yr6095/yr6095.h b/keyboards/yandrstudio/yr6095/yr6095.h index f21ee93634..f09b65bdfa 100644 --- a/keyboards/yandrstudio/yr6095/yr6095.h +++ b/keyboards/yandrstudio/yr6095/yr6095.h @@ -57,18 +57,3 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ { K400, K401, K402, K403, K404, K405, KC_NO, K407, K408, K409, K410, K411, K412, K413 } \ } - -enum keyboard_keycodes { -#ifdef VIA_ENABLE - LOCK_GUI = USER00, - TOG_MACOS_KEYMAP, - NEW_SAFE_RANGE = SAFE_RANGE // Important! -#else - LOCK_GUI = SAFE_RANGE, - TOG_MACOS_KEYMAP, - NEW_SAFE_RANGE // Important! -#endif -}; - -#define KC_LG LOCK_GUI -#define KC_MACOS TOG_MACOS_KEYMAP diff --git a/keyboards/yandrstudio/yr80/yr80.c b/keyboards/yandrstudio/yr80/yr80.c index 0228545e8c..2752dc9230 100644 --- a/keyboards/yandrstudio/yr80/yr80.c +++ b/keyboards/yandrstudio/yr80/yr80.c @@ -37,23 +37,3 @@ void keyboard_post_init_kb(void) { } #endif - - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { return false; } - switch(keycode) { - case KC_LG: - if (record->event.pressed) { - process_magic(GUI_TOG, record); - } - return false; - case KC_MACOS: - if (record->event.pressed) { - process_magic(CG_TOGG, record); - } - return false; - default: - return true; - } - return true; -} diff --git a/keyboards/yandrstudio/yr80/yr80.h b/keyboards/yandrstudio/yr80/yr80.h index c5289696f8..79cbfca91b 100644 --- a/keyboards/yandrstudio/yr80/yr80.h +++ b/keyboards/yandrstudio/yr80/yr80.h @@ -33,18 +33,3 @@ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, KC_NO, KC_NO, K416 }, \ { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, K507, K508, K509, K510, KC_NO, KC_NO, KC_NO, K514, K515, K516 } \ } - -enum keyboard_keycodes { -#ifdef VIA_ENABLE - LOCK_GUI = USER00, - TOG_MACOS_KEYMAP, - NEW_SAFE_RANGE = SAFE_RANGE // Important! -#else - LOCK_GUI = SAFE_RANGE, - TOG_MACOS_KEYMAP, - NEW_SAFE_RANGE // Important! -#endif -}; - -#define KC_LG LOCK_GUI -#define KC_MACOS TOG_MACOS_KEYMAP