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

Custom shorthands using symbols fail if typed too quickly #69

Closed
pokir opened this issue Oct 1, 2022 · 3 comments
Closed

Custom shorthands using symbols fail if typed too quickly #69

pokir opened this issue Oct 1, 2022 · 3 comments

Comments

@pokir
Copy link
Contributor

pokir commented Oct 1, 2022

Bug description:

  • Make a custom shorthand with a symbol such as *:\cdot ;
  • Type * followed by a space quickly in a latex block
  • The * doesn't turn into \cdot

This doesn't seem to happen with letters.

Quick Latex for Obsidian version 2.4.0

@joeyuping
Copy link
Owner

joeyuping commented Oct 1, 2022

Hi @pokir !

Thank you for bringing this up. After testing, the reason may be because the custom shorthand function is triggered by "space". When using a symbol as shorthand, specifically symbols that requires pressing the "shift" key, then keying "too fast" could result in user pressing "space" before the "shift" has been released, which cause the plugin to register a "shift-space" input and so do not trigger the custom shorthand function. Please kindly see if this is the case on your side as well. If that is true, I see if I can allow the function to fire also in the case of shift space.

@pokir
Copy link
Contributor Author

pokir commented Oct 1, 2022

@joeyuping

That is the case on my side as well.
Is there a way to add a second shorthand such as "*<shift>:\cdot "?

@joeyuping
Copy link
Owner

Hi! @pokir

Really sorry for the very late update!
I have added that shift-space would trigger custom shorthand as well. Hope this works for your case too :)

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

2 participants