summaryrefslogtreecommitdiff
path: root/keyboards/durgod/dgk6x
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-02-22 01:15:18 +0000
committerGitHub <noreply@github.com>2023-02-22 01:15:18 +0000
commit0512e286a6aabe8645ed980abec82790a1f881cd (patch)
tree50184f33e46c9fa2ee4e49cba1b05f44f623e4c2 /keyboards/durgod/dgk6x
parent26854f59402f3f4b7ca5cfe0f3dd665a680715f5 (diff)
Remove magic bodges from via keymaps (#19890)
Diffstat (limited to 'keyboards/durgod/dgk6x')
-rw-r--r--keyboards/durgod/dgk6x/dgk6x.c12
-rw-r--r--keyboards/durgod/dgk6x/dgk6x.h16
-rw-r--r--keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json2
-rw-r--r--keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json2
-rw-r--r--keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json2
-rw-r--r--keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json2
-rw-r--r--keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json2
-rw-r--r--keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json2
8 files changed, 9 insertions, 31 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",