B4J Question Mimicking a keyboard

rspitzer

Active Member
I don't write code that uses a keyboard, all input is done through a touchscreen. In the past and also now, to get user input I would design an on screen keyboard (this is a desktop app, not android related) to then capture the touched button, display it on an input text field on the screen, rather simple - no problems. Unfortunately I also have to keep track of a cursor position in the code (my own cursor) so when the on screen back space key is pressed things happen properly. Anyway lost of code, done it before, but I was wondering, if there is a keyboard present the OS handles all this stuff rather well. But I don't have a keyboard attached, so and probably the answer is no (one of the forum threads I looked up alluded to this) , so is there anyway, of basically once the screen is touched on one of my keys, I just though the ASCII letter into a mimic keyboard port (like an API call) and everything is just handled - no extra code required, no keeping track of arrays etc.. ????
 

rspitzer

Active Member
This is excellent, save's me a bundle of code. Who would of thought that I should have searched for Robot class to get an answer. Consider this answered.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…