summaryrefslogtreecommitdiffstats
path: root/keyboards/durgod/k310
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/durgod/k310')
-rw-r--r--keyboards/durgod/k310/k310.c12
-rw-r--r--keyboards/durgod/k310/k310.h17
-rw-r--r--keyboards/durgod/k310/keymaps/default/keymap.json2
-rw-r--r--keyboards/durgod/k310/keymaps/via/keymap.c2
4 files changed, 5 insertions, 28 deletions
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 */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,