We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello! I'm using the ketai library to call the keyboard on android device. With this keyboard the system variable "key" work fine to get all the letters key and numbers but the ENTER or DELETE key doesn't work. This problem is apparently very old because this post of 2015 talk about this problem too but haven't answer for this. So is there any solution to solve this problem? Thanks you by advance :)
Answers
In what event are you catching these keys? in
void keyPressed(){}
? If you provide some code, I can see if I can reproduce it. Also you can comment in that github ticket and see what is the status, if it was already fixed.Kf
I've tried with a simple code like this one :
Did you check the example provided in the ketai.org website? Check under the UI section. Are you able to run that example in your device?
Kf
Yes I've tried the ketai UI example : the letters keys are well detect but the space key isn't never detect.
Yes, so it seems the codes provided by Processing do not much the ones output by ketai. I have modified your code to keep track of the last 3 codes detected by the system. I keep track of both key and keyCode values and tehy are presented in hex format.
In my example, the symbols # and ! triggered the ENTER's and BACKSPACE's alert dialog. However, some random key combination could trigger them as well.
So my advised, check the android library to see if they provide access to certain keyboards through the android API.
Notice that to toggle the keyboard, you have to hit the top part of the screen.
Kf
https://developer.android.com/reference/android/view/KeyEvent.html
Kf
Thanks you @kfrajer but this isn't work too. I will check the on the developer.android site to get more information.*
Ps : With my code I saw that the BACKSPACE key is detect by the key "1" and the ENTER key is detect by the "3" key.