fix window mode

This commit is contained in:
chrys 2016-10-03 01:34:46 +02:00
parent 772ea79128
commit d4b86d38f2
5 changed files with 16 additions and 13 deletions

View File

@ -26,10 +26,10 @@ KEY_FENRIR,KEY_KPDOT=exit_review
#KEY_FENRIR,KEY_KP5=curr_screen #KEY_FENRIR,KEY_KP5=curr_screen
KEY_FENRIR,KEY_KP8=curr_screen_before_cursor KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
#KEY_FENRIR,KEY_1=set_window_application KEY_FENRIR,KEY_1=set_window_application
#KEY_FENRIR,KEY_3=clear_window_application KEY_FENRIR,KEY_3=clear_window_application
KEY_FENRIR,KEY_3=clear_bookmark_1 #KEY_FENRIR,KEY_3=clear_bookmark_1
KEY_FENRIR,KEY_1=set_bookmark_1 #KEY_FENRIR,KEY_1=set_bookmark_1
KEY_FENRIR,KEY_2=bookmark_1 KEY_FENRIR,KEY_2=bookmark_1
KEY_KPPLUS=last_incoming KEY_KPPLUS=last_incoming
KEY_FENRIR,KEY_F2=toggle_braille KEY_FENRIR,KEY_F2=toggle_braille

View File

@ -57,7 +57,7 @@ module=espeak
voice= voice=
# Select the language you want fenrir to use. # Select the language you want fenrir to use.
language=de language=english-us
# Read new text as it happens? # Read new text as it happens?
autoReadIncoming=True autoReadIncoming=True
@ -82,7 +82,7 @@ device=AUTO
grabDevices=True grabDevices=True
ignoreShortcuts=False ignoreShortcuts=False
# the current shortcut layout located in /etc/fenrir/keyboard # the current shortcut layout located in /etc/fenrir/keyboard
keyboardLayout=test keyboardLayout=desktop
# echo chars while typing. # echo chars while typing.
charEcho=False charEcho=False
# echo deleted chars # echo deleted chars
@ -95,7 +95,7 @@ interruptOnKeyPress=False
doubleTapDelay=0.2 doubleTapDelay=0.2
[general] [general]
debugLevel=0 debugLevel=3
punctuationLevel=Some punctuationLevel=Some
numberOfClipboards=10 numberOfClipboards=10
# define the current fenrir key # define the current fenrir key

View File

@ -57,8 +57,10 @@ class cursorManager():
def isApplicationWindowSet(self): def isApplicationWindowSet(self):
try: try:
currApp = self.env['runtime']['applicationManager'].getCurrentApplication() currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
return self.env['commandBuffer']['windowArea'][currApp]['1'] != None if self.env['commandBuffer']['windowArea'][currApp]['1'] != None:
return True
except: except:
pass
return False return False
def setWindowForApplication(self): def setWindowForApplication(self):
if not self.env['commandBuffer']['Marks']['1']: if not self.env['commandBuffer']['Marks']['1']:

View File

@ -43,8 +43,10 @@ class screenManager():
return text return text
windowText = '' windowText = ''
windowList = text.split('\n') windowList = text.split('\n')
windowList = windowList[self.env['commandBuffer']['windowArea'][self.env['screenData']['newApplication']]['1']['y']:self.env['commandBuffer']['windowArea'][currApp]['2']['y'] + 1] currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
windowList = windowList[self.env['commandBuffer']['windowArea'][currApp]['1']['y']:self.env['commandBuffer']['windowArea'][currApp]['2']['y'] + 1]
for line in windowList: for line in windowList:
windowText += line[self.env['commandBuffer']['windowArea'][self.env['screenData']['newApplication']]['1']['x']:self.env['commandBuffer']['windowArea'][currApp]['2']['x'] + 1] + '\n' windowText += line[self.env['commandBuffer']['windowArea'][currApp]['1']['x']:self.env['commandBuffer']['windowArea'][currApp]['2']['x'] + 1] + '\n'
print(windowText)
return windowText return windowText

View File

@ -65,7 +65,6 @@ class fenrir():
self.handleCommands() self.handleCommands()
#print(time.time()-startTime) #print(time.time()-startTime)
self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication']
def prepareCommand(self): def prepareCommand(self):
if self.environment['runtime']['screenManager'].isSuspendingScreen(): if self.environment['runtime']['screenManager'].isSuspendingScreen():