Browse Source

Merge pull request #2424 from laanwj/2013_03_capslock

Improve capslock detection on non-us keyboards
0.8
Wladimir J. van der Laan 12 years ago
parent
commit
ea62520426
  1. 2
      src/qt/askpassphrasedialog.cpp

2
src/qt/askpassphrasedialog.cpp

@ -235,7 +235,7 @@ bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event)
if (str.length() != 0) { if (str.length() != 0) {
const QChar *psz = str.unicode(); const QChar *psz = str.unicode();
bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0;
if ((fShift && psz->isLower()) || (!fShift && psz->isUpper())) { if ((fShift && *psz >= 'a' && *psz <= 'z') || (!fShift && *psz >= 'A' && *psz <= 'Z')) {
fCapsLock = true; fCapsLock = true;
ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!"));
} else if (psz->isLetter()) { } else if (psz->isLetter()) {

Loading…
Cancel
Save