Display space as a word when printing keys
This commit is contained in:
parent
e0f2b96fd2
commit
d1b5420b08
@ -72,8 +72,9 @@ def print_shortcut(key_sequence: Iterable[SingleKey], defn: str, print: Callable
|
|||||||
mods, is_native, key = key_spec
|
mods, is_native, key = key_spec
|
||||||
names = list(mod_to_names(mods))
|
names = list(mod_to_names(mods))
|
||||||
if key:
|
if key:
|
||||||
kname = glfw_get_key_name(0, key) if is_native else glfw_get_key_name(key, 0)
|
kname = (glfw_get_key_name(0, key) if is_native else glfw_get_key_name(key, 0)) or f'{key}'
|
||||||
names.append(kname or f'{key}')
|
kname = {' ': 'space'}.get(kname, kname)
|
||||||
|
names.append(kname)
|
||||||
keys.append('+'.join(names))
|
keys.append('+'.join(names))
|
||||||
|
|
||||||
print('\t' + ' > '.join(keys), defn)
|
print('\t' + ' > '.join(keys), defn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user