Merge remote-tracking branch 'qmk/master' into merge-2022-07-11

This commit is contained in:
Ilya Zhuravlev
2022-07-11 18:29:50 -06:00
7121 changed files with 170388 additions and 28118 deletions

View File

@ -144,7 +144,7 @@ void clear_oneshot_swaphands(void) {
* FIXME: needs doc
*/
void set_oneshot_layer(uint8_t layer, uint8_t state) {
if (!keymap_config.oneshot_disable) {
if (keymap_config.oneshot_enable) {
oneshot_layer_data = layer << 3 | state;
layer_on(layer);
oneshot_layer_time = timer_read();
@ -169,7 +169,7 @@ void reset_oneshot_layer(void) {
void clear_oneshot_layer_state(oneshot_fullfillment_t state) {
uint8_t start_state = oneshot_layer_data;
oneshot_layer_data &= ~state;
if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) && !keymap_config.oneshot_disable) {
if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) && keymap_config.oneshot_enable) {
layer_off(get_oneshot_layer());
reset_oneshot_layer();
}
@ -187,8 +187,8 @@ bool is_oneshot_layer_active(void) {
* FIXME: needs doc
*/
void oneshot_set(bool active) {
if (keymap_config.oneshot_disable != active) {
keymap_config.oneshot_disable = active;
if (keymap_config.oneshot_enable != active) {
keymap_config.oneshot_enable = active;
eeconfig_update_keymap(keymap_config.raw);
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
dprintf("Oneshot: active: %d\n", active);
@ -200,7 +200,7 @@ void oneshot_set(bool active) {
* FIXME: needs doc
*/
void oneshot_toggle(void) {
oneshot_set(!keymap_config.oneshot_disable);
oneshot_set(!keymap_config.oneshot_enable);
}
/** \brief enable oneshot
@ -220,7 +220,7 @@ void oneshot_disable(void) {
}
bool is_oneshot_enabled(void) {
return keymap_config.oneshot_disable;
return keymap_config.oneshot_enable;
}
#endif
@ -392,7 +392,7 @@ void del_oneshot_mods(uint8_t mods) {
* FIXME: needs doc
*/
void set_oneshot_mods(uint8_t mods) {
if (!keymap_config.oneshot_disable) {
if (keymap_config.oneshot_enable) {
if (oneshot_mods != mods) {
oneshot_time = timer_read();
oneshot_mods = mods;