keyboard stuff
This commit is contained in:
parent
4f5ced7ed2
commit
79f8a3bf1e
@ -22,7 +22,6 @@ class inputManager():
|
||||
del(currShortcut[str(event.code)])
|
||||
environment['input']['currShortcut'] = currShortcut
|
||||
environment['input']['currShortcutString'] = self.getShortcutString(environment)
|
||||
print(environment['input']['currShortcutString'])
|
||||
return environment
|
||||
|
||||
def getShortcutString(self, environment):
|
||||
@ -72,18 +71,14 @@ class inputManager():
|
||||
break
|
||||
else:
|
||||
currShortcut.append(key[0] + '-' + str(keyInt))
|
||||
print(currShortcut)
|
||||
if validKeyString:
|
||||
keyString = ''
|
||||
for k in sorted(currShortcut):
|
||||
if keyString != '':
|
||||
keyString += ','
|
||||
keyString += k
|
||||
print(keyString)
|
||||
print(commandString)
|
||||
environment['bindings'][keyString] = commandString
|
||||
kbConfig.close()
|
||||
print(environment['bindings'])
|
||||
return environment
|
||||
|
||||
def getCodeForKeyID(self, keyID):
|
||||
|
@ -46,18 +46,11 @@ class screenManager():
|
||||
environment['screenData']['oldCursor']['x'] = 0
|
||||
environment['screenData']['oldCursor']['y'] = 0
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
print('runs')
|
||||
# changes on the screen
|
||||
if (environment['screenData']['oldContentText'] != environment['screenData']['newContentText']) and \
|
||||
(len(environment['screenData']['newContentText']) > 0):
|
||||
print('runs1')
|
||||
diff = difflib.ndiff(environment['screenData']['oldContentText'], environment['screenData']['newContentText'])
|
||||
print('runs2')
|
||||
print(environment['screenData']['oldContentText'])
|
||||
print(environment['screenData']['newContentText'])
|
||||
environment['screenData']['delta'] = ''.join(x[2:] for x in diff if x.startswith('+ '))
|
||||
print(environment['screenData']['delta'])
|
||||
print('______________________________________')
|
||||
if ((len(environment['screenData']['delta']) < 3)):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['delta'])
|
||||
|
Loading…
Reference in New Issue
Block a user