mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-11 06:29:15 +00:00
Updated tri-layer feature
This commit is contained in:
parent
e6ab714a96
commit
59b8b85761
2 changed files with 23 additions and 18 deletions
19
.gitignore
vendored
19
.gitignore
vendored
|
@ -68,3 +68,22 @@ util/Win_Check_Output.txt
|
|||
secrets.tar
|
||||
id_rsa_*
|
||||
/.vs
|
||||
keyboards/bunyan/bunyan.c
|
||||
keyboards/bunyan/bunyan.h
|
||||
keyboards/bunyan/config.h
|
||||
keyboards/bunyan/featherble/config.h
|
||||
keyboards/bunyan/featherble/rules.mk
|
||||
keyboards/bunyan/keymaps/default/config.h
|
||||
keyboards/bunyan/keymaps/default/keymap.c
|
||||
keyboards/bunyan/keymaps/default/readme.md
|
||||
keyboards/bunyan/keymaps/salty/config.h
|
||||
keyboards/bunyan/keymaps/salty/keymap.c
|
||||
keyboards/bunyan/keymaps/salty/rules.mk
|
||||
keyboards/bunyan/matrix.c
|
||||
keyboards/bunyan/promicro/config.h
|
||||
keyboards/bunyan/promicro/rules.mk
|
||||
keyboards/bunyan/readme.md
|
||||
keyboards/bunyan/rules.mk
|
||||
keyboards/bunyan/keymaps/insertsnideremarks/config.h
|
||||
keyboards/bunyan/keymaps/insertsnideremarks/rules.mk
|
||||
keyboards/bunyan/keymaps/insertsnideremarks/keymap.c
|
||||
|
|
|
@ -571,6 +571,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST);
|
||||
}
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
|
@ -658,24 +662,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return false;
|
||||
break;
|
||||
case ENTNS:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_NUMBERS);
|
||||
update_tri_layer(_NUMBERS, _NUMBERS2, _ADJUST);
|
||||
} else {
|
||||
layer_off(_NUMBERS);
|
||||
update_tri_layer(_NUMBERS, _NUMBERS2, _ADJUST);
|
||||
}
|
||||
break;
|
||||
case DELNS:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_NUMBERS2);
|
||||
update_tri_layer(_NUMBERS, _NUMBERS2, _ADJUST);
|
||||
} else {
|
||||
layer_off(_NUMBERS2);
|
||||
update_tri_layer(_NUMBERS, _NUMBERS2, _ADJUST);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
Loading…
Reference in a new issue