From 65a05f334e008caa567b07fc80ec48ccd51be7b0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 28 Feb 2018 20:33:23 +0100 Subject: [PATCH] Fix KeyInfo.__str__ for --- qutebrowser/keyinput/keyutils.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/qutebrowser/keyinput/keyutils.py b/qutebrowser/keyinput/keyutils.py index dc04fcd7f..b9dc47fa4 100644 --- a/qutebrowser/keyinput/keyutils.py +++ b/qutebrowser/keyinput/keyutils.py @@ -19,7 +19,6 @@ """Our own QKeySequence-like class and related utilities.""" -import unicodedata import collections import itertools @@ -235,12 +234,9 @@ class KeyInfo: key_string = _key_to_string(self.key) - if is_printable(self.key) and self.key != Qt.Key_Space: - is_special_char = unicodedata.category(key_string) == 'Cc' - else: - is_special_char = False - - if not is_special_char: + if is_printable(self.key): + # FIXME Add a test to make sure Tab doesn;t become TAB + assert len(key_string) == 1 or self.key == Qt.Key_Space, key_string if self.modifiers == Qt.ShiftModifier: parts = [] key_string = key_string.upper()