Skip to content
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 shortcuts are disabled on Wayland #460

Closed
xAdamQ opened this issue Aug 8, 2022 · 20 comments
Closed

Global shortcuts are disabled on Wayland #460

xAdamQ opened this issue Aug 8, 2022 · 20 comments
Labels
bug Something isn't working

Comments

@xAdamQ
Copy link

xAdamQ commented Aug 8, 2022

I switched from x11 to Wayland then the global shortcuts became greyed out and the default shortcuts doesn't work.

  • OS: Arch Linux Manjaro
  • Desktop environment: KDE Plasma
  • Crow Translate version: 2.9.10

image

@xAdamQ xAdamQ added the bug Something isn't working label Aug 8, 2022
@Shatur
Copy link
Member

Shatur commented Aug 8, 2022

It's expected because global shortcuts are unsupported on Wayland.
In Wayland global shortcuts became IDE-specific. Looks like you use KDE? You can set Crow global shortcuts in your system settings (just add Crow Translate application and configure its shortcuts).
But be aware that there is some unresolved issues with Wayland like #324.

@Shatur Shatur closed this as completed Aug 8, 2022
@Shatur Shatur changed the title global shortcuts are disabled on wayland Global shortcuts are disabled on Wayland Aug 8, 2022
@xAdamQ
Copy link
Author

xAdamQ commented Aug 8, 2022

Thank you very much.

@xAdamQ xAdamQ closed this as completed Aug 8, 2022
@GrgMdmn
Copy link

GrgMdmn commented Oct 1, 2023

Hello ! I am using KDE + Wayland (openSUSE), and have added "Crow Translate" in the "shortcut section" :
image

What I do not understand is that the shortcut section of the "Crow Translate" app is still in grey, and the shortcut are still not working, even if I reboot my system...
image

@Shatur
Copy link
Member

Shatur commented Oct 1, 2023

You probably missing qdbus in your system. Shortcuts in KDE settings basically execute commands from desktop files:

Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection

@GrgMdmn
Copy link

GrgMdmn commented Oct 2, 2023

I am trying to install qdbus using this command sudo zypper install libqt5-qdbus but system says me it is already installed

@Shatur
Copy link
Member

Shatur commented Oct 2, 2023

Try to execute qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection from the desktop file.

@GrgMdmn
Copy link

GrgMdmn commented Oct 2, 2023

Where to find this desktop file...? ^^'

@Shatur
Copy link
Member

Shatur commented Oct 2, 2023

Depends on your distro. In my case it located in /usr/share/applications/io.crow_translate.CrowTranslate.desktop.

@GrgMdmn
Copy link

GrgMdmn commented Oct 4, 2023

qdbus does not exist... "command not found"... However, I have qdbus-qt5 .
But if I try to run the command with it, it fails:

qdbus-qt5 io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection
Service 'io.crow_translate.CrowTranslate' does not exist.

@Shatur
Copy link
Member

Shatur commented Oct 4, 2023

qdbus does not exist... "command not found"... However, I have qdbus-qt5 .

Looks like command is different on your distro.

Service 'io.crow_translate.CrowTranslate' does not exist.

The program should be running.

@GrgMdmn
Copy link

GrgMdmn commented Oct 6, 2023

Too bad... So I am not able to run the shortcuts :(

@Shatur
Copy link
Member

Shatur commented Oct 6, 2023

You just need to open the program first and the global shortcuts will work. But you need to change qdbus to qdbus-qt5 in your desktop file.

@GrgMdmn
Copy link

GrgMdmn commented Oct 6, 2023

I have replaced all the qdbus with qdbus-qt5 inside of my /usr/share/applications/io.crow_translate.CrowTranslate.desktop file, but the shortcuts are still not working.

Here is what I have when I execute io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow

method void io.crow_translate.CrowTranslate.MainWindow.cancelOperation()
method void io.crow_translate.CrowTranslate.MainWindow.clearText()
method void io.crow_translate.CrowTranslate.MainWindow.copyAllTranslationInfo()
method void io.crow_translate.CrowTranslate.MainWindow.copySourceText()
method void io.crow_translate.CrowTranslate.MainWindow.copyTranslatedSelection()
method void io.crow_translate.CrowTranslate.MainWindow.copyTranslation()
method void io.crow_translate.CrowTranslate.MainWindow.delayedRecognizeScreenArea()
method void io.crow_translate.CrowTranslate.MainWindow.delayedTranslateScreenArea()
method void io.crow_translate.CrowTranslate.MainWindow.open()
method void io.crow_translate.CrowTranslate.MainWindow.openSettings()
method void io.crow_translate.CrowTranslate.MainWindow.playPauseSpeaking()
method void io.crow_translate.CrowTranslate.MainWindow.quit()
method void io.crow_translate.CrowTranslate.MainWindow.recognizeScreenArea()
method void io.crow_translate.CrowTranslate.MainWindow.setAutoTranslateEnabled(bool enabled)
method void io.crow_translate.CrowTranslate.MainWindow.speakSelection()
method void io.crow_translate.CrowTranslate.MainWindow.speakTranslatedSelection()
method void io.crow_translate.CrowTranslate.MainWindow.stopSpeaking()
method void io.crow_translate.CrowTranslate.MainWindow.swapLanguages()
method void io.crow_translate.CrowTranslate.MainWindow.translateScreenArea()
method void io.crow_translate.CrowTranslate.MainWindow.translateSelection()
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties)
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()

@Shatur
Copy link
Member

Shatur commented Oct 6, 2023

Here is what I have when I execute io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow

You missing the last argument. It should be the name of the listed function. Try to add openSettings.

@GrgMdmn
Copy link

GrgMdmn commented Oct 6, 2023

Oh sorry, I forgot the last argument. When I do this command ligne with openSettings, the setting window of the app is opening. In "shortcuts", still have the "Global" section and all shortcuts it contains in grey.

@Shatur
Copy link
Member

Shatur commented Oct 6, 2023

When I do this command ligne with openSettings, the setting window of the app is opening. In "shortcuts"

Then it's working. Bind shortcuts in KDE settings.

still have the "Global" section and all shortcuts it contains in grey.

This is expected. Wayland doesn't support global shortcuts provided by apps.

@GrgMdmn
Copy link

GrgMdmn commented Oct 6, 2023

Oh ok, I understand, so I will never be able to use the global shortcuts :(

@GrgMdmn
Copy link

GrgMdmn commented Oct 6, 2023

According to this article, KDE Plasma + Wayland is supporting the global shortcuts since the start of the year :
https://www.phoronix.com/news/KDE-Plasma-5.27-Released

The version I have is 5.27.8 so it should work

@Shatur
Copy link
Member

Shatur commented Oct 6, 2023

According to this article, KDE Plasma + Wayland is supporting the global shortcuts since the start of the year :

You don't understand me. Global shortcuts are supported inside the KDE settings. So you need to setup bindings inside them, not inside the app. Apps can't register global shortcuts themselves under Wayland, it's not supported by the protocol.

@GrgMdmn
Copy link

GrgMdmn commented Oct 6, 2023

Oh I did not understand, indeed, and I am sorry for it. The problem is I have added Crow Translate shortcuts in my kde manager ("Raccourcis" = "Shortcuts" in french)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants