Monday, February 17, 2014

Using the Android Keyboard with Pygame

I modified the GUI example I posted on GitHub yesterday to include an example of using the Android software keyboard  for text input.

I had to build my own text box input since I couldn't get it to work with SGC.   There's still a few glitches with the keyboard and I don't suggest you use the code in a production application, but it should be suitable for my son's next class.

I'm sure there's an easier way to handle the text from the keyboard and I would love to see another person's code.  However, since the whole purpose of my project is to teach my son programming, it should be useful to teach him to build a text input box with the Android keyboard. 

This only works with individual keys right now and it won't work with Swype.

On the pgs4a forum, there was some question as to whether or not the soft keyboard actually worked.  I thought I would create a quick example to show that it does work.

No comments:

Post a Comment