capturing arrow key events


Tim Leslie reported a bug in GTK/GTKAgg backends concerning the down arrow key.
You can read his message here:

I’m sending a very simple example which reproduces the problem.
Just run it and try to type:
left arrow
down arrow

here is my output:
zabot@…1953…> python
key_press_event left 0.159 0.195
key_release_event left 0.159 0.195
key_press_event down 0.159 0.195
Traceback (most recent call last):
File “”, line 14, in
File “/usr/lib/python2.5/site-packages/matplotlib/backends/”, line 71, in show

As you can see, there’s no key_release_event for down arrow. I have to quit the script with “ctrl+C”.
Same thing happens with GTK but not with TKAgg, for example.

Does anyone have an idea for fixing this problem?

System: Kutuntu 7.10
Python: 2.5.1
Matplotlib: 0.91.2

event.tar.bz2 (446 Bytes)


Alexandre Zabot