1
0

Merge pull request #270 from jeffgran/single-tap-toggle

enable TAPPING_TOGGLE=1 to work correctly
This commit is contained in:
tmk 2015-12-05 18:15:10 +09:00
commit 6d144be8fd

View File

@ -131,10 +131,17 @@ void process_action(keyrecord_t *record)
case MODS_TAP_TOGGLE: case MODS_TAP_TOGGLE:
if (event.pressed) { if (event.pressed) {
if (tap_count <= TAPPING_TOGGLE) { if (tap_count <= TAPPING_TOGGLE) {
if (mods & get_mods()) {
dprint("MODS_TAP_TOGGLE: toggle mods off\n");
unregister_mods(mods);
} else {
dprint("MODS_TAP_TOGGLE: toggle mods on\n");
register_mods(mods); register_mods(mods);
} }
}
} else { } else {
if (tap_count < TAPPING_TOGGLE) { if (tap_count < TAPPING_TOGGLE) {
dprint("MODS_TAP_TOGGLE: release : unregister_mods\n");
unregister_mods(mods); unregister_mods(mods);
} }
} }