Writes basic configs for impulse, hold, and toggle

pull/11/head
Nicholas Hope 2022-06-20 20:42:43 -04:00
parent a3980e9aab
commit 4953d787d7
1 changed files with 15 additions and 4 deletions

View File

@ -41,13 +41,24 @@ def impulse(key, instruction):
return f'bind {key} {instruction}\n'
def simpleHold(key, instruction):
return f'placeholder for {key} (single instruction hold)\n'
# This isn't quite right, fix later!
return f'bind {key} +{instruction}\n'
# return f'placeholder for {key} (single instruction hold)\n'
def listHold(key, options):
return f'placeholder for {key} (press and release hold)\n'
ret = f'alias +{key}_bind {options["press"]}\n'
ret += f'alias -{key}_bind {options["release"]}\n'
ret += f'bind {key} +{key}_bind\n'
return ret
# return f'placeholder for {key} (press-and-release hold)\n'
def toggle(key, options):
return f'placeholder for {key} (toggle)\n'
def toggle(key, instruction):
ret = f'alias turn_{key}_on "+{instruction}; alias toggle_{key} turn_key_off"\n'
ret += f'alias turn_{key}_off "-{instruction}; alias toggle_{key} turn_ley_on"\n'
ret += f'alias toggle_{key} turn_{key}_on\n'
ret += f'bind {key} toggle_{key}\n'
return ret
# return f'placeholder for {key} (toggle)\n'
def double(key, options):
return f'placeholder for {key} (double)\n'