From 27c5075b23b93bf08e36b7366535807705450b21 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Fri, 18 May 2018 13:54:08 +0200 Subject: [PATCH] Update evdevDriver.py --- src/fenrirscreenreader/inputDriver/evdevDriver.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index a8b63953..1fcedc52 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -147,13 +147,19 @@ class driver(inputDriver): self.removeAllDevices() print(newDevices) + deviceFileList = None + if newDevices and not init: deviceFileList = newDevices else: deviceFileList = evdev.list_devices() if len(deviceFileList) == self.iDeviceNo: - return + return + if not deviceFileList: + return + mode = self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper() + iDevicesFiles = [] for device in self.iDevices: iDevicesFiles.append(self.iDevices[device].fn)