[maemo-developers] hardware key access using Phyton
From: Eero Tamminen eero.tamminen at nokia.comDate: Mon Dec 3 11:31:26 EET 2007
- Previous message: hardware key access using Phyton
- Next message: Embed microb
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
ext Martin Grimme wrote:
> The hardware keys simply map to standard keys on a PC keyboard.
> Do something like this:
>
> def on_key(src, ev):
> keyval = ev.keyval
> key = gtk.gdk.keyval_name(keyval)
>
> if (key == "Escape"):
> do_ something()
> elif (key == "F6"): # fullscreen button
> do_something()
> elif (key == "F7"):
> do_something() # + button
> elif (key == "F8"):
> do_something() # - button
>
>
> win = hildon.Window()
> win.connect("key-press-event", on_key)
Hm. Don't python bindings offer the same symbolic key names that
are defined in hildon-1/hildon/hildon-defines.h header?
- Eero
- Previous message: hardware key access using Phyton
- Next message: Embed microb
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
