Merge branch 'master' into vmenu

This commit is contained in:
chrys 2019-02-04 23:12:27 +01:00
commit f0ce975d36
2 changed files with 12 additions and 16 deletions

View File

@ -142,7 +142,7 @@ charDeleteEcho=True
# echo word after pressing space # echo word after pressing space
wordEcho=False wordEcho=False
# interrupt speech on any keypress # 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) # you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interruptOnKeyPressFilter= interruptOnKeyPressFilter=
# timeout for double tap in sec # timeout for double tap in sec

View File

@ -1,6 +1,3 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader # Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers. # By Chrys, Storm Dragon, and contributers.
@ -49,20 +46,19 @@ class driver(inputDriver):
self.env['runtime']['inputManager'].setShortcutType('KEY') self.env['runtime']['inputManager'].setShortcutType('KEY')
global _evdevAvailable global _evdevAvailable
global _udevAvailable global _udevAvailable
self._initialized = _evdevAvailable and _udevAvailable
if not self._initialized:
global _evdevAvailableError global _evdevAvailableError
global _udevAvailableError global _udevAvailableError
currError = ' '
if not _evdevAvailable:
currError += _evdevAvailableError
if not _udevAvailable: if not _udevAvailable:
currError += ' ' + _udevAvailableError self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR)
self.env['runtime']['debug'].writeDebugOut('InputDriver:' + currError, debug.debugLevel.ERROR) if not _evdevAvailable:
self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR)
return return
if _udevAvailable:
self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev)
self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog) self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog)
self._initialized = True
def plugInputDeviceWatchdogUdev(self,active , eventQueue): def plugInputDeviceWatchdogUdev(self,active , eventQueue):
context = pyudev.Context() context = pyudev.Context()
monitor = pyudev.Monitor.from_netlink(context) monitor = pyudev.Monitor.from_netlink(context)