Any softkeyboard using Lemur? How do we do this within jme for tablet, smartphone aps

can anyone here share or point me to sites where i can read tutorial on how to implement softkeyboard withinj jme3 when a textfield is clicked this should rollup just like in android apps but not using any android lib but simply jme3 and lemur. please help…

As far as i can remember jME’s inputManager already permits to show softkeyboard. However, I also experienced some problems when testing apps on different versions of Android, including keyboard not showing.

1 Like

Presuming JME’s ability to show the soft keyword works, you will need to register a focus listener with your text fields so that they call this when focused. It doesn’t look like there is a way to do this globally at the moment.

I should fix that someday and make it a stylable action or something.

2 Likes

what about virtual keyboard purely using jme3/lemur… i prefer it this way because it i portable. Any existing code for this? i think this is a typical problem. its just basically something that rolls up when a textfield is entered/touched. i really need this. please help…

Do you mean creating yourself a keyboard? Yes, it is possible and it is the most portable and safe way of implementing typing in your game. However, it is also the most expensive way to do that.

1 Like

yeah, even if just digits only.i think it’s doable. mayb just add a listener to to texfielld when touched or clicked. roll up a virtual keypad( digits) throuhh which to type the values. i think it is not that hard. it just have to connect the textfield and virtual keypad. note that the virtual keypad runs within jme3/ lemur no other libraries needed. i have a feeling it has been made already.

and how do we simulate keypress so that when a digit button of the virtual keypad is pressed, a digit gets into the textfield?. any thoughts @pspeed

This depends entirely on the GUI library you’re using. I don’t know how lemur works so I can’t help you, I’m sorry.

I wouldn’t… JME doesn’t really let you insert your own key events. Just collect what the user has typed in your virtual pad the same way a soft keyboard does… then insert the whole text directly into the document model.

You could also insert one character at a time to the DocumentModel. Just not using raw key events.

1 Like