Commit 63588273 authored by Martin Aumüller's avatar Martin Aumüller Committed by Eike Ziller
Browse files

OS X: use control key as modifier for ctrl-n/ctrl-p navigation



this is the behaviour of many OS X widgets, e.g. in Spotlight

Change-Id: Idc769d45d53b332bafdfb8190fd3d14843347776
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 82223362
......@@ -530,7 +530,11 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e)
switch (ke->key()) {
case Qt::Key_N:
case Qt::Key_P:
#ifdef Q_OS_MAC
if (ke->modifiers() == Qt::MetaModifier) {
#else
if (ke->modifiers() == Qt::ControlModifier) {
#endif
e->accept();
return true;
}
......@@ -546,7 +550,11 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e)
case Qt::Key_P:
// select next/previous completion
d->m_explicitlySelected = true;
#ifdef Q_OS_MAC
if (ke->modifiers() == Qt::MetaModifier) {
#else
if (ke->modifiers() == Qt::ControlModifier) {
#endif
int change = (ke->key() == Qt::Key_N) ? 1 : -1;
int nrows = d->m_model->size();
int row = d->m_completionListView->currentIndex().row();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment