settings: defensive check for missing keys array in mouse gestures setting

This commit is contained in:
Peter F. Patel-Schneider 2022-07-05 09:06:53 -04:00
parent eabf71e120
commit ceaaaa917e
1 changed files with 1 additions and 1 deletions

View File

@ -808,7 +808,7 @@ class MouseGesture(_Setting):
@classmethod
def build(cls, setting_class, device):
if True: # was device.kind == _DK.mouse
if device.keys: # ensure that the device has a keys array
keys = []
for key in cls.MouseGestureKeys:
key_index = device.keys.index(key)