Handle all key modifiers correctly

This commit is contained in:
Florian Bruhin 2014-07-03 06:29:05 +02:00
parent fd9079b49d
commit a52796e94d
2 changed files with 4 additions and 3 deletions

View File

@ -54,8 +54,6 @@ Bugs
- restart sometimes abort()s on QApplication __init__ (V155)
- Super key shows up as ៀ\udc53 in logs
- Funky font rendering with tewi:
http://a.pomf.se/ecgzlx.png

View File

@ -141,7 +141,10 @@ class BaseKeyParser(QObject):
Qt.MetaModifier: 'Meta',
Qt.ShiftModifier: 'Shift'
}
if e.key() in (Qt.Key_Control, Qt.Key_Alt, Qt.Key_Shift, Qt.Key_Meta):
modifiers = (Qt.Key_Control, Qt.Key_Alt, Qt.Key_Shift, Qt.Key_Meta,
Qt.Key_AltGr, Qt.Key_Super_L, Qt.Key_Super_R,
Qt.Key_Hyper_L, Qt.Key_Hyper_R)
if e.key() in modifiers:
# Only modifier pressed
return False
mod = e.modifiers()