From 37a7e22154a4161dfe060614f5b18ad10f9e8bdd Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 30 Jan 2019 09:28:04 +0100 Subject: [PATCH 1/4] Update evdevDriver.py --- src/fenrirscreenreader/inputDriver/evdevDriver.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 76338a62..a68a60a5 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -52,15 +52,14 @@ class driver(inputDriver): if not self._initialized: global _evdevAvailableError global _udevAvailableError - currError = ' ' - if not _evdevAvailable: - currError += _evdevAvailableError if not _udevAvailable: - currError += ' ' + _udevAvailableError - self.env['runtime']['debug'].writeDebugOut('InputDriver:' + currError, debug.debugLevel.ERROR) - return + self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR) + if not _evdevAvailable: + self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR) + return - self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) + if _udevAvailable: + self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog) def plugInputDeviceWatchdogUdev(self,active , eventQueue): context = pyudev.Context() From 528f39768c321ca959e723858e598a3ee71a3920 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 30 Jan 2019 09:33:23 +0100 Subject: [PATCH 2/4] Update evdevDriver.py --- .../inputDriver/evdevDriver.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index a68a60a5..6d0084d7 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -48,19 +48,19 @@ class driver(inputDriver): self.env['runtime']['inputManager'].setShortcutType('KEY') global _evdevAvailable global _udevAvailable - self._initialized = _evdevAvailable and _udevAvailable - if not self._initialized: - global _evdevAvailableError - global _udevAvailableError - if not _udevAvailable: - self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR) - if not _evdevAvailable: - self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR) - return + global _evdevAvailableError + global _udevAvailableError + if not _udevAvailable: + self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR) + if not _evdevAvailable: + self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR) + return if _udevAvailable: self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog) + self._initialized = True + def plugInputDeviceWatchdogUdev(self,active , eventQueue): context = pyudev.Context() monitor = pyudev.Monitor.from_netlink(context) From acbd057f2e68c60a24a0498814ad3a4263d88145 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 30 Jan 2019 09:33:41 +0100 Subject: [PATCH 3/4] Update evdevDriver.py --- src/fenrirscreenreader/inputDriver/evdevDriver.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 6d0084d7..8c01fa40 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -1,6 +1,3 @@ -#!/bin/python -# -*- coding: utf-8 -*- - # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. From 3232c3672f494fc83dbb8dc7431e9f669ae792f6 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 30 Jan 2019 10:19:54 +0100 Subject: [PATCH 4/4] Update settings.conf --- config/settings/settings.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings/settings.conf b/config/settings/settings.conf index 2d48e901..65bec737 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -142,7 +142,7 @@ charDeleteEcho=True # echo word after pressing space wordEcho=False # interrupt speech on any keypress -interruptOnKeyPress=False +interruptOnKeyPress=True # you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys) interruptOnKeyPressFilter= # timeout for double tap in sec