Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kglobalacceld6 for openSUSE:Factory checked in at 2024-10-07 21:47:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kglobalacceld6 (Old) and /work/SRC/openSUSE:Factory/.kglobalacceld6.new.19354 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kglobalacceld6" Mon Oct 7 21:47:20 2024 rev:12 rq:1205902 version:6.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kglobalacceld6/kglobalacceld6.changes 2024-09-11 16:55:15.933712369 +0200 +++ /work/SRC/openSUSE:Factory/.kglobalacceld6.new.19354/kglobalacceld6.changes 2024-10-07 21:47:37.462750041 +0200 @@ -1,0 +2,29 @@ +Sat Oct 5 10:44:16 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de> + +- Update to 6.2.0: + * New bugfix release + * For more details see https://kde.org/announcements/plasma/6/6.2.0 +- Changes since 6.1.90: + * update version for new release + +------------------------------------------------------------------- +Tue Sep 17 14:53:26 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de> + +- Update to 6.1.90: + * New feature release + * For more details see https://kde.org/announcements/plasma/6/6.1.90 +- Changes since 6.1.5: + * update version for new release + * plugins/xcb: skip xrecord events when keyboard is grabbed (kde#488268,kde#491315) + * plugins/xcb: support different event types in xrecord + * Set up crash handling + * plugins/xcb: correctly handle multiple modifiers in xrecord + * plugins/xcb: only handle modifier presses in XRecord (kde#489113) + * explicitly process invalid keycodes (kde#489001) + * Add .gitignore file from kglobalaccel repo + * trigger modifier-only shortcuts when any modifier is released + * Remove redundant returns - no events are filtered out + * Prevent high CPU usage due to mass key remappings + * update version for new release + +------------------------------------------------------------------- Old: ---- kglobalacceld-6.1.5.tar.xz kglobalacceld-6.1.5.tar.xz.sig New: ---- kglobalacceld-6.2.0.tar.xz kglobalacceld-6.2.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kglobalacceld6.spec ++++++ --- /var/tmp/diff_new_pack.VnwBnY/_old 2024-10-07 21:47:38.134778001 +0200 +++ /var/tmp/diff_new_pack.VnwBnY/_new 2024-10-07 21:47:38.138778167 +0200 @@ -17,7 +17,7 @@ %global kf6_version 6.0.0 -%define qt6_version 6.6.0 +%define qt6_version 6.7.0 %define rname kglobalacceld %bcond_without released @@ -26,14 +26,14 @@ # Latest ABI-stable Plasma (e.g. 6.0 in KF6, but 6.0.80 in KUF) %{!?_plasma6_version: %define _plasma6_version %(echo %{_plasma6_bugfix} | awk -F. '{print $1"."$2}')} Name: kglobalacceld6 -Version: 6.1.5 +Version: 6.2.0 Release: 0 Summary: Global keyboard shortcut daemon License: LGPL-2.0-or-later URL: https://www.kde.org -Source: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz +Source: %{rname}-%{version}.tar.xz %if %{with released} -Source1: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig +Source1: %{rname}-%{version}.tar.xz.sig Source2: plasma.keyring %endif %if 0%{?suse_version} == 1500 ++++++ kglobalacceld-6.1.5.tar.xz -> kglobalacceld-6.2.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/.gitignore new/kglobalacceld-6.2.0/.gitignore --- old/kglobalacceld-6.1.5/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/kglobalacceld-6.2.0/.gitignore 2024-10-03 14:36:55.000000000 +0200 @@ -0,0 +1,29 @@ +# Ignore the following files +*~ +*.[oa] +*.diff +*.kate-swp +*.kdev4 +.kdev_include_paths +*.kdevelop.pcs +*.moc +*.moc.cpp +*.orig +*.user +.*.swp +.swp.* +Doxyfile +Makefile +avail +random_seed +/build*/ +CMakeLists.txt.user* +*.unc-backup* +.cmake/ +/.clang-format +/compile_commands.json +.clangd +.idea +.vscode +/cmake-build* +.cache diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/CMakeLists.txt new/kglobalacceld-6.2.0/CMakeLists.txt --- old/kglobalacceld-6.1.5/CMakeLists.txt 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/CMakeLists.txt 2024-10-03 14:36:55.000000000 +0200 @@ -2,11 +2,11 @@ project(kglobalacceld) -set(PROJECT_VERSION "6.1.5") +set(PROJECT_VERSION "6.2.0") set(PROJECT_VERSION_MAJOR 6) -set(QT_MIN_VERSION "6.6.0") -set(KF6_MIN_VERSION "6.2.0") +set(QT_MIN_VERSION "6.7.0") +set(KF6_MIN_VERSION "6.5.0") set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/autotests/shortcutstest.cpp new/kglobalacceld-6.2.0/autotests/shortcutstest.cpp --- old/kglobalacceld-6.1.5/autotests/shortcutstest.cpp 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/autotests/shortcutstest.cpp 2024-10-03 14:36:55.000000000 +0200 @@ -98,6 +98,12 @@ << std::make_pair(QEvent::KeyRelease, (Qt::ControlModifier | Qt::Key_Alt).toCombined()) << std::make_pair(QEvent::KeyRelease, Qt::Key_Control)) << true; + QTest::newRow("modifier-only multiple mods trigger when released out of order") + << QKeySequence(Qt::ControlModifier | Qt::AltModifier) + << (Events() << std::make_pair(QEvent::KeyPress, Qt::Key_Alt) << std::make_pair(QEvent::KeyPress, (Qt::AltModifier | Qt::Key_Control).toCombined()) + << std::make_pair(QEvent::KeyRelease, (Qt::ControlModifier | Qt::Key_Alt).toCombined()) + << std::make_pair(QEvent::KeyRelease, Qt::Key_Control)) + << true; QTest::newRow("modifier-only multiple mods does not trigger modifier-only single mod") << QKeySequence(Qt::ControlModifier) << (Events() << std::make_pair(QEvent::KeyPress, Qt::Key_Control) << std::make_pair(QEvent::KeyPress, (Qt::ControlModifier | Qt::Key_Alt).toCombined()) @@ -109,6 +115,14 @@ << (Events() << std::make_pair(QEvent::KeyPress, Qt::Key_Control) << std::make_pair(QEvent::KeyPress, (Qt::ControlModifier | Qt::Key_Shift).toCombined()) << std::make_pair(QEvent::KeyRelease, (Qt::ControlModifier | Qt::Key_Shift).toCombined()) + << std::make_pair(QEvent::KeyPress, (Qt::ControlModifier | Qt::Key_Alt).toCombined()) + << std::make_pair(QEvent::KeyRelease, (Qt::AltModifier | Qt::Key_Control).toCombined()) << std::make_pair(QEvent::KeyRelease, Qt::Key_Alt)) + << true; + QTest::newRow("modifier-only multiple mods trigger when any mod is released") + << QKeySequence(Qt::ControlModifier | Qt::ShiftModifier) + << (Events() << std::make_pair(QEvent::KeyPress, Qt::Key_Control) + << std::make_pair(QEvent::KeyPress, (Qt::ControlModifier | Qt::Key_Shift).toCombined()) + << std::make_pair(QEvent::KeyRelease, (Qt::ControlModifier | Qt::Key_Shift).toCombined()) << std::make_pair(QEvent::KeyPress, (Qt::ControlModifier | Qt::Key_Alt).toCombined()) << std::make_pair(QEvent::KeyRelease, (Qt::AltModifier | Qt::Key_Control).toCombined()) << std::make_pair(QEvent::KeyRelease, Qt::Key_Alt)) << true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/globalshortcutsregistry.cpp new/kglobalacceld-6.2.0/src/globalshortcutsregistry.cpp --- old/kglobalacceld-6.1.5/src/globalshortcutsregistry.cpp 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/globalshortcutsregistry.cpp 2024-10-03 14:36:55.000000000 +0200 @@ -431,11 +431,9 @@ case Qt::Key_Super_R: case Qt::Key_Meta: m_state = PressingModifierOnly; - m_currentModifiers = Utils::keyToModifier(key) | modifiers; return false; default: m_state = Normal; - m_currentModifiers = modifiers; return processKey(keyQt); } } @@ -533,20 +531,10 @@ case Qt::Key_Shift: case Qt::Key_Control: case Qt::Key_Alt: { - constexpr auto releaseTimeout = std::chrono::milliseconds(200); - const auto currentTime = std::chrono::steady_clock::now().time_since_epoch(); if (m_state == PressingModifierOnly) { - m_modifierOnlyModifiers = m_currentModifiers; - m_state = ReleasingModifierOnly; - m_modifierFirstReleaseTime = currentTime; - } - m_currentModifiers = modifiers & ~Utils::keyToModifier(key); - if (m_state == ReleasingModifierOnly && !m_currentModifiers) { - m_state = Normal; - if (currentTime - m_modifierFirstReleaseTime < releaseTimeout) { - handled = processKey(m_modifierOnlyModifiers); - } + handled = processKey(modifiers | Utils::keyToModifier(key)); } + m_state = Normal; break; } default: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/globalshortcutsregistry.h new/kglobalacceld-6.2.0/src/globalshortcutsregistry.h --- old/kglobalacceld-6.1.5/src/globalshortcutsregistry.h 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/globalshortcutsregistry.h 2024-10-03 14:36:55.000000000 +0200 @@ -170,18 +170,15 @@ QKeySequence _active_sequence; QHash<int, int> _keys_count; - Qt::KeyboardModifiers m_currentModifiers; // State machine: // Any -> PressingModifierOnly when a modifier is pressed - // PressingModifierOnly -> ReleasingModifierOnly when modifier keys are released - // ReleasingModifierOnly -> Normal when other keys are pressed - // ReleasingModifierOnly -> Normal when all keys are released, and when a non-modifier key is pressed - // Modifier-only shortcuts are triggered in ReleasingModifierOnly state, if all keys are released - // and the time since the first release is less than some threshold - enum { Normal, PressingModifierOnly, ReleasingModifierOnly } m_state = Normal; - // For use in modifier only shortcuts - Qt::KeyboardModifiers m_modifierOnlyModifiers; - std::chrono::nanoseconds m_modifierFirstReleaseTime; + // PressingModifierOnly -> Normal when any modifier key is released; and emit the shortcut + // PressingModifierOnly -> Normal when a non-modifier key is pressed + enum { Normal, PressingModifierOnly } m_state = Normal; + void resetModifierOnlyState() + { + m_state = Normal; + } using ComponentVec = std::vector<ComponentPtr>; ComponentVec m_components; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/kglobalaccel_interface.cpp new/kglobalacceld-6.2.0/src/kglobalaccel_interface.cpp --- old/kglobalacceld-6.1.5/src/kglobalaccel_interface.cpp 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/kglobalaccel_interface.cpp 2024-10-03 14:36:55.000000000 +0200 @@ -61,3 +61,8 @@ { return d->owner->axisTriggered(axis); } + +void KGlobalAccelInterface::resetModifierOnlyState() +{ + d->owner->resetModifierOnlyState(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/kglobalaccel_interface.h new/kglobalacceld-6.2.0/src/kglobalaccel_interface.h --- old/kglobalacceld-6.1.5/src/kglobalaccel_interface.h 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/kglobalaccel_interface.h 2024-10-03 14:36:55.000000000 +0200 @@ -84,6 +84,12 @@ * @returns @c true if the key was handled */ bool axisTriggered(int axis); + /** + * Called by the implementation to inform us about that the modifier-only state should be reset. + * Used when we don't want to actually handle the event, but still want to reset the state. + * + */ + void resetModifierOnlyState(); class Private; QScopedPointer<Private> d; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/kglobalacceld.desktop.in new/kglobalacceld-6.2.0/src/kglobalacceld.desktop.in --- old/kglobalacceld-6.1.5/src/kglobalacceld.desktop.in 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/kglobalacceld.desktop.in 2024-10-03 14:36:55.000000000 +0200 @@ -17,7 +17,6 @@ Name[fr]=Raccourcis globaux Name[gl]=Atallos globais Name[he]=קיצורי מקשים כלליים -Name[hi]=वैश्विक शॉर्टकट्स Name[hu]=Globális gyorsbillentyűk Name[ia]=Vias Breve Global Name[is]=Víðværir flýtilyklar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/plugins/xcb/kglobalaccel_x11.cpp new/kglobalacceld-6.2.0/src/plugins/xcb/kglobalaccel_x11.cpp --- old/kglobalacceld-6.1.5/src/plugins/xcb/kglobalaccel_x11.cpp 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/plugins/xcb/kglobalaccel_x11.cpp 2024-10-03 14:36:55.000000000 +0200 @@ -16,6 +16,7 @@ #include <QSocketNotifier> #include <QApplication> +#include <QTimer> #include <QWidget> #include <private/qtx11extras_p.h> @@ -77,6 +78,8 @@ memset(&range, 0, sizeof(range)); range.device_events.first = XCB_KEY_PRESS; range.device_events.last = XCB_BUTTON_PRESS; + range.core_requests.first = XCB_GRAB_KEYBOARD; + range.core_requests.last = XCB_UNGRAB_KEYBOARD; xcb_record_client_spec_t cs = XCB_RECORD_CS_ALL_CLIENTS; xcb_record_create_context(connection, context, 0, 1, 1, &cs, &range); auto cookie = xcb_record_enable_context(connection, context); @@ -110,22 +113,66 @@ } QScopedPointer<xcb_record_enable_context_reply_t, QScopedPointerPodDeleter> data(reinterpret_cast<xcb_record_enable_context_reply_t *>(reply)); - xcb_key_press_event_t *events = reinterpret_cast<xcb_key_press_event_t *>(xcb_record_enable_context_data(reply)); - int nEvents = xcb_record_enable_context_data_length(reply) / sizeof(xcb_key_press_event_t); - for (xcb_key_press_event_t *e = events; e < events + nEvents; e++) { + uint8_t *events = xcb_record_enable_context_data(reply); + uint8_t *const eventsEnd = events + xcb_record_enable_context_data_length(reply); + while (events < eventsEnd) { qCDebug(KGLOBALACCELD) << "Got XKeyRelease event"; - switch (e->response_type) { - case XCB_KEY_PRESS: - x11KeyPress(e); - break; - case XCB_KEY_RELEASE: - x11KeyRelease(e); + switch (*events) { + case XCB_KEY_PRESS: { + // only handle modifier keys here, so as not to trigger when + // event is grabbed by other clients; handle normal keys in + // nativeEventFilter + xcb_key_press_event_t *keyPressEvent = reinterpret_cast<xcb_key_press_event_t *>(events); + events += sizeof(xcb_key_press_event_t); + if (m_keyboardGrabbed) { + break; + } + int keyQt; + if (!KKeyServer::xcbKeyPressEventToQt(keyPressEvent, &keyQt)) { + qCWarning(KGLOBALACCELD) << "KKeyServer::xcbKeyPressEventToQt failed"; + break; + } + switch (keyQt & ~Qt::KeyboardModifierMask) { + case Qt::Key_Shift: + case Qt::Key_Control: + case Qt::Key_Alt: + case Qt::Key_Super_L: + case Qt::Key_Super_R: + case Qt::Key_Meta: + x11KeyPress(keyPressEvent); + break; + default: + // even though we don't handle the key, we need to update the state machine + resetModifierOnlyState(); + break; + } + } break; + case XCB_KEY_RELEASE: { + xcb_key_press_event_t *keyReleaseEvent = reinterpret_cast<xcb_key_press_event_t *>(events); + events += sizeof(xcb_key_release_event_t); + if (m_keyboardGrabbed) { + break; + } + x11KeyRelease(keyReleaseEvent); + } break; + case XCB_BUTTON_PRESS: { + xcb_button_press_event_t *buttonPressEvent = reinterpret_cast<xcb_button_press_event_t *>(events); + x11ButtonPress(buttonPressEvent); + events += sizeof(xcb_button_press_event_t); + } break; + case XCB_UNGRAB_KEYBOARD: + m_keyboardGrabbed = false; + events += sizeof(xcb_ungrab_keyboard_request_t); break; - case XCB_BUTTON_PRESS: - x11ButtonPress(e); + case XCB_GRAB_KEYBOARD: + m_keyboardGrabbed = true; + events += sizeof(xcb_grab_keyboard_request_t); break; default: // Impossible + Q_UNREACHABLE(); + qCWarning(KGLOBALACCELD) << "Got unknown event type" << *events; + events = eventsEnd; // exit the while loop break; } } @@ -134,6 +181,10 @@ m_notifier->setEnabled(true); calculateGrabMasks(); + + m_remapTimer = new QTimer(this); + m_remapTimer->setSingleShot(true); + connect(m_remapTimer, &QTimer::timeout, this, &KGlobalAccelImpl::x11MappingNotify); } KGlobalAccelImpl::~KGlobalAccelImpl() @@ -289,45 +340,57 @@ if (eventType != "xcb_generic_event_t") { return false; } + xcb_generic_event_t *event = reinterpret_cast<xcb_generic_event_t *>(message); const uint8_t responseType = event->response_type & ~0x80; if (responseType == XCB_MAPPING_NOTIFY) { - x11MappingNotify(); + qCDebug(KGLOBALACCELD) << "Got XCB_MAPPING_NOTIFY event"; + scheduleX11MappingNotify(); - // Make sure to let Qt handle it as well - return false; } else if (responseType == XCB_KEY_PRESS) { qCDebug(KGLOBALACCELD) << "Got XKeyPress event"; - return false; + return x11KeyPress(reinterpret_cast<xcb_key_press_event_t *>(event)); } else if (m_xkb_first_event && responseType == m_xkb_first_event) { const uint8_t xkbEvent = event->pad0; switch (xkbEvent) { case XCB_XKB_MAP_NOTIFY: - x11MappingNotify(); + qCDebug(KGLOBALACCELD) << "Got XCB_XKB_MAP_NOTIFY event"; + scheduleX11MappingNotify(); break; case XCB_XKB_NEW_KEYBOARD_NOTIFY: { const xcb_xkb_new_keyboard_notify_event_t *ev = reinterpret_cast<xcb_xkb_new_keyboard_notify_event_t *>(event); if (ev->changed & XCB_XKB_NKN_DETAIL_KEYCODES) { - x11MappingNotify(); + qCDebug(KGLOBALACCELD) << "Got XCB_XKB_NEW_KEYBOARD_NOTIFY event with XCB_XKB_NKN_DETAIL_KEYCODES"; + scheduleX11MappingNotify(); } break; } default: break; } + } + // else... we get all xcb_generic_event_t. Just ignore the ones we don't care about. - // Make sure to let Qt handle it as well - return false; - } else { - // We get all XEvents. Just ignore them. - return false; + // Make sure to let Qt handle the event as well + return false; +} + +void KGlobalAccelImpl::scheduleX11MappingNotify() +{ + // Prevent high CPU usage due to mass key remappings. + // x11MappingNotify() is fairly expensive, and in case the user modifies the whole keyboard using + // xmodmap, which apparently happens key by key, kglobalacceld used to spend over one minute in + // x11MappingNotify(). This bundling of changes reduces time spent to a few seconds and shouldn't + // delay application of changes enough to be noticeable - in fact, kglobalacceld will be done much + // more quickly, effectively *reducing* latency. + if (!m_remapTimer->isActive()) { + m_remapTimer->start(20); } } void KGlobalAccelImpl::x11MappingNotify() { - qCDebug(KGLOBALACCELD) << "Got XMappingNotify event"; - + qCDebug(KGLOBALACCELD) << "Re-mapping keys"; // Maybe the X modifier map has been changed. // uint oldKeyModMaskXAccel = g_keyModMaskXAccel; // uint oldKeyModMaskXOnOrOff = g_keyModMaskXOnOrOff; @@ -380,7 +443,7 @@ return keyPressed(keyQt); } -bool KGlobalAccelImpl::x11KeyRelease(xcb_key_press_event_t *pEvent) +bool KGlobalAccelImpl::x11KeyRelease(xcb_key_release_event_t *pEvent) { if (QWidget::keyboardGrabber() || QApplication::activePopupWidget()) { qCWarning(KGLOBALACCELD) << "kglobalacceld should be popup and keyboard grabbing free!"; @@ -393,7 +456,7 @@ return keyReleased(keyQt); } -bool KGlobalAccelImpl::x11ButtonPress(xcb_key_press_event_t *event) +bool KGlobalAccelImpl::x11ButtonPress(xcb_button_press_event_t *event) { Q_UNUSED(event); // TODO: get buttons, and differentiate between pointer and axis events diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kglobalacceld-6.1.5/src/plugins/xcb/kglobalaccel_x11.h new/kglobalacceld-6.2.0/src/plugins/xcb/kglobalaccel_x11.h --- old/kglobalacceld-6.1.5/src/plugins/xcb/kglobalaccel_x11.h 2024-09-10 10:50:26.000000000 +0200 +++ new/kglobalacceld-6.2.0/src/plugins/xcb/kglobalaccel_x11.h 2024-10-03 14:36:55.000000000 +0200 @@ -15,7 +15,10 @@ struct xcb_key_press_event_t; typedef xcb_key_press_event_t xcb_key_release_event_t; +struct xcb_button_press_event_t; typedef struct _XCBKeySymbols xcb_key_symbols_t; +class QTimer; + /** * @internal * @@ -53,6 +56,8 @@ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *) override; private: + void scheduleX11MappingNotify(); + void x11MappingNotify(); /** * Filters X11 events ev for key bindings in the accelerator dictionary. * If a match is found the activated activated is emitted and the function @@ -60,15 +65,16 @@ * * This is public for compatibility only. You do not need to call it. */ - void x11MappingNotify(); bool x11KeyPress(xcb_key_press_event_t *event); - bool x11KeyRelease(xcb_key_press_event_t *event); - bool x11ButtonPress(xcb_key_press_event_t *event); + bool x11KeyRelease(xcb_key_release_event_t *event); + bool x11ButtonPress(xcb_button_press_event_t *event); xcb_key_symbols_t *m_keySymbols; uint8_t m_xkb_first_event; void *m_display; unsigned int m_xrecordCookieSequence; + QTimer *m_remapTimer; + bool m_keyboardGrabbed = false; }; #endif // _KGLOBALACCEL_X11_H