respect modes

This commit is contained in:
chrys 2018-05-29 22:54:36 +02:00
parent a53fe5cbb3
commit 4e4bf9768f

View File

@ -45,14 +45,15 @@ class byteManager():
if self.controlMode and not self.switchCtrlModeOnce == 1 or\ if self.controlMode and not self.switchCtrlModeOnce == 1 or\
not self.controlMode: not self.controlMode:
isControlMode = self.handleControlMode(eventData) isControlMode = self.handleControlMode(eventData)
shortcutData = convertedEscapeSequence
if self.lastByteKey == convertedEscapeSequence:
if time.time() - self.lastInputTime <= self.env['runtime']['settingsManager'].getSettingAsFloat('keyboard','doubleTapTimeout'):
self.repeat += 1
shortcutData = shortcutData + convertedEscapeSequence
isCommand = False isCommand = False
if self.controlMode and not self.switchCtrlModeOnce == 1 or\ if self.controlMode and not self.switchCtrlModeOnce == 1 or\
not self.controlMode and self.switchCtrlModeOnce == 1: 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
isCommand = self.detectByteCommand(shortcutData) isCommand = self.detectByteCommand(shortcutData)
if not isCommand: if not isCommand:
isCommand = self.detectByteCommand(convertedEscapeSequence) isCommand = self.detectByteCommand(convertedEscapeSequence)