-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global hotkeys do not work in Wayland + Plasma 6 environment #1412
Comments
Describe bug The hotkey to bring up the main window is set to System and Software Version The system is Arch Linux, Plasma version v6.0.1.
|
再做测试发现这两个热键只在 GD 主窗口打开且获得焦点时可用,即按 |
After further testing, I found that these two hotkeys are only available when the GD main window is open and has focus. That is, pressing |
Sadly, there are various tasks to make GD works natively on Wayland without bugs. At the same time, XWayland is getting more restrictive than before. This is probably intended. XWayland can no longer monitor and intercept global shortcuts. Also, If a window is not focused, there will be no clipboard change event anymore. Although we call it "broken", I guess desktop environment developers like KDE call it "Wayland properly implemented" :) Anyway, a temporal workaround is enabling global shortcut at KDE level: Bind a script that reads from clipboard and pass it to Goldendict. Then you can use, for example, |
You can also bind |
Thank you for the tips @shenlebantongying, for now the KDE shortcut works well. |
The right way is register GlobalShortcuts use https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.GlobalShortcuts.html |
Here is my insanely bad and awful code to test https://github.com/SourceReviver/qt_wayland_globalshortcut_via_portal It will register shortcuts and response to them when triggered on KDE/Wayland. A better implementation can be found https://invent.kde.org/libraries/xdg-portal-test-kde I am still not sure about how to handle errors, app shutdown... So far,
|
It also does not work in fedora 40(Gnome Desktop) with flatpak version. |
描述 bug
调出主窗口的热键设为
Ctrl+F12
,翻译剪贴板单词的热键设为Ctrl+C
Ctrl+C
。这两个热键在 KDE Plasma 6 + Wayland 环境下均失效,按下没有反应。
系统和软件版本
系统为 Arch Linux,Plasma 版本 v6.0.1。
The text was updated successfully, but these errors were encountered: