make 2, for key repeat work
This commit is contained in:
parent
fd4918ec8d
commit
116729520b
@ -1,7 +1,7 @@
|
|||||||
# f1 - fenrir help
|
# f1 - fenrir help
|
||||||
^[OP=toggle_tutorial_mode
|
^[OP=toggle_tutorial_mode
|
||||||
# double tap control+end read attributes
|
# double tap control+end read attributes
|
||||||
^[[1;5F^[[1;5F=attribute_cursor
|
2,^[[1;5F=attribute_cursor
|
||||||
# escape - stop speech
|
# escape - stop speech
|
||||||
^[=shut_up
|
^[=shut_up
|
||||||
# context menu key - stop speech
|
# context menu key - stop speech
|
||||||
|
@ -102,7 +102,20 @@ class byteManager():
|
|||||||
if line.count("=") != 1:
|
if line.count("=") != 1:
|
||||||
continue
|
continue
|
||||||
Values = line.split('=')
|
Values = line.split('=')
|
||||||
shortcut = bytes(Values[0],'UTF-8')
|
cleanShortcut = bytes(Values[0],'UTF-8')
|
||||||
|
repeat = 1
|
||||||
|
if len(cleanShortcut) > 2:
|
||||||
|
if chr(cleanShortcut[1]) == ',':
|
||||||
|
try:
|
||||||
|
repeat = int(chr(cleanShortcut[0]))
|
||||||
|
cleanShortcut = cleanShortcut[2:]
|
||||||
|
except:
|
||||||
|
repeat = 1
|
||||||
|
cleanShortcut = cleanShortcut
|
||||||
|
print(repeat,cleanShortcut)
|
||||||
|
shortcut = b''
|
||||||
|
for i in range(repeat):
|
||||||
|
shortcut += cleanShortcut
|
||||||
commandName = Values[1].upper()
|
commandName = Values[1].upper()
|
||||||
self.env['bindings'][shortcut] = commandName
|
self.env['bindings'][shortcut] = commandName
|
||||||
self.env['runtime']['debug'].writeDebugOut("Byte Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO, onAnyLevel=True)
|
self.env['runtime']['debug'].writeDebugOut("Byte Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO, onAnyLevel=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user