joeyuping / quick_latex_obsidian

MIT License
327 stars 21 forks source link

Custom shorthands using symbols fail if typed too quickly #69

Closed pokir closed 1 year ago

pokir commented 1 year ago

Bug description:

This doesn't seem to happen with letters.

Quick Latex for Obsidian version 2.4.0

joeyuping commented 1 year ago

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 commented 1 year ago

@joeyuping

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

joeyuping commented 1 year ago

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 :)