hodgef / simple-keyboard

Javascript Virtual Keyboard - Customizable, responsive and lightweight
https://virtual-keyboard.js.org/
MIT License
2.21k stars 170 forks source link

Toggle Keys On and Off? #2382

Closed jakesk43 closed 3 hours ago

jakesk43 commented 5 hours ago

You have to try to add an option or switch in the code to hold or toggle a key on the keyboard like pressing it repeatedly but only by pressing it on and off once. I read that this was solved in the layoutCandidates option but I don't see the option I want, sorry. Please check it out. Thanks.

hodgef commented 3 hours ago

Hello @jakesk43,

If you want to disable the default button hold behavior, you can pass in the option disableButtonHold. Then, you can certainly add in your own logic to achieve your desired result.

Simple-keyboard was meant to be extensible by the user. Feel free to give it a try and if you come across a specific issue, please share a sandbox link with your issue and I can try to help.

Thanks, Francisco Hodge