-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
[Linux] Application does not get triggered when hot-key is pressed #93
Comments
Hi! Thanks for reaching out. @momokrono , would it be possible for you to take a look here? |
Hi! So, to debug your problem, I would start by logging into an Xorg session, check if the app works there and then try to make it work in wayland. To login into an Xorg session you should select something like Gnome legacy or Gnome on X or anything along this line in your login manager. |
You are spot on. Issue is with Wayland. Switched to Xorg and it has been working fine. Maybe a note in README might help other users. |
Well, glad to have "solved" your issue ^^" As a note, in theory if you run a wayland session, all apps running via xwayland (stuff like IDEs, discord, slack and so on) will work, since the apps run inside an Xorg server and so global hotkeys will trigger correctly, but only inside those apps. KDE Plasma 6 has released an initial support for global hotkeys in wayland not long ago, if you need wayland (for stuff like screen tearing, HDR etc) you can try it. And yes, the README is outdated and needs some updated info, I'll add these things as soon as I can. Thank you for pointing this out. |
@momokrono, I've managed to get the app working on Wayland, albeit with a generous interpretation of that term, using KDE Plasma 6.2.5 and the global hotkeys. In contrast, when running on X11 (using xorg), I can see AI options available. However, on Wayland, all I see is a text box even when a paragraph is selected, the options in the highlighted red box do not appear. |
Hi @CsBigDataHub . Internally, it emulates a ctrl+c and then tries to read the clipboard to get a hold of the selected text (and also does this without messing with your existing clipboard content by saving & putting that back in milliseconds). However, it looks like Wayland isn’t allowing that to work. Welp :/ |
Hello @CsBigDataHub if you run the app from the terminal, when you spawn the window after selecting some text you should see some logs with the backup of the clipboard and the text copied. Do you see any errors? Is the clipboard accessed correctly? Does the program complain about missing packages? For example, on a fresh arch installation, I had to install Reopening for visibility |
I debugged this application this morning, looks like This is the DEBUG log -
As you can see, no text is being selected. Looks like Here are some references - LOUDO56/PyMacroRecord#61 I tried to use |
Hello @momokrono and @theJayTea, I have identified a potential workaround for the issue on I am now investigating whether a similar approach can be applied to native applications. I attempted to launch |
I honestly have no clue why it's not working properly, and right now I'm installing Tumbleweed inside a VM to play with it and see if I can help you solve this. I know flatpacks run sandboxed but I would have never guessed even emulating ctrl+c would be troublesome. I've read online some users suggest adding yourself to the Also, from the logs you provided the app did in fact copy the clipboard:
so, the app is copying something and this should spawn the popup with the different options. If it doesn't, then there's another bug I should investigate. |
Update: This is very likely a problem with pynput I need to investigate/fix. I will probably need to switch to python-uinput to have Wayland working correctly, but this will require some refactoring. For now, Xorg seems to be the only viable session to correctly use the app. |
might not be the case. I have a clipboard history enabled and I am using
Yes when |
As a summary: Currently, Writing Tools only works on Wayland if you: This is due to Wayland's security architecture — non-active windows can't intercept hotkeys. In the future, we could look into implementing KDE's global shortcuts API so things work smoothly on Wayland with KDE. |
I'm curious — @momokrono @CsBigDataHub , if we're able to compile Writing Tools into a Flatpak, and then turn off Wayland for it with Flatseal, would things magically work haha? |
Only one way to find out :). But I want to point out that, compiling the app and using it have been finicky. So I am running the app with |
Hello,
I was able to build the application but I am not able to trigger it even though I can see the application running on task bar.
I tried multiple combinations without success, here are the combinations I tried to set in application settings -
Information:
The text was updated successfully, but these errors were encountered: