Issue 487 in pyglet: vendor specific keys on linux are crashing pyglet

25 views
Skip to first unread message

codesite...@google.com

unread,
Jul 23, 2010, 11:39:10 AM7/23/10
to pyglet...@googlegroups.com
Status: New
Owner: ----

New issue 487 by ignas.mikalajunas: vendor specific keys on linux are
crashing pyglet
http://code.google.com/p/pyglet/issues/detail?id=487

What steps will reproduce the problem?
1. Run any pyglet app
2. Press any Multimedia key on your multimedia keyboard, or something
like "fn" key on your laptop.
3. crash

Paste in the traceback or error message:

Traceback (most recent call last):
File "/home/ignas/src/pig/bin/python_pig", line 35, in <module>
execfile(__file__)
File "./run_game.py", line 279, in <module>
pyglet.app.run()

File "/home/ignas/.buildout/eggs/pyglet-1.1.4-py2.6.egg/pyglet/app/__init__.py",
line 264, in run
EventLoop().run()

File "/home/ignas/.buildout/eggs/pyglet-1.1.4-py2.6.egg/pyglet/app/xlib.py",
line 82, in run
window.dispatch_platform_event(e)

File "/home/ignas/.buildout/eggs/pyglet-1.1.4-py2.6.egg/pyglet/window/xlib/__init__.py",
line 1169, in dispatch_platform_event
event_handler(e)

File "/home/ignas/.buildout/eggs/pyglet-1.1.4-py2.6.egg/pyglet/window/xlib/__init__.py",
line 1328, in _event_key
text, symbol = self._event_text_symbol(ev)

File "/home/ignas/.buildout/eggs/pyglet-1.1.4-py2.6.egg/pyglet/window/xlib/__init__.py",
line 1264, in _event_text_symbol
symbol = ord(unichr(symbol).lower())
ValueError: unichr() arg not in range(0x110000) (wide Python build)
AL lib: ALc.c:1879: exit(): closing 1 Device
AL lib: ALc.c:1808: alcCloseDevice(): destroying 1 Context(s)


All I could find was the list of the keys in:

/usr/include/X11/XF86keysym.h (ubuntu)

all the keys in there have "symbol" higher than 0x110000, like:

#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */

so trying unichr on them fails. I used xev to try and find out whether they
are different in any way, but they are not, Xlib treats them as all the
other keys, at least I think so.

Attachments:
XF86keysym.h 12.8 KB

Reply all
Reply to author
Forward
0 new messages