playdate.keyboard.text to “initial text”
- Press B
- While holding B call
Expected result: Keyboard is shown with “initial text”
What happened instead: Keyboard is shown with “initial tex”
I’d expect B not to remove a letter if it’s already pressed just like A doesn’t add a letter if it’s already pressed.
Thanks for checking.
I’ll take a look at this, thanks for reporting the problem!
I finally found some time to take a look at this, but I don’t seem to be able to reproduce the behavior you were seeing. Do you have some code that demonstrates the problem?
This is the little game I was using to test:
KeyboardTester.zip (3.8 KB)
Holding the B button down while opening the keyboard by pressing A in this project doesn’t seem to result in any characters being deleted from the text, but please let me know if I’m missing something!
You’re right. It doesn’t appear to happen when I hold B in your code but if I replace
BButtonDown and press B to open it is cut off again.
Background: I first encountered the issue after trying to use B instead of A to confirm and then noticed that it also happened when just holding B but I can’t reproduce the second case anymore.
Ah ha, you’re right, switching it to the B button to open the keyboard results in the deleted letter. Good catch, I’ll get a fix in for that!