add hold-tap interrupt behavior: prefer hold.
The interrupt resolution of hold-tap keys can now be set to resolve to either tap or hold key. The default mod-tap is set to prefer hold.
This commit is contained in:
@@ -112,7 +112,13 @@ class HoldTap(Module):
|
||||
pass
|
||||
|
||||
def ht_activate_on_interrupt(self, key, keyboard, *args, **kwargs):
|
||||
self.ht_activate_tap(key, keyboard, *args, **kwargs)
|
||||
if key.meta.prefer_hold:
|
||||
self.ht_activate_hold(key, keyboard, *args, **kwargs)
|
||||
else:
|
||||
self.ht_activate_tap(key, keyboard, *args, **kwargs)
|
||||
|
||||
def ht_deactivate_on_interrupt(self, key, keyboard, *args, **kwargs):
|
||||
self.ht_deactivate_tap(key, keyboard, *args, **kwargs)
|
||||
if key.meta.prefer_hold:
|
||||
self.ht_deactivate_hold(key, keyboard, *args, **kwargs)
|
||||
else:
|
||||
self.ht_deactivate_tap(key, keyboard, *args, **kwargs)
|
||||
|
Reference in New Issue
Block a user