Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2024-10-11 23:06:28 +00:00
commit 9711706f74
3 changed files with 10 additions and 36 deletions

View File

@ -150,13 +150,10 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
void keyboard_pre_init_kb(void) { void keyboard_pre_init_kb(void) {
gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock
gpio_write_pin_low(LED_WIN_LOCK_PIN); gpio_write_pin_low(LED_WIN_LOCK_PIN);
keyboard_pre_init_user(); keyboard_pre_init_user();
} }
bool led_update_kb(led_t led_state) { void housekeeping_task_kb(void){
bool res = led_update_user(led_state); gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
if (res) {
gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
}
return res;
} }

View File

@ -1,16 +1,8 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below. enum layer_names {
// The underscores don't mean anything - you can have a layer called STUFF or any other name. _BASE,
// Layer names don't all need to be of the same length, obviously, and you can also skip them _FN
// entirely and just use numbers.
#define _BASE 0
#define _FN 1
enum custom_keycodes {
TG_GUI = SAFE_RANGE
}; };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -27,17 +19,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, UG_NEXT, UG_HUEU, UG_SATU, UG_VALU, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, _______, KC_MUTE, KC_END, _______, UG_NEXT, UG_HUEU, UG_SATU, UG_VALU, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUSE, _______, KC_MUTE, KC_END,
_______, UG_TOGG, UG_HUED, UG_SATD, UG_VALD, _______, _______, _______, _______, _______, _______, _______, _______, _______, UG_TOGG, UG_HUED, UG_SATD, UG_VALD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
_______, TG_GUI,_______, QK_BOOT, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT _______, GU_TOGG, _______, QK_BOOT, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
) )
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if(record->event.pressed) {
switch(keycode) {
case TG_GUI:
keymap_config.no_gui ^= 1;
return false;
}
}
return true;
}

View File

@ -151,14 +151,10 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
void keyboard_pre_init_kb(void) { void keyboard_pre_init_kb(void) {
gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock
gpio_write_pin_low(LED_WIN_LOCK_PIN); gpio_write_pin_low(LED_WIN_LOCK_PIN);
keyboard_pre_init_user(); keyboard_pre_init_user();
} }
bool led_update_kb(led_t led_state) { void housekeeping_task_kb(void){
bool res = led_update_user(led_state); gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
if (res) {
led_update_ports(led_state);
gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
}
return res;
} }