Sorry for the question, I just read the pyglet documentation about
virtual key codes...

Since I'm trying to capture control-key sequence, should I do that in
a 'on_text' handler and use a KeyStateHandler() ?


Nicolas


On Mar 26, 7:56 pm, Nicolas Rougier <[email protected]> wrote:
> Hi,
>
> There may be a problem with keyboard layout on macos, program below
> gives me the following output:
>
> Q was pressed
> a
> A was pressed
> q
>
> Anyone confirms ?
>
> Nicolas
>
> import pyglet
> window = pyglet.window.Window()
> @window.event
> def on_key_press(symbol, modifiers):
>     if symbol == pyglet.window.key.A:
>         print 'A was pressed'
>     if symbol == pyglet.window.key.Q:
>         print 'Q was pressed'
> @window.event
> def on_text(text):
>     print text
> pyglet.app.run()
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to