Lowercase special keys when checking if they're new

Between v0.8.4 and now, the default keybinding for Ctrl-PgDown changed:

    - ('tab-focus', ['J', '<Ctrl-PgDown>']),
    + ('tab-next', ['J', '<Ctrl-PgDown>']),

The existing keybinding was lower-cased in the config, but _is_new
didn't lowercase the new one, causing a conflict to show up.

Fixes #1835
See #1958
Supersedes #1986
This commit is contained in:
Florian Bruhin 2016-11-23 12:37:19 +01:00
parent 552e0551af
commit a3482a8979

View File

@ -280,6 +280,9 @@ class KeyConfigParser(QObject):
A binding is considered new if both the command is not bound to any key A binding is considered new if both the command is not bound to any key
yet, and the key isn't used anywhere else in the same section. yet, and the key isn't used anywhere else in the same section.
""" """
if utils.is_special_key(keychain):
keychain = keychain.lower()
try: try:
bindings = self.keybindings[sectname] bindings = self.keybindings[sectname]
except KeyError: except KeyError: