diff --git a/keyboards/gh80_3000/config.h b/keyboards/gh80_3000/config.h deleted file mode 100644 index 5f36081323..0000000000 --- a/keyboards/gh80_3000/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/gh80_3000/keyboard.json b/keyboards/gh80_3000/keyboard.json index f5f4ba7533..c88f5c8232 100644 --- a/keyboards/gh80_3000/keyboard.json +++ b/keyboards/gh80_3000/keyboard.json @@ -16,6 +16,18 @@ "mousekey": false, "nkro": true }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "indicators": { + "num_lock": "B5", + "caps_lock": "B6", + "scroll_lock": "B7", + "on_state": 0 + }, "matrix_pins": { "cols": ["C7", "C6", "B4", "D7", "B3", "B2", "B0", "E6", "B1", "D1", "D6"], "rows": ["F4", "F1", "F0", "F5", "F6", "F7", "D4", "D5", "D3", "D2", "D0"] diff --git a/keyboards/gh80_3000/keymaps/ansi_std/keymap.c b/keyboards/gh80_3000/keymaps/ansi_std/keymap.c index f99d522ead..2f1e410656 100644 --- a/keyboards/gh80_3000/keymaps/ansi_std/keymap.c +++ b/keyboards/gh80_3000/keymaps/ansi_std/keymap.c @@ -11,30 +11,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ) }; - -bool led_update_user(led_t led_state) { - if (led_state.num_lock) { - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); - PORTB &= ~(1 << 5); - } - - if (led_state.caps_lock) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - if (led_state.scroll_lock) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - return false; -} diff --git a/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c b/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c index b3f2426e88..a949b11941 100644 --- a/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c +++ b/keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c @@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -bool led_update_user(led_t led_state) { - if (led_state.num_lock) { - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); - PORTB &= ~(1 << 5); - } - - if (led_state.caps_lock) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - if (led_state.scroll_lock) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - return false; -} diff --git a/keyboards/gh80_3000/keymaps/default/keymap.c b/keyboards/gh80_3000/keymaps/default/keymap.c index b74127fc5e..08f43c1d68 100644 --- a/keyboards/gh80_3000/keymaps/default/keymap.c +++ b/keyboards/gh80_3000/keymaps/default/keymap.c @@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -bool led_update_user(led_t led_state) { - if (led_state.num_lock) { - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); - PORTB &= ~(1 << 5); - } - - if (led_state.caps_lock) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - if (led_state.scroll_lock) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - return false; -} diff --git a/keyboards/gh80_3000/keymaps/iso_default/keymap.c b/keyboards/gh80_3000/keymaps/iso_default/keymap.c index 4c4b10f458..ff2b373a54 100644 --- a/keyboards/gh80_3000/keymaps/iso_default/keymap.c +++ b/keyboards/gh80_3000/keymaps/iso_default/keymap.c @@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -bool led_update_user(led_t led_state) { - if (led_state.num_lock) { - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); - PORTB &= ~(1 << 5); - } - - if (led_state.caps_lock) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - if (led_state.scroll_lock) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - return false; -} diff --git a/keyboards/gh80_3000/keymaps/iso_std/keymap.c b/keyboards/gh80_3000/keymaps/iso_std/keymap.c index 9559bde119..7783aae0a9 100644 --- a/keyboards/gh80_3000/keymaps/iso_std/keymap.c +++ b/keyboards/gh80_3000/keymaps/iso_std/keymap.c @@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -bool led_update_user(led_t led_state) { - if (led_state.num_lock) { - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); - PORTB &= ~(1 << 5); - } - - if (led_state.caps_lock) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - if (led_state.scroll_lock) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - return false; -} diff --git a/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c b/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c index 86054ba1fd..9108f6aba4 100644 --- a/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c +++ b/keyboards/gh80_3000/keymaps/iso_wkl/keymap.c @@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -bool led_update_user(led_t led_state) { - if (led_state.num_lock) { - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); - PORTB &= ~(1 << 5); - } - - if (led_state.caps_lock) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - if (led_state.scroll_lock) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - return false; -}