@ -41,7 +41,7 @@ byte TapDance::last_tap_dance_col_;
// --- actions ---
// --- actions ---
void TapDance : : interrupt ( void ) {
void TapDance : : interrupt ( byte row , byte col ) {
uint8_t idx = last_tap_dance_key_ . raw - ranges : : TD_FIRST ;
uint8_t idx = last_tap_dance_key_ . raw - ranges : : TD_FIRST ;
tapDanceAction ( idx , last_tap_dance_row_ , last_tap_dance_col_ , tap_count_ [ idx ] , Interrupt ) ;
tapDanceAction ( idx , last_tap_dance_row_ , last_tap_dance_col_ , tap_count_ [ idx ] , Interrupt ) ;
@ -49,6 +49,10 @@ void TapDance::interrupt(void) {
end_time_ = 0 ;
end_time_ = 0 ;
KeyboardHardware . maskKey ( row , col ) ;
kaleidoscope : : hid : : sendKeyboardReport ( ) ;
kaleidoscope : : hid : : releaseAllKeys ( ) ;
if ( bitRead ( pressed_state_ , idx ) )
if ( bitRead ( pressed_state_ , idx ) )
return ;
return ;
@ -133,6 +137,7 @@ Key TapDance::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_s
if ( ! keyIsPressed ( key_state ) & & ! keyWasPressed ( key_state ) ) {
if ( ! keyIsPressed ( key_state ) & & ! keyWasPressed ( key_state ) ) {
if ( isTapDance ( mapped_key ) )
if ( isTapDance ( mapped_key ) )
return Key_NoKey ;
return Key_NoKey ;
return mapped_key ;
return mapped_key ;
}
}
@ -141,8 +146,12 @@ Key TapDance::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_s
return mapped_key ;
return mapped_key ;
if ( keyToggledOn ( key_state ) )
if ( keyToggledOn ( key_state ) )
interrupt ( ) ;
interrupt ( row , col ) ;
if ( KeyboardHardware . isKeyMasked ( row , col ) ) {
KeyboardHardware . unMaskKey ( row , col ) ;
return Key_NoKey ;
}
return mapped_key ;
return mapped_key ;
}
}
@ -171,7 +180,7 @@ Key TapDance::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_s
if ( ! keyToggledOn ( key_state ) )
if ( ! keyToggledOn ( key_state ) )
return Key_NoKey ;
return Key_NoKey ;
interrupt ( ) ;
interrupt ( row , col ) ;
}
}
}
}