8000 add extra keys to qt4 backend · matplotlib/matplotlib@26e8b9f · GitHub
[go: up one dir, main page]

Skip to content

Commit 26e8b9f

Browse files
committed
add extra keys to qt4 backend
1 parent 7a9f234 commit 26e8b9f

File tree

1 file changed

+35
-25
lines changed

1 file changed

+35
-25
lines changed

lib/matplotlib/backends/backend_qt4.py

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -161,31 +161,41 @@ def _timer_stop(self):
161161

162162
class FigureCanvasQT(QtGui.QWidget, FigureCanvasBase):
163163
keyvald = {QtCore.Qt.Key_Control: 'control',
164-
QtCore.Qt.Key_Shift: 'shift',
165-
QtCore.Qt.Key_Alt: 'alt',
166-
QtCore.Qt.Key_Meta: 'super',
167-
QtCore.Qt.Key_Return: 'enter',
168-
QtCore.Qt.Key_Left: 'left',
169-
QtCore.Qt.Key_Up: 'up',
170-
QtCore.Qt.Key_Right: 'right',
171-
QtCore.Qt.Key_Down: 'down',
172-
QtCore.Qt.Key_Escape: 'escape',
173-
QtCore.Qt.Key_F1: 'f1',
174-
QtCore.Qt.Key_F2: 'f2',
175-
QtCore.Qt.Key_F3: 'f3',
176-
QtCore.Qt.Key_F4: 'f4',
177-
QtCore.Qt.Key_F5: 'f5',
178-
QtCore.Qt.Key_F6: 'f6',
179-
QtCore.Qt.Key_F7: 'f7',
180-
QtCore.Qt.Key_F8: 'f8',
181-
QtCore.Qt.Key_F9: 'f9',
182-
QtCore.Qt.Key_F10: 'f10',
183-
QtCore.Qt.Key_F11: 'f11',
184-
QtCore.Qt.Key_F12: 'f12',
185-
QtCore.Qt.Key_Home: 'home',
186-
QtCore.Qt.Key_End: 'end',
187-
QtCore.Qt.Key_PageUp: 'pageup',
188-
QtCore.Qt.Key_PageDown: 'pagedown',
164+
QtCore.Qt.Key_Shift: 'shift',
165+
QtCore.Qt.Key_Alt: 'alt',
166+
QtCore.Qt.Key_Meta: 'super',
167+
QtCore.Qt.Key_Return: 'enter',
168+
QtCore.Qt.Key_Left: 'left',
169+
QtCore.Qt.Key_Up: 'up',
170+
QtCore.Qt.Key_Right: 'right',
171+
QtCore.Qt.Key_Down: 'down',
172+
QtCore.Qt.Key_Escape: 'escape',
173+
QtCore.Qt.Key_F1: 'f1',
174+
QtCore.Qt.Key_F2: 'f2',
175+
QtCore.Qt.Key_F3: 'f3',
176+
QtCore.Qt.Key_F4: 'f4',
177+
QtCore.Qt.Key_F5: 'f5',
178+
QtCore.Qt.Key_F6: 'f6',
179+
QtCore.Qt.Key_F7: 'f7',
180+
QtCore.Qt.Key_F8: 'f8',
181+
QtCore.Qt.Key_F9: 'f9',
182+
QtCore.Qt.Key_F10: 'f10',
183+
QtCore.Qt.Key_F11: 'f11',
184+
QtCore.Qt.Key_F12: 'f12',
185+
QtCore.Qt.Key_Home: 'home',
186+
QtCore.Qt.Key_End: 'end',
187+
QtCore.Qt.Key_PageUp: 'pageup',
188+
QtCore.Qt.Key_PageDown: 'pagedown',
189+
QtCore.Qt.Key_Tab: 'tab',
190+
QtCore.Qt.Key_Backtab: 'backtab',
191+
QtCore.Qt.Key_Backspace: 'backspace',
192+
QtCore.Qt.Key_Enter: 'enter',
193+
QtCore.Qt.Key_Insert: 'insert',
194+
QtCore.Qt.Key_Delete: 'delete',
195+
QtCore.Qt.Key_Pause: 'pause',
196+
QtCore.Qt.Key_SysReq: 'sysreq',
197+
QtCore.Qt.Key_Clear: 'clear',
198+
QtCore.Qt.Key_Control: 'ctrl',
189199
}
190200

191201
# define the modifier keys which are to be collected on keyboard events.

0 commit comments

Comments
 (0)
0