@@ -1637,15 +1637,22 @@ export function getActiveWordTopAfterAppend(data: string): number {
16371637}
16381638
16391639// this means input, delete or composition
1640- function afterAnyTestInput ( correctInput : boolean | null ) : void {
1641- if (
1642- correctInput === true ||
1643- Config . playSoundOnError === "off" ||
1644- Config . blindMode
1645- ) {
1640+ function afterAnyTestInput (
1641+ type : "textInput" | "delete" | "compositionUpdate" ,
1642+ correctInput : boolean | null
1643+ ) : void {
1644+ if ( type === "textInput" ) {
1645+ if (
1646+ correctInput === true ||
1647+ Config . playSoundOnError === "off" ||
1648+ Config . blindMode
1649+ ) {
1650+ void SoundController . playClick ( ) ;
1651+ } else {
1652+ void SoundController . playError ( ) ;
1653+ }
1654+ } else if ( type === "delete" ) {
16461655 void SoundController . playClick ( ) ;
1647- } else {
1648- void SoundController . playError ( ) ;
16491656 }
16501657
16511658 const acc : number = Numbers . roundTo2 ( TestStats . calculateAccuracy ( ) ) ;
@@ -1684,18 +1691,18 @@ export function afterTestTextInput(
16841691 }
16851692 }
16861693
1687- afterAnyTestInput ( correct ) ;
1694+ afterAnyTestInput ( "textInput" , correct ) ;
16881695}
16891696
16901697export function afterTestCompositionUpdate ( ) : void {
16911698 void updateActiveWordLetters ( ) ;
16921699 // correct needs to be true to get the normal click sound
1693- afterAnyTestInput ( true ) ;
1700+ afterAnyTestInput ( "compositionUpdate" , true ) ;
16941701}
16951702
16961703export function afterTestDelete ( ) : void {
16971704 void updateActiveWordLetters ( ) ;
1698- afterAnyTestInput ( null ) ;
1705+ afterAnyTestInput ( "delete" , null ) ;
16991706}
17001707
17011708export function beforeTestWordChange (
0 commit comments