Make default layer size 16-bit (#15286)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
@@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _STD:
|
||||
@@ -121,4 +121,3 @@ void matrix_scan_user(void) {
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -102,7 +102,7 @@ const size_t defaultlayers_n = sizeof(defaultlayers) / sizeof(defaultlayers[0]);
|
||||
// New keycode KC_LAYO rotates between available default layers (for e.g.,
|
||||
// selecting a base layout). Shift+KC_LAYO makes the current one persistent.
|
||||
bool process_record_layout(uint16_t keycode, keyrecord_t *record) {
|
||||
uint32_t default_layer;
|
||||
uint8_t default_layer;
|
||||
uint8_t i;
|
||||
#if defined(AUDIO_ENABLE)
|
||||
float saved_song[][2] = SONG(COIN_SOUND);
|
||||
@@ -121,7 +121,7 @@ bool process_record_layout(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
// rotate default layer.
|
||||
// find the current default layer
|
||||
default_layer = biton32(default_layer_state);
|
||||
default_layer = get_highest_layer(default_layer_state);
|
||||
// find next valid default layer
|
||||
for (i = 1; i < defaultlayers_n; i++) {
|
||||
if (defaultlayers[(default_layer + i) % defaultlayers_n]) {
|
||||
|
@@ -77,7 +77,7 @@ static bool singular_key = false;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
uint8_t layer;
|
||||
layer = biton32(layer_state); // get the current layer
|
||||
layer = get_highest_layer(layer_state); // get the current layer
|
||||
|
||||
//custom layer handling for tri_layer,
|
||||
switch (keycode) {
|
||||
@@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _MALT:
|
||||
@@ -193,4 +193,3 @@ void matrix_scan_user(void) {
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -181,7 +181,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
}
|
||||
uint8_t layer;
|
||||
layer = biton32(layer_state); // get the current layer
|
||||
layer = get_highest_layer(layer_state); // get the current layer
|
||||
|
||||
//custom layer handling for tri_layer,
|
||||
switch (keycode) {
|
||||
@@ -310,7 +310,7 @@ void music_scale_user(void)
|
||||
#endif
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
|
@@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
@@ -205,5 +205,3 @@ void matrix_scan_user(void) {
|
||||
void matrix_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX); // or UC_WINC
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user