initial say prev,curr,next line
This commit is contained in:
parent
311e653893
commit
333232d7ce
File diff suppressed because one or more lines are too long
@ -1,3 +1,8 @@
|
||||
2-KEY_LEFTCTRL,1-KEY_LEFTSHIFT=curr_line
|
||||
2-KEY_LEFTCTRL,1-KEY_A=shut_up
|
||||
#2-KEY_LEFTCTRL,1-KEY_LEFTSHIFT=curr_line
|
||||
#2-KEY_LEFTCTRL,1-KEY_S=next_line
|
||||
#2-KEY_LEFTCTRL,1-KEY_W=prev_line
|
||||
2-KEY_LEFTCTRL,1-KEY_E=shut_up
|
||||
1-KEY_KP8=curr_line
|
||||
1-KEY_KP7=prev_line
|
||||
1-KEY_KP9=next_line
|
||||
|
||||
|
Binary file not shown.
@ -5,10 +5,15 @@ class command():
|
||||
pass
|
||||
def run(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview']['y'] == -1:
|
||||
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
|
||||
|
||||
if environment['screenData']['newContentText'].replace(" ","") == '':
|
||||
environment['runtime']['speechDriver'].speak("empty screen")
|
||||
environment['runtime']['speechDriver'].speak("empty line")
|
||||
else:
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']])
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
def shutdown(self):
|
||||
|
@ -29,6 +29,7 @@ class commandManager():
|
||||
for cmd in sorted(environment['commands'][trigger]):
|
||||
environment = environment['commands'][trigger][cmd].run(environment)
|
||||
return environment
|
||||
|
||||
def executeCommand(self, environment, currCommand, section = 'commands'):
|
||||
if self.isCommandDefined(environment):
|
||||
try:
|
||||
|
@ -11,6 +11,7 @@ class inputManager():
|
||||
#for dev in self.devices.values(): print(dev)
|
||||
|
||||
def getKeyPressed(self, environment):
|
||||
try:
|
||||
r, w, x = select(self.devices, [], [])
|
||||
currShortcut = environment['input']['currShortcut']
|
||||
if r != []:
|
||||
@ -24,6 +25,8 @@ class inputManager():
|
||||
del(currShortcut[str(event.code)])
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
pass
|
||||
environment['input']['currShortcut'] = currShortcut
|
||||
environment['input']['currShortcutString'] = self.getShortcutString(environment)
|
||||
return environment
|
||||
|
@ -4,13 +4,13 @@ screenData = {
|
||||
'columns': 0,
|
||||
'lines': 0,
|
||||
'oldDelta': '',
|
||||
'oldCursorReview':{'x':0,'y':0},
|
||||
'oldCursorReview':{'x':-1,'y':-1},
|
||||
'oldCursor':{'x':0,'y':0},
|
||||
'oldContentBytes': b'',
|
||||
'oldContentText': '',
|
||||
'oldContentAttrib': b'',
|
||||
'newDelta': '',
|
||||
'newCursorReview':{'x':0,'y':0},
|
||||
'newCursorReview':{'x':-1,'y':-1},
|
||||
'newCursor':{'x':0,'y':0},
|
||||
'newContentBytes': b'',
|
||||
'newContentText': '',
|
||||
|
@ -41,6 +41,7 @@ class fenrir():
|
||||
def proceed(self):
|
||||
self.threadHandleInput = Thread(target=self.handleInput, args=())
|
||||
self.threadHandleInput.start()
|
||||
self.updateScreen()
|
||||
while(self.environment['generalInformation']['running']):
|
||||
self.updateScreen()
|
||||
self.shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user