@@ -75,6 +75,35 @@ Event name Class Description
75
75
'axes_leave_event' `.LocationEvent ` mouse leaves an axes
76
76
====================== ================ ======================================
77
77
78
+ .. note ::
79
+ When connecting to 'key_press_event' and 'key_release_event' events,
80
+ you may encounter inconsistencies between the different user interface
81
+ toolkits that Matplotlib works with. This is due to inconsistencies/limitations
82
+ of the user interface toolkit. The following table shows some basic examples of
83
+ what you may expect to receive as key(s) from the different user interface toolkits,
84
+ where a comma separates different keys:
85
+
86
+ ============== ============================= ============================== ============================= ============================== ==============================
87
+ Key(s) Pressed WxPython Qt WebAgg Gtk Tkinter
88
+ ============== ============================= ============================== ============================= ============================== ==============================
89
+ Shift+2 shift, shift+2 shift, " shift, " shift, " shift, "
90
+ Shift+F1 shift, shift+f1 shift, shift+f1 shift, shift+f1 shift, shift+f1 shift, shift+f1
91
+ Shift shift shift shift shift shift
92
+ Control control control control control control
93
+ Alt alt alt alt alt alt
94
+ AltGr Nothing Nothing alt iso_level3_shift iso_level3_shift
95
+ CapsLock caps_lock caps_lock caps_lock caps_lock caps_lock
96
+ A a a A A A
97
+ a a a a a a
98
+ Shift+a shift, A shift, A shift, A shift, A shift, A
99
+ Shift+A shift, A shift, A shift, a shift, a shift, a
100
+ Ctrl+Shift+Alt control, ctrl+shift, ctrl+alt control, ctrl+shift, ctrl+meta control, ctrl+shit, ctrl+meta control, ctrl+shift, ctrl+meta control, ctrl+shift, ctrl+meta
101
+ Ctrl+Shift+a control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+A control, ctrl+shit, ctrl+A control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+a
102
+ Ctrl+Shift+A control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+A control, ctrl+shit, ctrl+a control, ctrl+shift, ctrl+a control, ctrl+shift, ctrl+a
103
+ F1 f1 f1 f1 f1 f1
104
+ Ctrl+F1 control, ctrl+f1 control, ctrl+f1 control, ctrl+f1 control, ctrl+f1 control, ctrl+f1
105
+ ============== ============================= ============================== ============================= ============================== ==============================
106
+
78
107
Matplotlib attaches some keypress callbacks by default for interactivity; they
79
108
are documented in the :ref: `key-event-handling ` section.
80
109
0 commit comments