CTRL modifier bug?

13 views
Skip to first unread message

Timothy Lillicrap

unread,
Mar 4, 2012, 7:13:35 AM3/4/12
to glumpy-users
Hi there,

Hi there,

I think there might be bug with the key_press and release dispatches.
They seem to work perfectly for me without modifiers and with the ALT
modifier, but when I hold CTRL the symbol dispatched is given as None
for most of the keys.

For example, with this sort of simple function in my class:
def on_key_press(self, symbol, modifiers):
print 'Key pressed (symbol=%s, modifiers=%s)'%
(symbol,modifiers)

I get outputs like:

Key pressed (symbol=120, modifiers=4) (with
ALT)
Key pressed (symbol=None, modifiers=2) (with
CTRL)

I can't think of any reason that the symbol should be dispatched as
None for simple characters, so I assume there's some small bug. I
could endeavor to fix this one myself, but it's likely a quick fix for
the original author.

There's also the chance of course that this isn't a bug at all and I'm
just doing something stupid :)

Thanks again for all the help - the on_mouse_scroll bug fix worked
great,

Tim.


Nicolas Rougier

unread,
Mar 6, 2012, 3:29:07 AM3/6/12
to glumpy-users

I think it depends on how your hardware reports the actual key pressed
and I merely translating glut key into a generic form.

Nicolas


On Mar 4, 1:13 pm, Timothy Lillicrap <timothy.lillic...@gmail.com>
wrote:

Timothy Lillicrap

unread,
Mar 6, 2012, 6:06:33 AM3/6/12
to glumpy-users
Ok, thanks. A little strange (I just have a very standard north
american keyboard), but I guess I need to muck a bit with the
internals of glumpy to fix this on my machine then? Like in key.py?

Tim.
Reply all
Reply to author
Forward
0 new messages