Remove unnecessary list check

This commit is contained in:
James Fitzgerald 2022-07-24 09:15:37 -04:00 committed by xs5871
parent fe6510baec
commit 606780ee1c

View File

@ -73,11 +73,7 @@ class Combos(Module):
self._matching = [] self._matching = []
self._reset = set() self._reset = set()
self._key_buffer = [] self._key_buffer = []
self._combo_keys = []
for combo in self.combos:
for k in combo.match:
if k not in self._combo_keys:
self._combo_keys.append(k)
make_key( make_key(
names=('LEADER', 'LDR'), names=('LEADER', 'LDR'),
on_press=handlers.passthrough, on_press=handlers.passthrough,
@ -231,7 +227,6 @@ class Combos(Module):
key = None key = None
# Reset on non-combo key up # Reset on non-combo key up
if key is not None and key not in self._combo_keys:
if not self._matching: if not self._matching:
self.reset(keyboard) self.reset(keyboard)
return key return key