MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / keyPressEvent

Method keyPressEvent

tools/triage_tests.py:211–225  ·  view source on GitHub ↗
(self, e)

Source from the content-addressed store, hash-verified

209 self.set_entry(min((self.current_entry + 1), len(self.entries) - 1))
210
211 def keyPressEvent(self, e):
212 if e.key() == QtCore.Qt.Key.Key_Left:
213 self.set_large_image((self.current_thumbnail - 1) % 3)
214 elif e.key() == QtCore.Qt.Key.Key_Right:
215 self.set_large_image((self.current_thumbnail + 1) % 3)
216 elif e.key() == QtCore.Qt.Key.Key_Up:
217 self.set_entry(max(self.current_entry - 1, 0))
218 elif e.key() == QtCore.Qt.Key.Key_Down:
219 self.set_entry(min(self.current_entry + 1, len(self.entries) - 1))
220 elif e.key() == QtCore.Qt.Key.Key_A:
221 self.accept_test()
222 elif e.key() == QtCore.Qt.Key.Key_R:
223 self.reject_test()
224 else:
225 super().keyPressEvent(e)
226
227
228class Entry:

Callers 1

eventFilterMethod · 0.45

Calls 5

set_large_imageMethod · 0.95
set_entryMethod · 0.95
accept_testMethod · 0.95
reject_testMethod · 0.95
keyMethod · 0.80

Tested by

no test coverage detected