Make default layer size 16-bit (#15286)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
@@ -190,7 +190,7 @@ static bool is_macro1_recording = false;
|
||||
// The current set of active layers (as a bitmask).
|
||||
// There is a global 'layer_state' variable but it is set after the call
|
||||
// to layer_state_set_user().
|
||||
static uint32_t current_layer_state = 0;
|
||||
static layer_state_t current_layer_state = 0;
|
||||
layer_state_t layer_state_set_user(layer_state_t state);
|
||||
|
||||
// Method called at the end of the tap dance on the TAP_MACRO key. That key is
|
||||
|
@@ -200,7 +200,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
@@ -262,4 +262,3 @@ void matrix_scan_user(void) {
|
||||
// }
|
||||
// return true;
|
||||
//}
|
||||
|
||||
|
@@ -98,7 +98,7 @@ static bool is_macro1_recording = false;
|
||||
// The current set of active layers (as a bitmask).
|
||||
// There is a global 'layer_state' variable but it is set after the call
|
||||
// to layer_state_set_user().
|
||||
static uint32_t current_layer_state = 0;
|
||||
static layer_state_t current_layer_state = 0;
|
||||
layer_state_t layer_state_set_user(layer_state_t state);
|
||||
|
||||
// Method called at the end of the tap dance on the TAP_MACRO key. That key is
|
||||
|
@@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -725,7 +725,7 @@ void led_set_user(uint8_t usb_led) {
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_2_off();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
uint8_t layer = biton32(state);
|
||||
uint8_t layer = get_highest_layer(state);
|
||||
|
||||
switch (layer) {
|
||||
case DVORAK:
|
||||
|
@@ -370,7 +370,7 @@ LEADER_EXTERNS();
|
||||
void matrix_scan_user(void)
|
||||
{
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
|
||||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) &&
|
||||
@@ -677,4 +677,4 @@ void matrix_init_user(void)
|
||||
wait_ms(1000);
|
||||
|
||||
rgblight_effect_knight(50);
|
||||
}
|
||||
}
|
||||
|
@@ -284,7 +284,7 @@ void matrix_init_user(void) {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -813,7 +813,7 @@ case RU_7:
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
uint8_t layer = biton32(state);
|
||||
uint8_t layer = get_highest_layer(state);
|
||||
|
||||
// ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -218,7 +218,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
uint8_t layer = biton32(state);
|
||||
uint8_t layer = get_highest_layer(state);
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
@@ -431,4 +431,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -1057,7 +1057,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
uint8_t layer = biton32(state);
|
||||
uint8_t layer = get_highest_layer(state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -157,7 +157,7 @@ void matrix_init_user(void) {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -245,11 +245,11 @@ void keyboard_post_init_user_keymap(void) {
|
||||
}
|
||||
|
||||
// light up leds based on the layer
|
||||
uint32_t layer_state_set_user_keymap(uint32_t state) {
|
||||
layer_state_t layer_state_set_user_keymap(layer_state_t state) {
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (biton32(state)) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case LR_SYSCTL:
|
||||
ergodox_right_led_3_on(); // blue
|
||||
break;
|
||||
@@ -306,7 +306,7 @@ uint32_t layer_state_set_user_keymap(uint32_t state) {
|
||||
|
||||
// SYSCTL on first tap, MOUSE ON second tap
|
||||
// void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// uint8_t layer = biton32(layer_state);
|
||||
// uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
// switch(state->count) {
|
||||
// case 1:
|
||||
|
@@ -228,7 +228,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (biton32(state)) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case SYMB:
|
||||
ergodox_right_led_1_on();
|
||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); }
|
||||
@@ -268,4 +268,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@@ -138,7 +138,7 @@ void keyboard_post_init_user(void) {
|
||||
};
|
||||
|
||||
// Runs whenever there is a layer state change.
|
||||
uint32_t layer_state_set_user(layer_state_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
|
@@ -228,7 +228,7 @@ void matrix_init_user(void) {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -139,7 +139,7 @@ void matrix_init_user(void) {
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
if(layer == 1)
|
||||
{
|
||||
@@ -157,7 +157,7 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
if(keyboard_report->mods & MOD_BIT(KC_LSFT))
|
||||
{
|
||||
{
|
||||
ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
|
||||
ergodox_right_led_1_on ();
|
||||
} else {
|
||||
@@ -182,7 +182,7 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
if(keyboard_report->mods & MOD_BIT(KC_LCTRL))
|
||||
{
|
||||
{
|
||||
ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
|
||||
ergodox_right_led_3_on ();
|
||||
} else {
|
||||
@@ -195,7 +195,7 @@ void matrix_scan_user(void) {
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led){
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK))
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK))
|
||||
{
|
||||
capsOn = true;
|
||||
}else {
|
||||
|
@@ -228,7 +228,7 @@ void matrix_init_user(void) {
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
@@ -330,7 +330,7 @@ void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
|
Reference in New Issue
Block a user