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

Auto paste is not working properly #2

Open
vpsone opened this issue Jul 3, 2023 · 6 comments
Open

Auto paste is not working properly #2

vpsone opened this issue Jul 3, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@vpsone
Copy link

vpsone commented Jul 3, 2023

Auto paste in not working in Kde neon which is based on ubuntu 22.04.
Here is os info

OS: KDE neon 5.27 x86_64 
Kernel: 5.19.0-46-generic 
DE: Plasma 
WM: KWin

I am previously using x11 emoji picker. For x11 emoji picker auto paste is working fine. But for emoji mart sometime it works and sometime it does not work.

@vemonet
Copy link
Owner

vemonet commented Jul 6, 2023

Thanks for the report @vpsone

I also got some inconsistencies with xdotool, but got it too a state where it works almost everytime on my machine...

I noticed that xdotool sometimes fails to paste if I have not specifically focused a text field, is the auto-paste failing even when a text field is properly selected?

Otherwise it could be that on your machine sometime the window takes too much time to close, and xdotool gets triggered before it has been closed

Something to test that could solve the issue:

  • Use xdotool type emoji instead of xdtool key ctrl+v, that might help with auto-focus of text field?
  • Look into adding a wait before triggering the paste to make sure the window is closed

But since I cannot reproduce the problem myself, it will be hard to test, so I will need you @vpsone :) I'll let you know when I have the time to make the changes, test them, and push a new version, so you can try it and tell me if it is improved

On another note, I have a small question: after xdotool is ran through EmojiMart I lose the emoji that was just selected (either I get the previous item in the clipboard, or clipboard cleared). Are you also having this behavior, or do you have the selected emoji in your clipboard after your emoji get auto-pasted by xdotool?

vemonet added a commit that referenced this issue Jul 6, 2023
@vpsone
Copy link
Author

vpsone commented Jul 6, 2023

I will definitely help to test the new version and I always have selected emoji in my clipboard but it didn't get auto-pasted.

@vemonet vemonet added the bug Something isn't working label Jul 7, 2023
@vpsone
Copy link
Author

vpsone commented Jul 12, 2023

I have tried the current version of the app, and now the auto-paste feature works more often than the previous version, but it is not working perfectly.

@vemonet
Copy link
Owner

vemonet commented Jul 17, 2023

Hi @vpsone , thanks for the feedback!

I have the same behavior too, "60% of the time it works everytime" ...

I wonder if it is just a question of playing with the wait in between hiding the window and running xdotool... Since I just added 50ms of wait, and now it works a bit better... But I am not really keen on adding a lot of wait time, I can already see the window freezing almost half a second when I pick an emoji

There are a lot of pending development that might help us to improve the system though:

I'll try other things out when I have the time and will let you know!

@whot
Copy link

whot commented Jul 18, 2023

accidentally stumbled across this issue:

but Mutter support wayland and x11, so it might also work on x11 (did not dug too much, so not sure at all)

Xwayland as of this PR supports libei and the xdg-desktop-portal, so an unmodified xdotool under Wayland will connect to Xwayland which will then use the portal to get a libei connection from mutter. It will then convert the XTest events to libei events, so xdotool will work unmodified - at least for pointer/keyboard events.

@b0bh3
Copy link

b0bh3 commented Oct 23, 2023

I am not sure if it is related to the app or IntelliJ, but for me, the automatically pasted emojis appear as "weird" characters, but when I then manually paste the emoji, it is inserted as expected 🤷‍♂️
For other apps, e.g., Sublime, Text editor, browsers, it's working just fine 🥇

👾 烙🤖 👍
image

OS: Ubuntu 22.04.3 LTS x86_64 
Kernel: 6.2.0-33-generic
DE: Gnome 42.9 
WM: X11

IntelliJ IDEA 2023.2.3 (Ultimate Edition)
Build #IU-232.10072.27, built on October 11, 2023

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

No branches or pull requests

4 participants