B4J Question keyboard input with any key

Richard Kahl

New Member
Licensed User
Longtime User
I would like to reproduce a given text letter by letter with any key. Maybe someone has an idea for that.
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
I dont understand the question, what do you mean my reproduce?

"Text".lenght
"Text".charat(0)

You can iterate thru the string and get each individual char
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Or may be you mean hear the keyboard??
 
Upvote 0

roerGarcia

Active Member
Licensed User
Longtime User
1 We start with a certain text (entered by the user or from another source)
2 The user types any key and the program rewrites the original text one character with each keystroke, whatever it is.
3 is that what you want?

Pseudo code:
text="this is a text test"
do while length(text)
   get keyboard-input
   prints next character(text)
end do
 
Upvote 0
Top