Author: ArcRiley
Date: 2008-01-02 07:10:48 +0000 (Wed, 02 Jan 2008)
New Revision: 725

Modified:
   trunk/pysoy/examples/collide_blocks.py
   trunk/pysoy/examples/joint_blocks.py
   trunk/pysoy/examples/shapes.py
   trunk/pysoy/examples/stereo_blocks.py
   trunk/pysoy/examples/vid_canvas.py
   trunk/pysoy/src/_core-x11/Screen.pxi
Log:
Scancodes on X11 now start at 0 to == Windows scancodes


Modified: trunk/pysoy/examples/collide_blocks.py
===================================================================
--- trunk/pysoy/examples/collide_blocks.py      2008-01-02 07:07:52 UTC (rev 
724)
+++ trunk/pysoy/examples/collide_blocks.py      2008-01-02 07:10:48 UTC (rev 
725)
@@ -27,7 +27,7 @@
 key['U'] = soy.actions.Force(bks['teal'],    0,    0, -100)
 key['V'] = soy.actions.Force(bks['teal'],    0,    0,  100)
 key['q'] = soy.actions.Quit()
-key[ 9 ] = soy.actions.Quit() # 9 = esc key
+key[ 1 ] = soy.actions.Quit() # 9 = esc key
 wcn = soy.controllers.Window(win)
 wcn['close'] = soy.actions.Quit()
 

Modified: trunk/pysoy/examples/joint_blocks.py
===================================================================
--- trunk/pysoy/examples/joint_blocks.py        2008-01-02 07:07:52 UTC (rev 
724)
+++ trunk/pysoy/examples/joint_blocks.py        2008-01-02 07:10:48 UTC (rev 
725)
@@ -24,7 +24,7 @@
 key['U'] = soy.actions.Force(bks['teal'],    0,    0, -100)
 key['V'] = soy.actions.Force(bks['teal'],    0,    0,  100)
 key['q'] = soy.actions.Quit()
-key[ 9 ] = soy.actions.Quit() # 9 = esc key
+key[ 1 ] = soy.actions.Quit() # 9 = esc key
 wcn = soy.controllers.Window(win)
 wcn['close'] = soy.actions.Quit()
 

Modified: trunk/pysoy/examples/shapes.py
===================================================================
--- trunk/pysoy/examples/shapes.py      2008-01-02 07:07:52 UTC (rev 724)
+++ trunk/pysoy/examples/shapes.py      2008-01-02 07:10:48 UTC (rev 725)
@@ -14,7 +14,7 @@
 mat = soy.materials.Steel()
 key = soy.controllers.Keyboard(win)
 key['q'] = soy.actions.Quit()
-key[ 9 ] = soy.actions.Quit() # 9 = esc key
+key[ 1 ] = soy.actions.Quit() # 9 = esc key
 wcn = soy.controllers.Window(win)
 wcn['close'] = soy.actions.Quit()
 

Modified: trunk/pysoy/examples/stereo_blocks.py
===================================================================
--- trunk/pysoy/examples/stereo_blocks.py       2008-01-02 07:07:52 UTC (rev 
724)
+++ trunk/pysoy/examples/stereo_blocks.py       2008-01-02 07:10:48 UTC (rev 
725)
@@ -29,7 +29,7 @@
 
 key = soy.controllers.Keyboard(win)
 key['q'] = soy.actions.Quit()
-key[ 9 ] = soy.actions.Quit() # 9 = esc key
+key[ 1 ] = soy.actions.Quit() # 9 = esc key
 wcn = soy.controllers.Window(win)
 wcn['close'] = soy.actions.Quit()
 

Modified: trunk/pysoy/examples/vid_canvas.py
===================================================================
--- trunk/pysoy/examples/vid_canvas.py  2008-01-02 07:07:52 UTC (rev 724)
+++ trunk/pysoy/examples/vid_canvas.py  2008-01-02 07:10:48 UTC (rev 725)
@@ -11,7 +11,7 @@
 can = soy.widgets.Canvas(win, texture=vid)
 key = soy.controllers.Keyboard(win)
 key['q'] = soy.actions.Quit()
-key[ 9 ] = soy.actions.Quit() # 9 = esc key
+key[ 1 ] = soy.actions.Quit() # 9 = esc key
 wcn = soy.controllers.Window(win)
 wcn['close'] = soy.actions.Quit()
 

Modified: trunk/pysoy/src/_core-x11/Screen.pxi
===================================================================
--- trunk/pysoy/src/_core-x11/Screen.pxi        2008-01-02 07:07:52 UTC (rev 
724)
+++ trunk/pysoy/src/_core-x11/Screen.pxi        2008-01-02 07:10:48 UTC (rev 
725)
@@ -171,12 +171,12 @@
           if _event.type == glx.KeyPress :
             _keysym = glx.XLookupKeysym(&_event.xkey,0)
             (<Window> _windows.list[i])._eventKeyDown   (_event.xkey.time,
-                                                         _event.xkey.keycode,
+                                                         _event.xkey.keycode-8,
                                                          _keysym)
           elif _event.type == glx.KeyRelease :
             _keysym = glx.XLookupKeysym(&_event.xkey,0)
             (<Window> _windows.list[i])._eventKeyUp     (_event.xkey.time,
-                                                         _event.xkey.keycode,
+                                                         _event.xkey.keycode-8,
                                                          _keysym)
           elif _event.type == glx.ButtonPress :
             (<Window> _windows.list[i])._eventButtonDown(_event.xbutton.time,

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to