Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 58
    • Issues 58
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 152
    • Merge requests 152
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • KWinKWin
  • Merge requests
  • !786
The source project of this merge request has been removed.

fix global shortcuts for non-Latin symbols

Merged Andrey Butirsky requested to merge (removed):global_shortcuts into master Mar 15, 2021
  • Overview 46
  • Pipelines 0
  • Changes 10

Re-use Qt's implementation of handling non-Latin layouts here.

For full ASCII range support (Alt+`, etc.) Qt needs to be patched still:
QTBUG-90611, fix: https://codereview.qt-project.org/c/qt/qtbase/+/339895.
Without patched Qt, only alphabetical key shortcuts (on any layout) brought back to work.

QTBUG-62102 and some others Qt bugs currently workarounded in code here.

BUG: 375518

Without patched Qt, testNonLatinLayout detects Alt+` shortcut failure (this combination is currently disabled in the test for Qt 5):

$ dbus-run-session ~/kde/build/kde/workspace/kwin/bin/testGlobalShortcuts 
********* Start testing of GlobalShortcutsTest *********
Config: Using QtTest library 5.15.2, Qt 5.15.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.2.1 20201016 (Red Hat 10.2.1-6)), fedora 33
QWARN  : GlobalShortcutsTest::initTestCase() kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5127:46: this compose sequence is a duplicate of another; skipping line
...
QWARN  : GlobalShortcutsTest::initTestCase() kwin_decorations: Could not locate decoration plugin
QWARN  : GlobalShortcutsTest::initTestCase() kwin_xwl: /tmp/.X11-unix is not owned by root. Your system might be compromised!
QWARN  : GlobalShortcutsTest::initTestCase() kwin_xwl: Failed to create Xwayland connection sockets
PASS   : GlobalShortcutsTest::initTestCase()
FAIL!  : GlobalShortcutsTest::testNonLatinLayout() 'triggeredSpy.count() == 1' returned FALSE. (Alt+`)
   Loc: [/home/bam/kde/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp(125)]
PASS   : GlobalShortcutsTest::testConsumedShift()
PASS   : GlobalShortcutsTest::testRepeatedTrigger()
QWARN  : GlobalShortcutsTest::testUserActionsMenu() This plugin does not support raise()
QWARN  : GlobalShortcutsTest::testUserActionsMenu() This plugin does not support grabbing the keyboard
PASS   : GlobalShortcutsTest::testUserActionsMenu()
FAIL!  : GlobalShortcutsTest::testMetaShiftW() Compared values are not the same
   Actual   (((triggeredSpy.count()))): 0
   Expected (1)                       : 1
   Loc: [/home/bam/kde/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp(234)]
PASS   : GlobalShortcutsTest::testComponseKey()
FAIL!  : GlobalShortcutsTest::testX11ClientShortcut() 'windowCreatedSpy.wait()' returned FALSE. ()
   Loc: [/home/bam/kde/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp(298)]
PASS   : GlobalShortcutsTest::testWaylandClientShortcut()
QWARN  : GlobalShortcutsTest::testSetupWindowShortcut() This plugin does not support propagateSizeHints()
QWARN  : GlobalShortcutsTest::testSetupWindowShortcut() This plugin does not support raise()
QWARN  : GlobalShortcutsTest::testSetupWindowShortcut() This plugin does not support grabbing the keyboard
XFAIL  : GlobalShortcutsTest::testSetupWindowShortcut() Edit does not have focus
   Loc: [/home/bam/kde/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp(396)]
FAIL!  : GlobalShortcutsTest::testSetupWindowShortcut() Compared values are not the same
   Loc: [/home/bam/kde/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp(413)]
PASS   : GlobalShortcutsTest::cleanupTestCase()
Totals: 7 passed, 4 failed, 0 skipped, 0 blacklisted, 40456ms
********* Finished testing of GlobalShortcutsTest *********

The tests currently are still somewhat depend on each other, so expect some false positive after testNonLatinLayout() fail.

Edited Apr 05, 2021 by Andrey Butirsky
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: global_shortcuts