Skip to content

Commit

Permalink
Remove magic bodges from via keymaps (#19890)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Feb 22, 2023
1 parent 26854f5 commit 0512e28
Show file tree
Hide file tree
Showing 28 changed files with 19 additions and 222 deletions.
12 changes: 3 additions & 9 deletions keyboards/durgod/dgk6x/dgk6x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
16 changes: 0 additions & 16 deletions keyboards/durgod/dgk6x/dgk6x.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 3 additions & 9 deletions keyboards/durgod/k310/k310.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
17 changes: 0 additions & 17 deletions keyboards/durgod/k310/k310.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion keyboards/durgod/k310/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
"_______", "GUI_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
]
],
"author": "tylert",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/k310/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
_______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_LAYER3] = LAYOUT_all( /* Layer 3 */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
12 changes: 3 additions & 9 deletions keyboards/durgod/k320/k320.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
17 changes: 0 additions & 17 deletions keyboards/durgod/k320/k320.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion keyboards/durgod/k320/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
"_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
"_______", "GUI_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
]
],
"author": "tylert",
Expand Down
2 changes: 1 addition & 1 deletion keyboards/durgod/k320/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
_______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_LAYER3] = LAYOUT_all( /* Layer 3 */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down
12 changes: 0 additions & 12 deletions keyboards/yandrstudio/buff67v3/buff67v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
10 changes: 0 additions & 10 deletions keyboards/yandrstudio/buff67v3/buff67v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
3 changes: 0 additions & 3 deletions keyboards/yandrstudio/nz64/nz64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions keyboards/yandrstudio/nz64/nz64.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@
#else
#define URGB_K KC_TRNS
#endif

#define LOCK_GUI KC_F23
3 changes: 0 additions & 3 deletions keyboards/yandrstudio/nz67v2/nz67v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions keyboards/yandrstudio/nz67v2/nz67v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,3 @@
#else
# define URGB_K KC_TRNS
#endif

#define LOCK_GUI KC_F23
19 changes: 0 additions & 19 deletions keyboards/yandrstudio/wave75/wave75.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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;
}
15 changes: 0 additions & 15 deletions keyboards/yandrstudio/wave75/wave75.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 0 additions & 19 deletions keyboards/yandrstudio/yr6095/yr6095.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
15 changes: 0 additions & 15 deletions keyboards/yandrstudio/yr6095/yr6095.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit 0512e28

Please sign in to comment.