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

Method _get_key

lib/matplotlib/backends/backend_gtk3.py:211–218  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

209 if exclude != key and event_state & mask]
210
211 def _get_key(self, event):
212 unikey = chr(Gdk.keyval_to_unicode(event.keyval))
213 key = cbook._unikey_or_keysym_to_mplkey(
214 unikey, Gdk.keyval_name(event.keyval))
215 mods = self._mpl_modifiers(event.state, exclude=key)
216 if "shift" in mods and unikey.isprintable():
217 mods.remove("shift")
218 return "+".join([*mods, key])
219
220 def _update_device_pixel_ratio(self, *args, **kwargs):
221 # We need to be careful in cases with mixed resolution displays if

Callers 2

key_press_eventMethod · 0.95
key_release_eventMethod · 0.95

Calls 3

_mpl_modifiersMethod · 0.95
joinMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected