From 0eba9e631e9c0793945c839d84469879a3e31956 Mon Sep 17 00:00:00 2001 From: Yifan Zhu Date: Fri, 16 Aug 2024 09:20:16 -0700 Subject: [PATCH] debug_console: correct name scancode to keycode QKeyEvent()->nativeScanCode() actually reports the keycode generated by the kernel, not the scancode generated by the hardware. --- src/debug_console.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug_console.cpp b/src/debug_console.cpp index 53f5604de9..84477bd28c 100644 --- a/src/debug_console.cpp +++ b/src/debug_console.cpp @@ -294,7 +294,7 @@ void DebugConsoleFilter::keyEvent(KeyEvent *event) const auto keyMetaObject = Qt::qt_getEnumMetaObject(Qt::Key()); const auto enumerator = keyMetaObject->enumerator(keyMetaObject->indexOfEnumerator("Key")); - text.append(tableRow(i18nc("The code as read from the input device", "Scan code"), event->nativeScanCode())); + text.append(tableRow(i18nc("The code reported by the kernel", "Keycode"), event->nativeScanCode())); text.append(tableRow(i18nc("Key according to Qt", "Qt::Key code"), enumerator.valueToKey(event->key()))); text.append(tableRow(i18nc("The translated code to an Xkb symbol", "Xkb symbol"), event->nativeVirtualKey()));