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
phrases and scripts inject messed up text #858
Comments
@jhueffelmann welcome to the AutoKey community! Although "messed up" probably isn't the best description of the problem you're experiencing, the most likely problem is that you are using Wayland which is the new default window server in Ubuntu 22.04 and newer. You an verify this by opening a terminal and typing
If it says anything other than If it says From your trace, it appears that you typed When you get a chance, you should upgrade to 0.96.0, our current release to get a lot of bug fixes and a few enhancements. Notably, that Release unlocked lock exception (which doesn't cause any actual problems) will go away along with some of the annoying startup messages in trace logs. Follow these instructions. |
This might be one of those situations where the Function to Type Text Slowly is needed, and Skype might need to be added to the list of programs that are known to have trouble receiving pasted text correctly. |
@Elliria We need confirmation from more than one source (or from a trusted source such as one of us) before adding a new app to the bad boys list. I gave up on Skype after MS bought it and made things more complicated, so I don't have it installed. |
Okay. No worries. I don't use it either because I don't agree with its terms of use, so I can't test it either. |
okay, sorry not to mention i am using X11. i didnt have in mind it could depend on a single receiving applcation but youre absolutely right. testing the same in another application then skype was working perfectly. |
@jhueffelmann Always try to paste text from the clipboard instead of "typing" it. Most applications can deal with that successfully (and it avoids other problems). You only need to "type" with the keyboard module when you are sending "active" key that have immediate effects like moving the cursor. See our wiki for much more detail on this. |
That's good to know @jhueffelmann. If pasting from the clipboard doesn't work, you might want to try the Function to Type Text Slowly, since that works in Firefox and LibreOffice, which are two other programs that are known to do this sort of thing. |
just fyi: it seems current skype for linux has a bug regarding keyboard entry anyways, i have to restart sometimes cause the manual input gets corrupted in a way very similiar to the above |
While Skype is (last I looked) a very popular application (so we should be concerned if AutoKey doesn't play nicely with it), there are many other great alternatives to it (if you can get the other party to use one of them). I'm playing around with keet. Seems pretty nice, but I don't have anyone else to "call" with it. |
We use Mumble. It's free and open source and is in the Ubuntu repositories by default. I hadn't heard of Keet before, but will keep an eye on it to see if it gets included in the Ubuntu repositories at some point. |
We use it with gaming friends. My son is more of a gamer than I am, but I occasionally join in. The conversations on Mumble can be about anything and not just the games, although it can be interesting to listen in on the fast-paced ("Oh my God," or, "Yes!" or, "No!" or, "Good job!" or, "Get him! Get him! Get him!", etc.) goings-on of a game, too. |
I love what Mumble did with those pages you linked, @josephj11. They will be used as role-models for the changes that will be happening to the CONTRIBUTORS.rst file and some of the wiki pages. I added the two links to my ToDo list as references for when that job gets underway. |
Further clarification of the above bug. But when using LibreOffice Writer... The keyed shortcut is not removed, and the replacement word is not completed. Definitely an issue with the output arriving at the destination program too soon. BdH |
@BaDaHe I'm not sure if we can fix this. I believe it's caused by the keyboard module (which we didn't write). The first thing to try is always to select the Paste using Ctrl+V option for your phrases. That fixes most problems and avoids a number of others. If that doesn't work, recode one of your phrases as a script using the type_slow function from our wiki. Try the simple version first (the first one). If you are still having problems, then report back here or on Gitter with the details of what you tried and we'll try to find another solution. We are also testing a new I/O interface for use with Wayland. It hasn't been tested enough yet to know how it works on various edge cases. |
Well, that is not good enough josephj11, I want my money back. It never was an end of the world problem, so your workaround was an easy fix. I changed what had been a PHRASE to a SCRIPT. I used this script coding:
And in my case this now works perfectly in both a text editor and LibreOffice Writer. I started with this script:
But found that the time.sleep(0.1) instruction was not required. Other computers may required this extra line of coding. Thanks for the very prompt response from the other side of the world. BdH |
@BaDaHe Glad it works. Keep in mind that the clipboard API calls are asynchronous. They return successfully immediately even though they have started another thread to do the operation. So, as the load on your system changes they might not complete before you try to use the result. BTW, markdown ate your |
I'm glad it's working now, @BaDaHe. Keep the |
Good advice Elliria
The time.sleep command was still there as a comment in my coding, so I removed the # in each case to restore them as commands. Even at age 77 I can still spare that much time whenever I use them!
And nicely done on restoring my eaten code josephj11 thanks.
My excuses the goof are: I had never posted before, and it was waaay past my bedtime!
BdH
NSW Australia
Sun 4-Jun-23 11:37
…---- On Sun, 04 Jun 2023 05:36:32 +1000 Elliria ***@***.***> wrote ---
I'm glad it's working now, https://github.com/BaDaHe. Keep the time.sleep(0.1) command in mind just in case, though, for the future. You may either run into a LibreOffice file that misbehaves and requires it or some other circumstance will interfere and make it necessary. We're not fully sure where the snag is, but it's a known issue and we all just have to remain vigilant until it can be figured out. Once we're all using Wayland, this may end up no longer being an issue, but only time will tell.
—
Reply to this email directly, #858 (comment), or https://github.com/notifications/unsubscribe-auth/AT64OR3UB4LO3TDGAHAZJUTXJOG4BANCNFSM6AAAAAAX5VB5PA.
You are receiving this because you were mentioned.
|
You could leave it commented out, @BaDaHe, and only enable it if it's needed, but you're right that it makes such a small difference that it doesn't end up being an imposition if it's left in. |
AutoKey is a Xorg application and will not function in a Wayland session. Do you use Xorg (X11) or Wayland?
Xorg
Has this issue already been reported?
Is this a question rather than an issue?
What type of issue is this?
Bug
Choose one or more terms that describe this issue:
Other terms that describe this issue if not provided above:
No response
Which Linux distribution did you use?
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Which AutoKey GUI did you use?
GTK
Which AutoKey version did you use?
autokey-gtk 0.95.10-2
How did you install AutoKey?
from apt repo
Can you briefly describe the issue?
all of scripts or snippets get messed up on insertion since one or two weeks.
Can the issue be reproduced?
Always
What are the steps to reproduce the issue?
Script triggers on abbreviation tmv and space:
keyboard.send_keys("Gib mir bitte Teamviewer ID und Password (als TEXT!)\n")
What should have happened?
should output:
Gib mir bitte Teamviewer ID und Password (als TEXT!)
What actually happened?
Gibt em iTre beirt Iamd PvasiewD unsword (als TEXT!)
Do you have screenshots?
No response
Can you provide the output of the AutoKey command?
Anything else?
this happens similiar on everything since one or two weeks even simple snippets get messed up
on phrases the bug appears to but only on the keyboard method though when traced i also can see the lock_release error
The text was updated successfully, but these errors were encountered: