Update keyboards/m65/keymaps/default/keymap.c

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
This commit is contained in:
Alin Marin Elena 2021-03-29 22:21:36 +01:00 committed by GitHub
parent 756f674407
commit e2145f02d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,8 +87,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case(TT(_LWR)): case(TT(_LWR)):
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE){ if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
toggle_lwr = toggle_lwr ? false : true; // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle.
toggle_lwr = !layer_state_is(_LWR);
} }
return true; return true;
break; break;