orhun / daktilo

Turn your keyboard into a typewriter! 📇
https://daktilo.cli.rs/
Apache License 2.0
1.05k stars 19 forks source link

Key down sound not play if another key is already pressed. #127

Open sloganking opened 9 months ago

sloganking commented 9 months ago

Describe the bug

Pressing down two keys in a row only creates one key down sound. That is until the first key is released, at which point another key down sound will be played for the second key that was pressed down. But that sound is played out of sync with when that key was pressed.

To reproduce

PressDown KeyA, (hear keypress sound) PressDown KeyB (Don't hear a keypress sound)

Expected behavior

A Keydown sound should be played each time a key is pressed down. Regardless of whether another key is already pressed down or not.

Software information

sloganking commented 9 months ago

Completing #46 might inadvertently fix this as well

sloganking commented 9 months ago

I have implemented the code for this and can post it after I sleep. Thinking about it though. Do we want to be able to play two key down sounds in a row? Modern keyboards allow that but I am not sure if typewriters forced you to unpress one key before pressing another. Let me know.

Edit:

Reguardless, the current functionality of pressing down 5 keys and hearing one pressed down sound. And unpressing them all and hearing 5 unpressed sounds, is not ideal.