Tony's ramblings on Open Source Software, Life and Photography

PyGame Virtual Keyboard

Since I'm working on an application using Pygame for the Nokia n800 I was faced with a way of providing user input of text.

Most games would simply... use the keyboard. Unfortunately for a touchscreen computer with no keyboard that kind of limits you. You can't simply use GTK widgets to display a text input box, because the screen is being rendered using SDL.

So, I developed a very simple touchscreen input virtual keyboard using pygame for the Maemo interface:

As you can see, it only does upper and lower case letters, space and numbers, which suits my needs just fine.

It's free, licensed under the GPL Version 2.

Download the source from Maemo.org.


Chckdsk!'s picture

Does your keyboard

Does your keyboard multitouch capabilities? Or does that depends on the OS? I would like to make a game that needs touch screen input and (if its possible) multitouch.

tony's picture

No multitouch - the Nokia

No multitouch - the Nokia n800 that this was designed for does not have a multitouch screen.

BN900's picture

Dear Sir, Excellent job with

Dear Sir,

Excellent job with your keyboard! Me and people here: (http://talk.maemo.org/showthread.php?t=39919) were talking about ways to get around the inability to type in portrait mode in the N900. Among the ideas one of us came up with, s/he suggested we create a python keyboard that would always be open in the background. Whenever we need to type in portrait mode, we would switch to it via multitasking, type what we want and press a single (copy all) button [there should also be a "Clear All" Button) and then paste the text anywhere we want. This would only be simple text for messaging and basic email. Is there a way to port your keyboard to function as such? You do not even have to tinker with the layout of the keys. Just keep them as they are, but rotate the letters 90 degrees to be readable in portrait mode. Do you think you can help out?

Thanks for reading :)

Bassem