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
abbreviation not removed #434
Comments
I apologize for not having expressed myself clearly in the note at the end of my post. This note should be: When writing 'My name is na[F7] this results
i.e. autokey works correctly within Firefox, not correctly within kate. Arno |
I'm using 0.95.10 on kubuntu 18.0 I checked the release notes for 0.95.10 and it doesn't look like anything that might affect this issue was changed. Maybe this is just a misunderstanding. When a phrase (or script) has both a trigger abbreviation and a hotkey defined, you use one or the other - not both at the same time. When you typed your trigger abbreviation, you "stopped" before typing a non-word character, so there was nothing for AutoKey to do yet. Then, you pressed F7 which triggered your phrase correctly. The trigger abbreviation was never seen as such by AutoKey because it was not immediately followed by a non-word character and so was treated as normal text. I was able to duplicate this behavior, but that is how it's supposed to work and not a bug. If I have misunderstood something, let me know. |
Thank you for your reply.
This gives me hope that it will work with me, too.
I am afraid that this is on my side not misunderstanding, but not understanding.
I do not know what the difference between trigger and hotkey is. Simply I know what I want:
So I would be grateful to get from you hints on how to configure
to get this result. Probably I have to be a bit ashamed to ask these questions. But I always think: 'Better ask dumb questions than staying dumb' Arno |
A trigger abbreviation would be configuring a phrase or script to run when you type something like "na". The default is for AutoKey to wait for the next character typed to be a non-word character like punctuation or white space. So, e.g., if you type "na " it would activate, but if you type "name", it would not do anything. When you define a phrase or script in the AutoKey main window, you can tell it to trigger when typed as part of word or to trigger immediately without waiting for a non-word character to be typed. You can also tell it to leave the trigger abbreviation in the text or to erase it. There are a few other options as well. If you configure a hotkey for a phrase or script, then what you typed before pressing the hotkey doesn't matter. As soon as you press the hotkey (such as F7), the phrase or script will run. So the two invocation methods are conceptually separate. They don't work together. One or the other starts the phrase or script. If you are running a script, it can subsequently do whatever you are skilled enough to make it do, but that is conceptually independent of how it was invoked. As you learn more about AutoKey and have questions or issues, please join us on our support list where more help is available. We want to reserve GitHub issues for actual bug reports and feature requests. If you're not sure, start out on our list and if it really ends up being a bug or feature request, then open an issue here. If you really want F7 to do nothing unless the last two characters typed (or just to the left of the current text position) are "na", you can code that in a script, but it will require fooling around with selecting those characters, copying them to the clipboard, loading them into a variable which you can then test to see if it is "na". While this is certainly not "rocket science," it should probably not be attempted until you have successfully written a few much simpler scripts and are comfortable with how the basic features of AutoKey work. As a script gets more involved and has more steps, it's also important to add more error checking to the code. Otherwise, once a script goes off the rails, it will keep on running blindly until it does something illegal and dies or potentially does a bunch of unintended actions with unpredictable consequences. I have one such script I use (and accidentally misuse) regularly. When I run it in the wrong context, I just have to sit there and watch it screw up my screen until it's done. You want to avoid this if possible. |
Classification:
Bug
Reproducibility:
Always
Version
AutoKey version: 0.95.9
Used GUI : Qt
Installed via: (PPA, pip3, …). pip3
Linux Distribution: opensuse 15.2
Summary
The abbreviation is not removed even though it is configured this way.
Steps to Reproduce (if applicable)
phrase = Albrecht Mehl
abbreviation = na
hotkey = f7
trigger on all non-word
remove typed abbreviation
My name is na [and the hotkey F7 behind na. This is not shown as autokey triggers, see note below]
Expected Results
My name is Albrecht Mehl
Actual Results
My name is naAlbrecht Mehl
Important note: this bug happens when writing within the editor kate. It does not happen here when writing this issue,
i.e. within the window '...autokey/issues/new', i.e. within the browser FireFox.
Arno
The text was updated successfully, but these errors were encountered: