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

Method _mpl_modifiers

lib/matplotlib/backends/backend_qt.py:425–436  ·  view source on GitHub ↗
(modifiers=None, *, exclude=None)

Source from the content-addressed store, hash-verified

423
424 @staticmethod
425 def _mpl_modifiers(modifiers=None, *, exclude=None):
426 if modifiers is None:
427 modifiers = QtWidgets.QApplication.instance().keyboardModifiers()
428 modifiers = _to_int(modifiers)
429 # get names of the pressed modifier keys
430 # 'control' is named 'control' when a standalone key, but 'ctrl' when a
431 # modifier
432 # bit twiddling to pick out modifier keys from modifiers bitmask,
433 # if exclude is a MODIFIER, it should not be duplicated in mods
434 return [SPECIAL_KEYS[key].replace('control', 'ctrl')
435 for mask, key in _MODIFIER_KEYS
436 if exclude != key and modifiers & mask]
437
438 def _get_key(self, event):
439 event_key = event.key()

Callers 8

enterEventMethod · 0.95
leaveEventMethod · 0.95
mousePressEventMethod · 0.95
mouseDoubleClickEventMethod · 0.95
mouseMoveEventMethod · 0.95
mouseReleaseEventMethod · 0.95
wheelEventMethod · 0.95
_get_keyMethod · 0.95

Calls 1

_to_intFunction · 0.85

Tested by

no test coverage detected