Fix KeyInfo.__str__ for <Shift-Tab>
This commit is contained in:
parent
4e505d52df
commit
65a05f334e
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
"""Our own QKeySequence-like class and related utilities."""
|
"""Our own QKeySequence-like class and related utilities."""
|
||||||
|
|
||||||
import unicodedata
|
|
||||||
import collections
|
import collections
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
@ -235,12 +234,9 @@ class KeyInfo:
|
|||||||
|
|
||||||
key_string = _key_to_string(self.key)
|
key_string = _key_to_string(self.key)
|
||||||
|
|
||||||
if is_printable(self.key) and self.key != Qt.Key_Space:
|
if is_printable(self.key):
|
||||||
is_special_char = unicodedata.category(key_string) == 'Cc'
|
# FIXME Add a test to make sure Tab doesn;t become TAB
|
||||||
else:
|
assert len(key_string) == 1 or self.key == Qt.Key_Space, key_string
|
||||||
is_special_char = False
|
|
||||||
|
|
||||||
if not is_special_char:
|
|
||||||
if self.modifiers == Qt.ShiftModifier:
|
if self.modifiers == Qt.ShiftModifier:
|
||||||
parts = []
|
parts = []
|
||||||
key_string = key_string.upper()
|
key_string = key_string.upper()
|
||||||
|
Loading…
Reference in New Issue
Block a user