capturing arrow key events

Hi,

Tim Leslie reported a bug in GTK/GTKAgg backends concerning the down arrow key.
You can read his message here:
http://sourceforge.net/mailarchive/message.php?msg_id=20050413093244.GA4688%40cse.unsw.edu.au

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 ex.py
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 “ex.py”, line 14, in
show()
File “/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py”, line 71, in show
gtk.main()
KeyboardInterrupt

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)

···


Até,
Alexandre Zabot