Change the formatting of the numpad keys

This makes it consistent with as before
This commit is contained in:
George Edward Bulmer 2018-03-21 15:41:08 +00:00
parent 1cf3d66a22
commit 991ba54499

View File

@ -299,15 +299,13 @@ class KeyInfo:
elif self.modifiers == Qt.NoModifier:
assert not is_special(self.key, self.modifiers)
return key_string.lower()
elif self.modifiers == Qt.KeypadModifier:
assert not is_special(self.key, self.modifiers)
return "<Num+{}>".format(key_string)
else:
# Use special binding syntax, but <Ctrl-a> instead of <Ctrl-A>
key_string = key_string.lower()
# "special" binding
assert is_special(self.key, self.modifiers)
assert (is_special(self.key, self.modifiers) or
self.modifiers == Qt.KeypadModifier)
modifier_string = _modifiers_to_string(modifiers)
return '<{}{}>'.format(modifier_string, key_string)