mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 00:14:09 -04:00
Make keynames less verbose
This commit is contained in:
parent
442bd7de88
commit
6e16b70e0d
@ -94,7 +94,15 @@ def KeycodeIsModifier(code):
|
|||||||
def BindsToKeynames(binds):
|
def BindsToKeynames(binds):
|
||||||
keybinds = []
|
keybinds = []
|
||||||
for bind in binds:
|
for bind in binds:
|
||||||
name = e.KEY[bind][4:].capitalize()
|
name = e.KEY[bind][4:] # Strip KEY_ prefix
|
||||||
|
prefix = ''
|
||||||
|
if name.startswith('LEFT'):
|
||||||
|
prefix = 'L'
|
||||||
|
name = name[4:]
|
||||||
|
elif name.startswith('RIGHT'):
|
||||||
|
prefix = 'R'
|
||||||
|
name = name[5:]
|
||||||
|
name = prefix + name.capitalize()
|
||||||
keybinds.append(name)
|
keybinds.append(name)
|
||||||
|
|
||||||
return keybinds
|
return keybinds
|
||||||
|
Loading…
Reference in New Issue
Block a user