blaisewang / img2latex-mathpix

Mathpix has changed their billing policy and no longer has free monthly API requests. This repo is now archived and will not receive any updates for the foreseeable future.
Apache License 2.0
1.39k stars 209 forks source link

[Feature Request] Snip hotkey to automatically send the OCR request #94

Closed fabiosangregorio closed 4 years ago

fabiosangregorio commented 4 years ago

Is your feature request related to a problem? Please describe. Creating the screenshot, switching to the image2Latex app, pressing enter and switching back to the document takes a bit of time. It would be great if a snip hotkey was added, just like in the main Mathpix app.

Describe the solution you'd like It would be great if I could press a hotkey (e.g. alt+shift+s) and a screenshot creator would open, letting me drag the screenshot area just like the default operaing system screenshot taker. Then, the OCR request gets automatically sent, so that after the response I can directly paste the formula in my document, without having to interact with the app directly.

Additional context This already happens in the main mathpix application, and I find it extremely userful and productive.

github-actions[bot] commented 4 years ago

[Auto response] Looks like this is your first issue. I will look into it as soon as possible.

blaisewang commented 4 years ago

I have thought about implementing this feature in the past. After some research, I found that Java programs do not support global monitoring of key events. So, this feature won't be implemented unless the whole app was rewritten in a different language.

blaisewang commented 4 years ago

Maybe a keypress listener writes in C/C++ can send the signal to this app. But I am not familiar with these languages.

fabiosangregorio commented 4 years ago

After a bit of research I found https://github.com/kwhat/jnativehook . Could this be useful?

blaisewang commented 4 years ago

Last time I saw this library, it wasn't updated for quite a long time. But I am glad to know this package is maintaining by someone. I will try this one if I have some time.