Remove unnecessary list check
This commit is contained in:
parent
fe6510baec
commit
606780ee1c
@ -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,9 +227,8 @@ 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
|
||||||
|
|
||||||
def on_timeout(self, keyboard, combo):
|
def on_timeout(self, keyboard, combo):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user