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

Trigger word is not removed in Thunderbird #529

Open
Waxwood opened this issue Apr 9, 2021 · 6 comments
Open

Trigger word is not removed in Thunderbird #529

Waxwood opened this issue Apr 9, 2021 · 6 comments
Labels
autokey triggers Issues related to hotkeys, abbreviations, window filters, etc. autokey-gtk phrase expansion Issues related to Phrases

Comments

@Waxwood
Copy link

Waxwood commented Apr 9, 2021

Classification: UI/Usability
Reproducibility: Always
AutoKey version: 0.95.10
Used GUI (Gtk, Qt, or both): GTK
Installed via: AUR
Linux Distribution: Manjaro Linux 21.0

Summary of the problem.
Phrases created in Autokey pastes into the text frame of a new email in Thunderbird, but the abbreviation is not removed. That is to say when I type "comma1" abbreviation, the expanded text pasted into Thunderbird is:
commSeveral mistakes were made using commas:
Review the useof commas here: http://www.grammarbook.com/punctuation/commas.aspsdfsdfsdfsdfsdfsdf

Note that the abbreviation "comma1" was not completely erased, but rather "comm" remains followed by the content of the phrase.
Screenshot- Autokey not working in Thunderbird

Steps to Reproduce:

Create phrases in Autokey. Set TRIGGER as TAB, select remove trigger character. In Thunderbird, select "Write new message" and try using the TRIGGER to expand text into the Thunderbird mail.

Expected behavior: The text should appear and the TRIGGER word removed completely.

Actual Results
The TRIGGER word is only partially removed when the text is automatically pasted.

Screenshot- Autokey not working in Thunderbird 002

Please see screenshots showing how the TRIGGER word is not completely replaced.

@sebastiansam55
Copy link
Contributor

Does thunderbird expand tabs into spaces?

@josephj11
Copy link
Contributor

josephj11 commented Apr 10, 2021

Just tried the GTK front end and it works fine if I use Enter, but leaves the first three characters of my abbreviation if I use tab. Same happens with paste using clipboard or keyboard.

So, we're too fast for Thunderbird - at least when using tab as the delimiter.

You will either have to not use tab as the delimiter or recode the affected phrases as scripts with some delays added.

Another option is to skip using delimiters entirely. I have abbreviations that trigger immediately with trigger phrases like Unsub! . That is extremely unlikely to occur naturally so it's kind of like building the delimiter right into the trigger abbreviation, but !Unsub or anything else "unnatural" would work just as well.

@josephj11 josephj11 added autokey triggers Issues related to hotkeys, abbreviations, window filters, etc. autokey-gtk phrase expansion Issues related to Phrases labels Apr 10, 2021
@Waxwood
Copy link
Author

Waxwood commented Apr 10, 2021

Thank you for your replies.
I will see if I can change the triggers to something else.
The only problem is that I have a lot of entries to change.

I have attached my log in case it is of use.
AutoKey Log for identifying problem.txt

AutoKey is excellent and really a very important tool for Linux users.
It seems to be the only real option for Linux. Thankfully it is also well designed and easy to use. My sincere thanks for creating it and keeping it up-to-date. I would, however, like to see word-wrap in the text window so that long sentences do not extend beyond the confines of the visible window.

@josephj11
Copy link
Contributor

josephj11 commented Apr 10, 2021

AutoKey phrases each consist of two files. For a phrase named myphrase, there will be myphrase.txt which contains the text of the phrase and .myphrase.json which contains all the metadata such as the trigger delimiter. The json file is hidden because it's name starts with a period. That's a Linux thing and the hidden files will be unhidden in 0.96 if and when we manage to release it. The point being that if you are careful, you can easily write a bash script using sed or awk or your favorite tool to mass edit a bunch of the metadata files for you.

Similarly, since myphrase.txt is a plain text file, there is nothing preventing you from creating/editing it directly with the tools of your choice (e.g. a text editor with word wrap.)

If you do modify these files directly, you should close and restart AutoKey before trying to use them. It does try to detect external changes, but it's not perfect.

If any of this leaves backup/work files around, it's a good idea to clean them out when you're done, but AutoKey should ignore them.

If this interests you, come over to Gitter and we can help.

If you mean the panel where you enter the text for the phrase, that sounds like an easy change (but I am not an AutoKey developer.) However, it's an enhancement request and should be filed as a separate issue. It would probably need to be user configurable or at least make clear the difference between wrapped text and multiline text.

@Salvatos
Copy link

Salvatos commented May 6, 2021

This started happening to me recently after messing with input methods — namely, switching from "None" to "IBus" in Mint 20.1 Cinnamon. Two things would happen intermittently, sometimes together:

  1. The first 1 or more characters of the abbreviation would be left behind, e.g. rgds would be expanded to rRegards, or rgRegards,.
  2. In longer replacements, characters would be dropped at random points in the replacement, e.g. This long sentenceis mssing characters for some rason. (This seems to be the case for Waxwood as well.)

So far as I could tell, this was independent of pasting method and trigger character settings. It also happened with very simple replacements, e.g. one word with only regular letters. It also happened in every application, not specifically Thunderbird.

Switching back to "None" as input method seems to have resolved the issue. Hopefully this can help find and fix the root cause. I was hoping to use both Autokey and Ibus-typing-booster, but the latter is causing me grief in too many scenarios so I’ll stick to Autokey for now.

@josephj11
Copy link
Contributor

@Waxwood and @Salvatos - You may want to take a look at #596 which may address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autokey triggers Issues related to hotkeys, abbreviations, window filters, etc. autokey-gtk phrase expansion Issues related to Phrases
Projects
None yet
Development

No branches or pull requests

4 participants