- Home /
Question by
EAWilliams · Aug 29, 2021 at 11:52 PM ·
inputfieldgetkeydowngetkey
How to stop repeated letter/backspace entry in an input field when they key is held down?
I'm using a TMP input field and would like to override some default behaviour. Specifically, when a letter is held down, it repeats. Similarly, when backspace (or delete) is held down, it removes multiple characters.
I would like it so that if a letter is held down, that letter is only entered once. I would also like backspace to only remove one character if it is held down.
I am already implementing Input.GetKeyDown()
to perform a certain task, so I believe I will need to do something similar here, but I can't quite work out how.
Thanks.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613042210im_/https://answers.unity.com/themes/thub/images/avi.jpg)