From 7fd98fe988a8278e7866245e5077f2956018c21b Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 31 Jan 2017 00:12:17 +0100 Subject: [PATCH] add option for brailleFocusMode --- config/settings/espeak.settings.conf | 6 ++++++ config/settings/settings.conf | 6 ++++++ config/settings/settings.conf.chrys | 6 ++++++ config/settings/settings.conf.storm | 6 ++++++ src/fenrir/brailleDriver/dummyDriver.py | 5 +++-- src/fenrir/core/settings.py | 1 + 6 files changed, 28 insertions(+), 2 deletions(-) diff --git a/config/settings/espeak.settings.conf b/config/settings/espeak.settings.conf index e167e8f9..e4c58ee4 100644 --- a/config/settings/espeak.settings.conf +++ b/config/settings/espeak.settings.conf @@ -130,6 +130,12 @@ scriptPath=/usr/share/fenrir/scripts [focus] cursor=True highlight=False +How should the braille follow the focus +# manual = no automatic toggle command used +# review = priority to review +# last = follow last used cursor +# text = jumps to textcursor when typing, needs command to be back to review +brailleFocusMode=review [review] lineBreak=True diff --git a/config/settings/settings.conf b/config/settings/settings.conf index 14d8fea4..fdb87a16 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -133,6 +133,12 @@ scriptPath=/usr/share/fenrir/scripts cursor=True #follow highlighted text changes highlight=False +How should the braille follow the focus +# manual = no automatic toggle command used +# review = priority to review +# last = follow last used cursor +# text = jumps to textcursor when typing, needs command to be back to review +brailleFocusMode=review [review] lineBreak=True diff --git a/config/settings/settings.conf.chrys b/config/settings/settings.conf.chrys index b2d64c8f..30d6fe0a 100644 --- a/config/settings/settings.conf.chrys +++ b/config/settings/settings.conf.chrys @@ -132,6 +132,12 @@ scriptPath=/usr/share/fenrir/scripts cursor=True #follow highlighted text changes highlight=False +How should the braille follow the focus +# manual = no automatic toggle command used +# review = priority to review +# last = follow last used cursor +# text = jumps to textcursor when typing, needs command to be back to review +brailleFocusMode=review [review] lineBreak=True diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index 195b59eb..dc5199b0 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -83,6 +83,12 @@ scriptPath=/usr/share/fenrir/scripts cursor=True #follow highlighted text changes highlight=False +How should the braille follow the focus +# manual = no automatic toggle command used +# review = priority to review +# last = follow last used cursor +# text = jumps to textcursor when typing, needs command to be back to review +brailleFocusMode=review [review] lineBreak=True diff --git a/src/fenrir/brailleDriver/dummyDriver.py b/src/fenrir/brailleDriver/dummyDriver.py index 44cf395e..08902ce6 100644 --- a/src/fenrir/brailleDriver/dummyDriver.py +++ b/src/fenrir/brailleDriver/dummyDriver.py @@ -13,14 +13,15 @@ class driver(): def initialize(self, environment): self.env = environment self._isInitialized = True + self.deviceSize = (40,0) print('BrailleDummyDriver: Initialize') def getDeviceSize(self): if not self._isInitialized: return (0,0) - print('BrailleDummyDriver: getDeviceSize 20') - return (20,0) + print('BrailleDummyDriver: getDeviceSize ' + str(self.deviceSize)) + return self.deviceSize def writeText(self,text): if not self._isInitialized: diff --git a/src/fenrir/core/settings.py b/src/fenrir/core/settings.py index 4f3e8756..bc5fcd97 100644 --- a/src/fenrir/core/settings.py +++ b/src/fenrir/core/settings.py @@ -61,6 +61,7 @@ settings = { 'focus':{ 'cursor': True, 'highlight': False, + 'brailleFocusMode': 'review', }, 'review':{ 'lineBreak': True,