refactor handling of key processing resume to KMKKeyboard
This commit is contained in:
parent
e71d1fcb6e
commit
c95efbe8ea
@ -191,6 +191,10 @@ class KMKKeyboard:
|
||||
|
||||
return self
|
||||
|
||||
def resume_process_key(self, key, is_pressed, int_coord, module):
|
||||
index = self.modules.index(module) + 1
|
||||
self.pre_process_key(key, is_pressed, int_coord, index)
|
||||
|
||||
def remove_key(self, keycode):
|
||||
self.keys_pressed.discard(keycode)
|
||||
return self.process_key(keycode, False)
|
||||
|
@ -266,7 +266,7 @@ class Combos(Module):
|
||||
if new_key is None:
|
||||
new_key = keyboard._find_key_in_map(int_coord)
|
||||
|
||||
keyboard.pre_process_key(new_key, is_pressed, int_coord, self._next_module)
|
||||
keyboard.resume_process_key(new_key, is_pressed, int_coord, self)
|
||||
keyboard._send_hid()
|
||||
|
||||
def activate(self, keyboard, combo):
|
||||
|
@ -178,7 +178,7 @@ class HoldTap(Module):
|
||||
def send_key_buffer(self, keyboard):
|
||||
for (int_coord, key) in self.key_buffer:
|
||||
new_key = keyboard._find_key_in_map(int_coord)
|
||||
keyboard.pre_process_key(new_key, True, int_coord, self._next_module)
|
||||
keyboard.resume_process_key(new_key, True, int_coord, self)
|
||||
|
||||
keyboard._send_hid()
|
||||
self.key_buffer.clear()
|
||||
|
Loading…
Reference in New Issue
Block a user