diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index 8ca752b9ed..9b6b690a6d 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -778,6 +778,8 @@ ShortcutDialog::ShortcutDialog( const QKeySequence& cut, QWidget* parent ) , widget( new KKeySequenceWidget( this )) { widget->setKeySequence( cut ); + // It's a global shortcut so don't allow multikey shortcuts + widget->setMultiKeyShortcutsAllowed(false); setMainWidget( widget ); } diff --git a/utils.cpp b/utils.cpp index 9f57b9cf28..0926216da8 100644 --- a/utils.cpp +++ b/utils.cpp @@ -417,6 +417,8 @@ ShortcutDialog::ShortcutDialog( const QKeySequence& cut ) // To not check for conflicting shortcuts. The widget would use a message // box which brings down kwin. widget->setCheckForConflictsAgainst(KKeySequenceWidget::None); + // It's a global shortcut so don't allow multikey shortcuts + widget->setMultiKeyShortcutsAllowed(false); // Listen to changed shortcuts connect( @@ -462,8 +464,9 @@ void ShortcutDialog::done( int r ) void ShortcutDialog::keySequenceChanged(const QKeySequence &seq) { // Check if the key sequence is used currently - QStringList conflicting = KGlobalAccel::findActionNameSystemwide(seq); + QList conflicting = KGlobalAccel::getGlobalShortcutsByKey(seq); if (!conflicting.isEmpty()) { + kDebug() << "TODO: Display conflicting shortcuts to user"; // TODO: Inform the user somehow instead of just ignoring his wish widget->setKeySequence(shortcut()); }