Merge remote-tracking branch 'qmk/master' into merge-2023-06-03
This commit is contained in:
@ -47,6 +47,12 @@ static uint8_t oneshot_locked_mods = 0;
|
||||
uint8_t get_oneshot_locked_mods(void) {
|
||||
return oneshot_locked_mods;
|
||||
}
|
||||
void add_oneshot_locked_mods(uint8_t mods) {
|
||||
if ((oneshot_locked_mods & mods) != mods) {
|
||||
oneshot_locked_mods |= mods;
|
||||
oneshot_locked_mods_changed_kb(oneshot_locked_mods);
|
||||
}
|
||||
}
|
||||
void set_oneshot_locked_mods(uint8_t mods) {
|
||||
if (mods != oneshot_locked_mods) {
|
||||
oneshot_locked_mods = mods;
|
||||
@ -59,6 +65,12 @@ void clear_oneshot_locked_mods(void) {
|
||||
oneshot_locked_mods_changed_kb(oneshot_locked_mods);
|
||||
}
|
||||
}
|
||||
void del_oneshot_locked_mods(uint8_t mods) {
|
||||
if (oneshot_locked_mods & mods) {
|
||||
oneshot_locked_mods &= ~mods;
|
||||
oneshot_locked_mods_changed_kb(oneshot_locked_mods);
|
||||
}
|
||||
}
|
||||
static uint16_t oneshot_time = 0;
|
||||
bool has_oneshot_mods_timed_out(void) {
|
||||
return QS_oneshot_timeout > 0 && TIMER_DIFF_16(timer_read(), oneshot_time) >= QS_oneshot_timeout;
|
||||
@ -73,7 +85,7 @@ bool has_oneshot_mods_timed_out(void) {
|
||||
* L => are layer bits
|
||||
* S => oneshot state bits
|
||||
*/
|
||||
static int8_t oneshot_layer_data = 0;
|
||||
static uint8_t oneshot_layer_data = 0;
|
||||
|
||||
inline uint8_t get_oneshot_layer(void) {
|
||||
return oneshot_layer_data >> 3;
|
||||
|
Reference in New Issue
Block a user