Fix rollover on numeric keys

master
LEdoian 8 months ago
parent 3f24b2cfab
commit b0ebc86a9a

@ -75,7 +75,7 @@ def main():
# TODO: customizable bindings! # TODO: customizable bindings!
if len(categories) > 10: if len(categories) > 10:
raise NotImplementedError('Too many categories, cannot automatically assign keybindings.') raise NotImplementedError('Too many categories, cannot automatically assign keybindings.')
bindings = {pg.key.key_code(str(key)): cat for key, cat in zip(range(1, 10+1), categories)} bindings = {pg.key.key_code(str(key % 10)): cat for key, cat in zip(range(1, 10+1), categories)}
escape_char = pg.K_ESCAPE escape_char = pg.K_ESCAPE
result = {k: [] for k in categories} result = {k: [] for k in categories}

Loading…
Cancel
Save