From bd4cbce395d8ac54d768e4382662bde181444b49 Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 18 Oct 2016 15:23:51 +0200 Subject: [PATCH] filter out invalid shortcuts --- src/fenrir/core/settingsManager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index ec345864..bc7aaac3 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -55,6 +55,9 @@ class settingsManager(): shortcutKeys.append(key.upper()) shortcut.append(shortcutRepeat) shortcut.append(sorted(shortcutKeys)) + if len(shortcutKeys) != 1 and not 'KEY_FENRIR' in shortcutKeys: + self.env['runtime']['debug'].writeDebugOut("invalid shortcut (missing KEY_FENRIR): "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.ERROR, onAnyLevel=True) + continue self.env['runtime']['debug'].writeDebugOut("Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO, onAnyLevel=True) self.env['bindings'][str(shortcut)] = commandName kbConfig.close()