Handle escape key correctly
This commit is contained in:
parent
70afe4d1fd
commit
261bb85791
@ -407,7 +407,15 @@ def key_to_string(key):
|
||||
try:
|
||||
return special_names[key]
|
||||
except KeyError:
|
||||
return QKeySequence(key).toString().replace("Backtab", "Tab")
|
||||
name = QKeySequence(key).toString().replace("Backtab", "Tab")
|
||||
morphings = {
|
||||
'Backtab': 'Tab',
|
||||
'Esc': 'Escape',
|
||||
}
|
||||
if name in morphings:
|
||||
return morphings[name]
|
||||
else:
|
||||
return name
|
||||
|
||||
|
||||
def keyevent_to_string(e):
|
||||
|
Loading…
Reference in New Issue
Block a user