diff options
Diffstat (limited to 'src/gui/platform/darwin/qapplekeymapper.mm')
-rw-r--r-- | src/gui/platform/darwin/qapplekeymapper.mm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/platform/darwin/qapplekeymapper.mm b/src/gui/platform/darwin/qapplekeymapper.mm index bdf741573d..8011154c0b 100644 --- a/src/gui/platform/darwin/qapplekeymapper.mm +++ b/src/gui/platform/darwin/qapplekeymapper.mm @@ -551,7 +551,7 @@ const QAppleKeyMapper::KeyMap &QAppleKeyMapper::keyMapForKey(VirtualKeyCode virt qCDebug(lcQpaKeyMapper).verbosity(0) << "\t" << qtModifiers << "+" << qUtf8Printable(QString::asprintf("0x%02x", virtualKey)) << "=" << qUtf8Printable(QString::asprintf("%d / 0x%02x /", qtKey, qtKey)) - << QString::asprintf("%c", qtKey); + << QString(QChar(qtKey)); } return keyMap; @@ -578,6 +578,8 @@ QList<int> QAppleKeyMapper::possibleKeys(const QKeyEvent *event) const { QList<int> ret; + qCDebug(lcQpaKeyMapper) << "Computing possible keys for" << event; + const auto nativeVirtualKey = event->nativeVirtualKey(); if (!nativeVirtualKey) return ret; @@ -613,6 +615,17 @@ QList<int> QAppleKeyMapper::possibleKeys(const QKeyEvent *event) const } } + if (lcQpaKeyMapper().isDebugEnabled()) { + qCDebug(lcQpaKeyMapper) << "Possible keys:"; + for (int keyAndModifiers : ret) { + auto keyCombination = QKeyCombination::fromCombined(keyAndModifiers); + auto keySequence = QKeySequence(keyCombination); + qCDebug(lcQpaKeyMapper).verbosity(0) << "\t-" + << keyCombination << "/" << keySequence << "/" + << qUtf8Printable(keySequence.toString(QKeySequence::NativeText)); + } + } + return ret; } |