diff --git a/src/kkeysequencewidget.cpp b/src/kkeysequencewidget.cpp --- a/src/kkeysequencewidget.cpp +++ b/src/kkeysequencewidget.cpp @@ -646,26 +646,29 @@ if (!s.isEmpty()) { s.append(QLatin1Char(',')); } - if (modifierKeys & Qt::META) { - s += KKeyServer::modToStringUser(Qt::META) + QLatin1Char('+'); + if (modifierKeys & Qt::MetaModifier) { + s += KKeyServer::modToStringUser(Qt::MetaModifier) + QLatin1Char('+'); } #if defined(Q_OS_MAC) - if (modifierKeys & Qt::ALT) { - s += KKeyServer::modToStringUser(Qt::ALT) + QLatin1Char('+'); + if (modifierKeys & Qt::AltModifier) { + s += KKeyServer::modToStringUser(Qt::AltModifier) + QLatin1Char('+'); } - if (modifierKeys & Qt::CTRL) { - s += KKeyServer::modToStringUser(Qt::CTRL) + QLatin1Char('+'); + if (modifierKeys & Qt::ControlModifier) { + s += KKeyServer::modToStringUser(Qt::ControlModifier) + QLatin1Char('+'); } #else - if (modifierKeys & Qt::CTRL) { - s += KKeyServer::modToStringUser(Qt::CTRL) + QLatin1Char('+'); + if (modifierKeys & Qt::ControlModifier) { + s += KKeyServer::modToStringUser(Qt::ControlModifier) + QLatin1Char('+'); } - if (modifierKeys & Qt::ALT) { - s += KKeyServer::modToStringUser(Qt::ALT) + QLatin1Char('+'); + if (modifierKeys & Qt::AltModifier) { + s += KKeyServer::modToStringUser(Qt::AltModifier) + QLatin1Char('+'); } #endif - if (modifierKeys & Qt::SHIFT) { - s += KKeyServer::modToStringUser(Qt::SHIFT) + QLatin1Char('+'); + if (modifierKeys & Qt::ShiftModifier) { + s += KKeyServer::modToStringUser(Qt::ShiftModifier) + QLatin1Char('+'); + } + if (modifierKeys & Qt::KeypadModifier) { + s += KKeyServer::modToStringUser(Qt::KeypadModifier) + QLatin1Char('+'); } } else if (nKey == 0) { @@ -727,7 +730,7 @@ return d->cancelRecording(); } - uint newModifiers = e->modifiers() & (Qt::SHIFT | Qt::CTRL | Qt::ALT | Qt::META); + uint newModifiers = e->modifiers() & (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier | Qt::KeypadModifier); //don't have the return or space key appear as first key of the sequence when they //were pressed to start editing - catch and them and imitate their effect @@ -811,7 +814,7 @@ e->accept(); - uint newModifiers = e->modifiers() & (Qt::SHIFT | Qt::CTRL | Qt::ALT | Qt::META); + uint newModifiers = e->modifiers() & (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier | Qt::KeypadModifier); //if a modifier that belongs to the shortcut was released... if ((newModifiers & d->modifierKeys) < d->modifierKeys) {