From 0b1eb5229dda06ec5be3ac38564dd1574987c052 Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 27 Mar 2018 00:33:41 +0200 Subject: [PATCH] add -E --- src/fenrirscreenreader/core/fenrirManager.py | 3 ++- src/fenrirscreenreader/core/settingsManager.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index 79d2b1e1..1f3f7ff9 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -39,7 +39,8 @@ class fenrirManager(): parser.add_argument('-o', '--options', metavar='SECTION#SETTING=VALUE,..', default='', help='Overwrite options in given settings file') parser.add_argument('-d', '--debug', action='store_true', help='Turns on Debugmode') parser.add_argument('-p', '--print', action='store_true', help='Print debug messages on screen') - parser.add_argument('-e', '--emulation', action='store_true', help='Use PTY emulation') + parser.add_argument('-e', '--emulation', action='store_true', help='Use PTY emulation and escape sequences for input') + parser.add_argument('-E', '--evemulation', action='store_true', help='Use PTY emulation and evdev for input (single instance)') try: args = parser.parse_args() except Exception as e: diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index 86545ba5..78d61d29 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -222,6 +222,10 @@ class settingsManager(): #self.setOptionArgDict('keyboard', 'keyboardLayout', 'pty') self.setSetting('keyboard', 'keyboardLayout', 'pty') self.setOptionArgDict('general', 'debugFile', '/tmp/fenrir-pty.log') + if cliArgs.evemulation: + self.setOptionArgDict('screen', 'driver', 'ptyDriver') + self.setOptionArgDict('keyboard', 'driver', 'evdevDriver') + self.setFenrirKeys(self.getSetting('general','fenrirKeys')) self.setScriptKeys(self.getSetting('general','scriptKeys'))