View Single Post
dwould's Avatar
Posts: 529 | Thanked: 262 times | Joined on Dec 2008 @ Eastleigh, Hampshire, UK
#311
Originally Posted by pycage View Post
Yes, it is.


The volume keys are simply F7 and F8 keys. However, the hildon desktop captures the key events before they reach your application, so you have to set a Xatom property on the window that wants to receive these keys:
Code:
# we need to notify Maemo5 that we want to use the volume keys
self.__window.window.property_change("_HILDON_ZOOM_KEY_ATOM",
    "XA_INTEGER", 32,
    gtk.gdk.PROP_MODE_REPLACE,
    [1])
That is, call property_change on the GdkWindow (window) member of a GtkWindow or HildonWindow.
thank you! i'm kind of interested in where you found this information. i searched everywhere (or so i thought) it really threw me that nothing came through to my on_key_press method.

thanks again
__________________
----------
N900
http://danielwould.wordpress.com
Check out Witter, a twitter client for N900
http://danielwould.wordpress.com/witter

If Witter isn't working for you, eg crashes/doesn't start, gives errors etc etc. Please run it from x-term using:
run-standalone.sh python2.5 /opt/witter/witter.py

This will generate diagnostic output. Without this I cannot help you.