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

Missing/possibly double characters in certain text/search fields #750

Closed
MostHated opened this issue Sep 4, 2021 · 5 comments
Closed

Missing/possibly double characters in certain text/search fields #750

MostHated opened this issue Sep 4, 2021 · 5 comments

Comments

@MostHated
Copy link

Hey there,
I have been having an issue with certain text fields, namely, the github search field. I used to use the app 'Albert' to do my expansion, but I use github search so much that it's issues caused me to look for a new solution simply to help with that.

I am not sure what it was about AutoHotKey on Windows, but I almost never had an issue with it when using it's 'hotstrings', so I am not sure if it's timing or what it is. I really like espanso, so I am hoping that maybe there is something I can tweak to help with this. I tried my best to capture an "in action" example in the clip below.

I don't really know what all can be done about it, I am guessing it is mostly due to the delay in the search box, but it is annoying enough when it happens, and it happens often enough, that I usually just end up typing it all out anyway, because I have to backtrack to fix it half the time. I know for sure it's not espanso's fault, and probably not its job to account for delays in the application you are trying to type to.

I appreciate any suggestions anyone might have. I do try to mitigate it by going to a separate bookmark I have to a dedicated search page, but I only remember to do that every so often.

(Seen here, it doesn't happen all the time, but sometimes there will be multiple first characters, and occasionally something missing from the middle area)
missing

Example expansions:

  - trigger: "la:sh"
    replace: "language:shell"
  - trigger: "la:cs"
    replace: "language:csharp"
  - trigger: "la:da"
    replace: "language:dart"
  - trigger: "la:ps"
    replace: "language:powershell"
  - trigger: "la:py"
    replace: "language:python"
  - trigger: "pu:20"
    replace: "pushed:>2020-01-01"
  - trigger: "cr:20"
    replace: "created:>2020-01-01"
  - trigger: "pu:21"
    replace: "pushed:>2021-01-01"
  - trigger: "cr:21"
    replace: "created:>2021-01-01"
@federico-terzi
Copy link
Collaborator

Hey @MostHated,

I'm sorry you experienced this problem! As you said, this is likely a timing problem. Two possible approaches could be to:

  1. Use force_clipboard: true and see if that helps:
  - trigger: "la:py"
    replace: "language:python"
    force_clipboard: true
  1. Play with backspace_delay and inject_delay in your default.yml file:
backspace_delay: 10
inject_delay: 10

Going as up as 1000. If you see this helps, you might then create an app specific config to set it only for Chrome/Firefox

Cheers :)

@MostHated
Copy link
Author

This is great news, Luckily, I already have a separate config setup specifically for firefox, which is where these expansions live, so that will make it a tad easier. I will give it a try and report back shortly.

@MostHated
Copy link
Author

Hmmm... so, I added the force_clipboard: true option to the triggers, following the replace line as you demonstrated above.

It seems to work much better, in that it is not messing anything up when it enters the text, but, it keeps simply pasting force_clipboard: true as that was the last thing in my clipboard, and it doesn't seem to be picking up the actual replacement text that it should be entering.

I, of course, saved my firefox.yml, did espanso restart, and then gave it a try. Not sure if there is something I am missing? I was supposed to add the force_clipboard line to each entry, it looked like, yeah?

Thanks,
-MH

@federico-terzi federico-terzi reopened this Sep 8, 2021
@federico-terzi
Copy link
Collaborator

I'm sorry about that! What OS are you using? Also, could you please post the output of espanso log here?

@smeech
Copy link
Collaborator

smeech commented Feb 13, 2024

Most of these problems can be resolved by changing the backend: globally or via force_mode: for individual triggers, and occasionally other options. The documentation was recently updated. As this is an old Issue I'll close it for now but will be happy to reopen it if it's still a problem.

@smeech smeech closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants