missed some pre_process to resume_process conversions

This commit is contained in:
xs5871 2022-08-10 17:28:12 +00:00 committed by Kyle Brown
parent ea94e9ba19
commit aee793a300
3 changed files with 9 additions and 10 deletions

View File

@ -199,10 +199,10 @@ class KMKKeyboard:
def resume_process_key(
self,
module: Module,
key: Key,
is_pressed: bool,
int_coord: Optional[int],
module: Module,
int_coord: Optional[int] = None,
) -> None:
index = self.modules.index(module) + 1
self.pre_process_key(key, is_pressed, int_coord, index)

View File

@ -82,7 +82,6 @@ class Combos(Module):
)
def during_bootup(self, keyboard):
self._next_module = keyboard.modules.index(self) + 1
self.reset(keyboard)
def before_matrix_scan(self, keyboard):
@ -268,7 +267,7 @@ class Combos(Module):
if new_key is None:
new_key = keyboard._find_key_in_map(int_coord)
keyboard.resume_process_key(new_key, is_pressed, int_coord, self)
keyboard.resume_process_key(self, new_key, is_pressed, int_coord)
keyboard._send_hid()
def activate(self, keyboard, combo):

View File

@ -49,7 +49,7 @@ class HoldTap(Module):
)
def during_bootup(self, keyboard):
self._next_module = keyboard.modules.index(self) + 1
return
def before_matrix_scan(self, keyboard):
return
@ -178,22 +178,22 @@ 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.resume_process_key(new_key, True, int_coord, self)
keyboard.resume_process_key(self, new_key, True, int_coord)
keyboard._send_hid()
self.key_buffer.clear()
def ht_activate_hold(self, key, keyboard, *args, **kwargs):
keyboard.pre_process_key(key.meta.hold, True, index=self._next_module)
keyboard.resume_process_key(self, key.meta.hold, True)
def ht_deactivate_hold(self, key, keyboard, *args, **kwargs):
keyboard.pre_process_key(key.meta.hold, False, index=self._next_module)
keyboard.resume_process_key(self, key.meta.hold, False)
def ht_activate_tap(self, key, keyboard, *args, **kwargs):
keyboard.pre_process_key(key.meta.tap, True, index=self._next_module)
keyboard.resume_process_key(self, key.meta.tap, True)
def ht_deactivate_tap(self, key, keyboard, *args, **kwargs):
keyboard.pre_process_key(key.meta.tap, False, index=self._next_module)
keyboard.resume_process_key(self, key.meta.tap, False)
def ht_activate_on_interrupt(self, key, keyboard, *args, **kwargs):
if key.meta.prefer_hold: