Don't try to get an event.key name if there is no event.key
@@ -571,6 +571,8 @@ class QtViewer(QSplitter):
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
+ if event.key is None:
+ return
combo = components_to_key_combo(event.key.name, event.modifiers)
self.viewer.release_key(combo)
