Update byteManager.py

This commit is contained in:
chrys87 2018-05-30 11:59:45 +02:00 committed by GitHub
parent 9fa4ba8a0b
commit 4ce7533121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,12 +49,14 @@ class byteManager():
isCommand = False
if self.controlMode and not self.switchCtrlModeOnce == 1 or\
not self.controlMode and self.switchCtrlModeOnce == 1:
shortcutData = convertedEscapeSequence
if self.lastByteKey == convertedEscapeSequence:
if time.time() - self.lastInputTime <= self.env['runtime']['settingsManager'].getSettingAsFloat('keyboard','doubleTapTimeout'):
self.repeat += 1
shortcutData = shortcutData + convertedEscapeSequence
shortcutData = b''
for i to range(self.repeat):
shortcutData = shortcutData + convertedEscapeSequence
isCommand = self.detectByteCommand(shortcutData)
# fall back to single stroke - do we want this?
if not isCommand:
isCommand = self.detectByteCommand(convertedEscapeSequence)
self.repeat = 1