[Sugar-devel] Gamepad keys in jhbuild
Manuel Kaufmann
humitos at gmail.com
Tue Apr 17 10:42:55 EDT 2012
Hello,
I'd like to emulate the Gamepad keys in sugar-jhbuild but I didn't
find the way yet. I'm reading those keys are the same than Numpad
keys, witht the same code (at least in olpcgames module)[1]
In fact, if I run "xev" from the Terminal Activity I can see the codes:
KeyRelease event, serial 31, synthetic NO, window 0x1200001,
root 0x121, subw 0x0, time 826229527, (248,459), root:(249,487),
state 0x10, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
XLookupString gives 1 bytes: (37) "7"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x1200001,
root 0x121, subw 0x0, time 826229613, (248,459), root:(249,487),
state 0x10, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
XLookupString gives 1 bytes: (39) "9"
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x1200001,
root 0x121, subw 0x0, time 826229613, (248,459), root:(249,487),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XmbLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
But I'm not getting that information from Maze Activity: it should add
a new player to the actual game.
[1] http://wiki.laptop.org/go/Pygame_wrapper
--
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
More information about the Sugar-devel
mailing list