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

Method _get_key

lib/matplotlib/backends/_backend_tk.py:447–455  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

445 if event.state & mask and exclude != key]
446
447 def _get_key(self, event):
448 unikey = event.char
449 key = cbook._unikey_or_keysym_to_mplkey(unikey, event.keysym)
450 if key is not None:
451 mods = self._mpl_modifiers(event, exclude=key)
452 # shift is not added to the keys as this is already accounted for.
453 if "shift" in mods and unikey:
454 mods.remove("shift")
455 return "+".join([*mods, key])
456
457 def key_press(self, event):
458 KeyEvent("key_press_event", self,

Callers 2

key_pressMethod · 0.95
key_releaseMethod · 0.95

Calls 3

_mpl_modifiersMethod · 0.95
joinMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected