Changeset View
Changeset View
Standalone View
Standalone View
debug_console.cpp
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Line(s) | 262 | auto modifiersToString = [event] { | |||
---|---|---|---|---|---|
284 | if (event->modifiers().testFlag(Qt::GroupSwitchModifier)) { | 284 | if (event->modifiers().testFlag(Qt::GroupSwitchModifier)) { | ||
285 | ret.append(i18nc("A keyboard modifier", "Group-switch")); | 285 | ret.append(i18nc("A keyboard modifier", "Group-switch")); | ||
286 | ret.append(QStringLiteral(" ")); | 286 | ret.append(QStringLiteral(" ")); | ||
287 | } | 287 | } | ||
288 | return ret; | 288 | return ret; | ||
289 | }; | 289 | }; | ||
290 | text.append(timestampRow(event->timestamp())); | 290 | text.append(timestampRow(event->timestamp())); | ||
291 | text.append(tableRow(i18nc("Whether the event is an automatic key repeat", "Repeat"), event->isAutoRepeat())); | 291 | text.append(tableRow(i18nc("Whether the event is an automatic key repeat", "Repeat"), event->isAutoRepeat())); | ||
292 | | ||||
293 | const auto keyMetaObject = Qt::qt_getEnumMetaObject(Qt::Key()); | ||||
294 | const auto enumerator = keyMetaObject->enumerator(keyMetaObject->indexOfEnumerator("Key")); | ||||
292 | text.append(tableRow(i18nc("The code as read from the input device", "Scan code"), event->nativeScanCode())); | 295 | text.append(tableRow(i18nc("The code as read from the input device", "Scan code"), event->nativeScanCode())); | ||
296 | text.append(tableRow(i18nc("Key according to Qt", "Qt::Key code"), | ||||
romangg: Line length | |||||
297 | enumerator.valueToKey(event->key()))); | ||||
293 | text.append(tableRow(i18nc("The translated code to an Xkb symbol", "Xkb symbol"), event->nativeVirtualKey())); | 298 | text.append(tableRow(i18nc("The translated code to an Xkb symbol", "Xkb symbol"), event->nativeVirtualKey())); | ||
294 | text.append(tableRow(i18nc("The translated code interpreted as text", "Utf8"), event->text())); | 299 | text.append(tableRow(i18nc("The translated code interpreted as text", "Utf8"), event->text())); | ||
295 | text.append(tableRow(i18nc("The currently active modifiers", "Modifiers"), modifiersToString())); | 300 | text.append(tableRow(i18nc("The currently active modifiers", "Modifiers"), modifiersToString())); | ||
296 | 301 | | |||
297 | text.append(s_tableEnd); | 302 | text.append(s_tableEnd); | ||
298 | 303 | | |||
299 | m_textEdit->insertHtml(text); | 304 | m_textEdit->insertHtml(text); | ||
300 | m_textEdit->ensureCursorVisible(); | 305 | m_textEdit->ensureCursorVisible(); | ||
▲ Show 20 Lines • Show All 1291 Lines • Show Last 20 Lines |
Line length