Hi,
I'm working on a TextBox widget and have run into problems registering
key_press_events with the macosx backend.  button_press_events work, but
key_press_events fail to trigger.  If I change backends to tkAgg,
everything triggers as expected.

Can anyone reproduce this?
Run the following script; click the figure and bang on the keyboard.  Mouse
clicks and keyboard clicks should echo on the screen.  I'm using mpl 1.2.1
with Anaconda.

-matt

import pylab as plt
plt.switch_backend('macosx')


def print_event(event):
    print 'event', event

ax = plt.subplot(111)
fig = ax.figure

x = range(10)
ax.plot(x, x)
# mouse clicks work on tkAgg & macosx
fig.canvas.mpl_connect('button_press_event', print_event)
# key presses only work on tkAgg
fig.canvas.mpl_connect('key_press_event', print_event)

plt.show()
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to