Browse Source

update skyloong/gk87/bl

pull/22668/head
NaturalZh 1 month ago
parent
commit
6e51169e86
4 changed files with 21 additions and 20 deletions
  1. +0
    -0
      keyboards/skyloong/gk87/bl/ansi/keyboard.json
  2. +1
    -1
      keyboards/skyloong/gk87/bl/ansi/keymaps/via/keymap.c
  3. +20
    -19
      keyboards/skyloong/gk87/bl/bl.c
  4. +0
    -0
      keyboards/skyloong/gk87/bl/iso/keyboard.json

keyboards/skyloong/gk87/bl/ansi/info.json → keyboards/skyloong/gk87/bl/ansi/keyboard.json View File


+ 1
- 1
keyboards/skyloong/gk87/bl/ansi/keymaps/via/keymap.c View File

@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_WIN_INDEX] = LAYOUT_all(
_______, KC_F14, KC_F15, G(KC_TAB), KC_WSCH, G(C(KC_S)), KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, KC_SCRL, KC_PAUS,
_______, _______, _______, _______, _______, _______, DF(_WIN), DF(_MAC), _______, _______, BL_TOGG, BL_BRTG, BL_OFF, KC_DEL, KC_INS, KC_HOME, KC_PGUP,
_______, _______, _______, _______, _______, _______, DF(_WIN), DF(_MAC), _______, _______, BL_TOGG, BL_BRTG, BL_BRTG, KC_DEL, KC_INS, KC_HOME, KC_PGUP,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_UP,


+ 20
- 19
keyboards/skyloong/gk87/bl/bl.c View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
bool DIS_BRETH = 0;
bool dis_breath = 0;
void suspend_power_down_kb() {
writePinHigh(MAC_PIN);
@ -36,33 +36,34 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return false;
case BL_TOGG:
if (record->event.pressed){
if(is_backlight_breathing()) {
backlight_disable_breathing();
DIS_BRETH = 1;
if (record->event.pressed) {
if (is_backlight_breathing() && get_backlight_level()){
dis_breath = 1;
backlight_disable_breathing();
backlight_enable();
}else if(DIS_BRETH && !(is_backlight_enabled())){
backlight_enable_breathing();
DIS_BRETH = 0;
}
} else if (dis_breath && !is_backlight_enabled()){
backlight_enable_breathing();
dis_breath = 0;
}
return true;
}
return true;
case BL_BRTG:
if (record->event.pressed){
if(DIS_BRETH || !(is_backlight_enabled())) {
return false;
}
}
return true;
case BL_BRTG:
if (record->event.pressed) {
if (dis_breath || !is_backlight_enabled()){
return false;
}
return true;
}
case BL_UP:
DIS_BRETH = 0;
dis_breath = 0;
return true;
case BL_DOWN:
if (record->event.pressed){
if(DIS_BRETH || !(is_backlight_enabled())) {
if(dis_breath || !(is_backlight_enabled())) {
return false;
}
}


keyboards/skyloong/gk87/bl/iso/info.json → keyboards/skyloong/gk87/bl/iso/keyboard.json View File


Loading…
Cancel
Save