Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5eb62a6

Browse files
committed
DOC: Make event handling table scrollable
The existing table is too wide, and overflow is clipped, so that not all toolkits are visible. Also, wrap all the entered keys in `:kbd:`. Fixes #24741
1 parent a9ba9d5 commit 5eb62a6

File tree

2 files changed

+127
-19
lines changed

2 files changed

+127
-19
lines changed

doc/_static/mpl.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,14 @@ div.graphviz {
109109
img.graphviz.inheritance {
110110
max-width: none;
111111
}
112+
113+
/* Make tables in notes horizontally scrollable if too large. */
114+
div.admonition.note {
115+
overflow-x: auto;
116+
}
117+
118+
div.admonition.note table th.stub {
119+
background-color: var(--pst-color-background);
120+
background-clip: padding-box;
121+
position: sticky;
122+
}

doc/users/explain/event_handling.rst

Lines changed: 116 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,122 @@ Event name Class Description
8585
what you may expect to receive as key(s) (using a QWERTY keyboard layout)
8686
from the different user interface toolkits, where a comma separates different keys:
8787

88-
================ ============================= ============================== ============================== ============================== ============================== ===================================
89-
Key(s) Pressed WxPython Qt WebAgg Gtk Tkinter macosx
90-
================ ============================= ============================== ============================== ============================== ============================== ===================================
91-
Shift+2 shift, shift+2 shift, @ shift, @ shift, @ shift, @ shift, @
92-
Shift+F1 shift, shift+f1 shift, shift+f1 shift, shift+f1 shift, shift+f1 shift, shift+f1 shift, shift+f1
93-
Shift shift shift shift shift shift shift
94-
Control control control control control control control
95-
Alt alt alt alt alt alt alt
96-
AltGr Nothing Nothing alt iso_level3_shift iso_level3_shift
97-
CapsLock caps_lock caps_lock caps_lock caps_lock caps_lock caps_lock
98-
CapsLock+a caps_lock, a caps_lock, a caps_lock, A caps_lock, A caps_lock, A caps_lock, a
99-
a a a a a a a
100-
Shift+a shift, A shift, A shift, A shift, A shift, A shift, A
101-
CapsLock+Shift+a caps_lock, shift, A caps_lock, shift, A caps_lock, shift, a caps_lock, shift, a caps_lock, shift, a caps_lock, shift, A
102-
Ctrl+Shift+Alt control, ctrl+shift, ctrl+alt control, ctrl+shift, ctrl+meta control, ctrl+shift, ctrl+meta control, ctrl+shift, ctrl+meta control, ctrl+shift, ctrl+meta control, ctrl+shift, ctrl+alt+shift
103-
Ctrl+Shift+a control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+A control, ctrl+shift, ctrl+a control, ctrl+shift, ctrl+A
104-
F1 f1 f1 f1 f1 f1 f1
105-
Ctrl+F1 control, ctrl+f1 control, ctrl+f1 control, ctrl+f1 control, ctrl+f1 control, ctrl+f1 control, Nothing
106-
================ ============================= ============================== ============================== ============================== ============================== ===================================
88+
.. list-table::
89+
:header-rows: 1
90+
:stub-columns: 1
91+
92+
* - Key(s) Pressed
93+
- WxPython
94+
- Qt
95+
- WebAgg
96+
- Gtk
97+
- Tkinter
98+
- macosx
99+
* - :kbd:`Shift+2`
100+
- shift, shift+2
101+
- shift, @
102+
- shift, @
103+
- shift, @
104+
- shift, @
105+
- shift, @
106+
* - :kbd:`Shift+F1`
107+
- shift, shift+f1
108+
- shift, shift+f1
109+
- shift, shift+f1
110+
- shift, shift+f1
111+
- shift, shift+f1
112+
- shift, shift+f1
113+
* - :kbd:`Shift`
114+
- shift
115+
- shift
116+
- shift
117+
- shift
118+
- shift
119+
- shift
120+
* - :kbd:`Control`
121+
- control
122+
- control
123+
- control
124+
- control
125+
- control
126+
- control
127+
* - :kbd:`Alt`
128+
- alt
129+
- alt
130+
- alt
131+
- alt
132+
- alt
133+
- alt
134+
* - :kbd:`AltGr`
135+
- Nothing
136+
- Nothing
137+
- alt
138+
- iso_level3_shift
139+
- iso_level3_shift
140+
-
141+
* - :kbd:`CapsLock`
142+
- caps_lock
143+
- caps_lock
144+
- caps_lock
145+
- caps_lock
146+
- caps_lock
147+
- caps_lock
148+
* - :kbd:`CapsLock+a`
149+
- caps_lock, a
150+
- caps_lock, a
151+
- caps_lock, A
152+
- caps_lock, A
153+
- caps_lock, A
154+
- caps_lock, a
155+
* - :kbd:`a`
156+
- a
157+
- a
158+
- a
159+
- a
160+
- a
161+
- a
162+
* - :kbd:`Shift+a`
163+
- shift, A
164+
- shift, A
165+
- shift, A
166+
- shift, A
167+
- shift, A
168+
- shift, A
169+
* - :kbd:`CapsLock+Shift+a`
170+
- caps_lock, shift, A
171+
- caps_lock, shift, A
172+
- caps_lock, shift, a
173+
- caps_lock, shift, a
174+
- caps_lock, shift, a
175+
- caps_lock, shift, A
176+
* - :kbd:`Ctrl+Shift+Alt`
177+
- control, ctrl+shift, ctrl+alt
178+
- control, ctrl+shift, ctrl+meta
179+
- control, ctrl+shift, ctrl+meta
180+
- control, ctrl+shift, ctrl+meta
181+
- control, ctrl+shift, ctrl+meta
182+
- control, ctrl+shift, ctrl+alt+shift
183+
* - :kbd:`Ctrl+Shift+a`
184+
- control, ctrl+shift, ctrl+A
185+
- control, ctrl+shift, ctrl+A
186+
- control, ctrl+shift, ctrl+A
187+
- control, ctrl+shift, ctrl+A
188+
- control, ctrl+shift, ctrl+a
189+
- control, ctrl+shift, ctrl+A
190+
* - :kbd:`F1`
191+
- f1
192+
- f1
193+
- f1
194+
- f1
195+
- f1
196+
- f1
197+
* - :kbd:`Ctrl+F1`
198+
- control, ctrl+f1
199+
- control, ctrl+f1
200+
- control, ctrl+f1
201+
- control, ctrl+f1
202+
- control, ctrl+f1
203+
- control, Nothing
107204

108205
Matplotlib attaches some keypress callbacks by default for interactivity; they
109206
are documented in the :ref:`key-event-handling` section.

0 commit comments

Comments
 (0)