diff --git a/src/fenrir/core/commandManager.py b/src/fenrir/core/commandManager.py index 3834d06c..dda0753a 100644 --- a/src/fenrir/core/commandManager.py +++ b/src/fenrir/core/commandManager.py @@ -85,7 +85,6 @@ class commandManager(): keys = commSettings[1] elif len(commSettings) > 2: continue - keys = keys.split('__+__') shortcutKeys = [] shortcut = [] @@ -95,7 +94,6 @@ class commandManager(): shortcutKeys.append('KEY_SCRIPT') shortcut.append(1) shortcut.append(sorted(shortcutKeys)) - print(shortcut,command) self.env['bindings'][str(shortcut)] = fileName.upper() except Exception as e: print(e) diff --git a/src/fenrir/core/settings.py b/src/fenrir/core/settings.py index 19210810..0d295577 100644 --- a/src/fenrir/core/settings.py +++ b/src/fenrir/core/settings.py @@ -47,8 +47,8 @@ settings = { 'newLinePause':True, 'numberOfClipboards': 10, 'emoticons': True, - 'fenrirKeys': ['KEY_KP0','KEY_META'], - 'scriptKeys': ['KEY_COMPOSE'], + 'fenrirKeys': 'KEY_KP0,KEY_META', + 'scriptKeys': 'KEY_COMPOSE', 'timeFormat': '%I:%M%P', 'dateFormat': '%A, %B %d, %Y', 'autoSpellCheck': False, diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index b18e4cd5..9b1e1861 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -192,6 +192,7 @@ class settingsManager(): for key in keyList: if not key in self.env['input']['scriptKey']: self.env['input']['scriptKey'].append(key) + def initFenrirConfig(self, environment = environment.environment, settingsRoot = '/etc/fenrir/', settingsFile='settings.conf', soundRoot = '/usr/share/sounds/fenrir'): environment['runtime']['debug'] = debug.debug() environment['runtime']['debug'].initialize(environment) @@ -210,8 +211,10 @@ class settingsManager(): validConfig = environment['runtime']['settingsManager'].loadSettings(settingsRoot + '/settings/' + settingsFile) if not validConfig: return None + self.setFenrirKeys(self.getSetting('general','fenrirKeys')) - self.setScriptKeys(self.getSetting('general','scriptKeys')) + self.setScriptKeys(self.getSetting('general','scriptKeys')) + if not os.path.exists(self.getSetting('keyboard','keyboardLayout')): if os.path.exists(settingsRoot + 'keyboard/' + self.getSetting('keyboard','keyboardLayout')): self.setSetting('keyboard', 'keyboardLayout', settingsRoot + 'keyboard/' + self.getSetting('keyboard','keyboardLayout')) diff --git a/src/fenrir/fenrir b/src/fenrir/fenrir index a2c0248c..93e541c2 100755 --- a/src/fenrir/fenrir +++ b/src/fenrir/fenrir @@ -39,7 +39,7 @@ class fenrir(): eventReceived = self.environment['runtime']['inputManager'].getInputEvent() if eventReceived: self.prepareCommand() - if not (self.wasCommand or self.environment['runtime']['inputManager'].isFenrirKeyPressed() or self.environment['generalInformation']['tutorialMode']) or self.environment['runtime']['screenManager'].isSuspendingScreen(): + if not (self.wasCommand or self.environment['runtime']['inputManager'].isFenrirKeyPressed() or self.environment['runtime']['inputManager'].isScriptKeyPressed() or self.environment['generalInformation']['tutorialMode']) or self.environment['runtime']['screenManager'].isSuspendingScreen(): self.environment['runtime']['inputManager'].writeEventBuffer() if self.environment['runtime']['inputManager'].noKeyPressed(): if self.wasCommand: