296,24 → 296,6 |
// we prefer plain English |
QString res; |
if ((KeyC & Qt::META) != 0) |
res += "Meta+"; |
if ((KeyC & Qt::CTRL) != 0) |
res += "Ctrl+"; |
if ((KeyC & Qt::ALT) != 0) |
res += "Alt+"; |
if ((KeyC & Qt::SHIFT) != 0) |
res += "Shift+"; |
return res + QString(QKeySequence(KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT))); |
} |
|
QString Prefs_KeyboardShortcuts::getTrKeyText(int KeyC) |
{ |
if ((KeyC & ~(Qt::META | Qt::CTRL | Qt::ALT | Qt::SHIFT)) == 0) |
return ""; |
// on OSX Qt translates modifiers to forsaken symbols, arrows and the like |
// we prefer plain English |
QString res; |
if ((KeyC & Qt::META) != 0) |
res += CommonStrings::metaModifier + "+"; |
if ((KeyC & Qt::CTRL) != 0) |
res += CommonStrings::controlModifier + "+"; |
518,13 → 500,13 |
break; |
default: |
keyCode |= k->key(); |
keyDisplay->setText(getTrKeyText(keyCode)); |
keyDisplay->setText(getKeyText(keyCode)); |
releaseKeyboard(); |
if (checkKey(keyCode)) |
{ |
QMessageBox::information(this, CommonStrings::trWarning, |
tr("The %1 key sequence is already in use by \"%2\"") |
.arg(getTrKeyText(keyCode)) |
.arg(getKeyText(keyCode)) |
.arg(getAction(keyCode)), |
CommonStrings::tr_OK); |
selectedLVI->setText(1,keyMap[lviToActionMap[selectedLVI]].keySequence); |