Trap meta key combinations for bug 743273. (Tested with Win key on Windows, don't have OS-X to test CMD key)

This commit is contained in:
Jonathan Corwin 2011-06-23 23:30:56 +01:00
parent 212103ce7b
commit e1dc332be4
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
if event.modifiers() & QtCore.Qt.ShiftModifier == \
QtCore.Qt.ShiftModifier:
key_string = u'Shift+' + key_string
if event.modifiers() & QtCore.Qt.MetaModifier == \
QtCore.Qt.MetaModifier:
key_string = u'Meta+' + key_string
key_sequence = QtGui.QKeySequence(key_string)
if self._validiate_shortcut(self._currentItemAction(), key_sequence):
if self.primaryPushButton.isChecked():