possible leader fix

This commit is contained in:
Kyle Brown
2020-11-09 10:08:07 -08:00
parent 1f0aa18a73
commit ab49e5edff
11 changed files with 10 additions and 309 deletions

View File

@@ -97,9 +97,6 @@ def generate_codepoint_keysym_seq(codepoint, expected_length=4):
# Not sure how to send emojis on Mac/Windows like that,
# though, since (for example) the Canadian flag is assembled
# from two five-character codepoints, 1f1e8 and 1f1e6
#
# As a bonus, this function can be pretty useful for
# leader dictionary keys as strings.
seq = [KC.N0 for _ in range(max(len(codepoint), expected_length))]
for idx, codepoint_fragment in enumerate(reversed(codepoint)):
@@ -108,10 +105,6 @@ def generate_codepoint_keysym_seq(codepoint, expected_length=4):
return seq
def generate_leader_dictionary_seq(string):
return tuple(generate_codepoint_keysym_seq(string, 1))
def unicode_codepoint_sequence(codepoints):
kc_seqs = (generate_codepoint_keysym_seq(codepoint) for codepoint in codepoints)

View File

@@ -5,7 +5,7 @@ def passthrough(key, state, *args, **kwargs):
return state
def default_pressed(key, state, KC, coord_int=None, coord_raw=None):
def default_pressed(key, state, KC, coord_int=None, coord_raw=None, *args, **kwargs):
state.hid_pending = True
if coord_int is not None:
@@ -16,7 +16,7 @@ def default_pressed(key, state, KC, coord_int=None, coord_raw=None):
return state
def default_released(key, state, KC, coord_int=None, coord_raw=None):
def default_released(key, state, KC, coord_int=None, coord_raw=None, *args, **kwargs):
state.hid_pending = True
state.keys_pressed.discard(key)