Fix error with "None" key press
* early exit if key is none
* Update napari/utils/key_bindings.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see
@@ -516,6 +516,10 @@ class KeymapHandler:
event : vispy.util.event.Event
The vispy key press event that triggered this method.
"""
+ if event.key is None:
+ # TODO determine when None key could be sent.
+ return
+
combo = normalize_key_combo(
components_to_key_combo(event.key.name, event.modifiers)
)
