I've found event logging very helpful for these types of things. It will show you all the events that are firing so you can see what you are missing. Do this:
import pyglet window = pyglet.window.Window() ... window.push_handlers(pyglet.window.event.WindowEventLogger()) pyglet.app.run() And you'll see this in the terminal: on_key_press(symbol=RIGHT, modifiers=MOD_SHIFT) on_text_motion_select(motion=MOTION_RIGHT) on_key_release(symbol=RIGHT, modifiers=MOD_SHIFT) on_key_release(symbol=LSHIFT, modifiers=MOD_SHIFT) on_key_press(symbol=LCTRL, modifiers=) on_key_press(symbol=RIGHT, modifiers=MOD_CTRL) on_key_release(symbol=RIGHT, modifiers=MOD_CTRL) on_key_press(symbol=RIGHT, modifiers=MOD_CTRL) on_key_release(symbol=RIGHT, modifiers=MOD_CTRL) on_key_press(symbol=RIGHT, modifiers=MOD_CTRL) on_key_release(symbol=RIGHT, modifiers=MOD_CTRL) on_key_release(symbol=LCTRL, modifiers=MOD_CTRL) on_key_press(symbol=LOPTION, modifiers=) on_key_press(symbol=RIGHT, modifiers=MOD_OPTION) on_text_motion(motion=MOTION_NEXT_WORD) on_key_release(symbol=RIGHT, modifiers=MOD_OPTION) on_key_press(symbol=RIGHT, modifiers=MOD_OPTION) on_text_motion(motion=MOTION_NEXT_WORD) ... On Mar 25, 9:13 pm, "Richard Jones" <[EMAIL PROTECTED]> wrote: > On Wed, Mar 26, 2008 at 12:11 PM, Alex Holkner <[EMAIL PROTECTED]> > wrote: > > > On Wed, Mar 26, 2008 at 11:53 AM, aoeu256 <[EMAIL PROTECTED]> wrote: > > > > I am using pyglet 1.0, and on_text and on_text_motion are both pretty > > > useful, but both don't get events if the shift key is held down. What > > > do I do? > > > Sounds like a bug to me. Can you post details of your system (OS, > > window manager if Linux, keyboard layout, etc)? If it's not too much > > trouble, please also test it with pyglet 1.1 (just run the events.py > > example). > > Note that if you hold down shift and a cursor key you'll get an > on_text_motion_select rather than an on_text_motion. > > This isn't mentioned in the docs, which is a bug :) > > Richard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
