c3er / mdview

Standalone Markdown viewer
MIT License
84 stars 8 forks source link

Support additional, usual ways to zoom the content #50

Closed ElektroStudios closed 6 months ago

ElektroStudios commented 8 months ago

I just noticed that the hotkey to zoom out it does not recognize the minus key from the numeric pad. Although it works fine for the other minus key.

I'm referring to this code:

Note: the hot key to zoom in, it properly recognizes both "+" keys in the keyboard.

I don't have enough experience with javascript, but I've tried to research a little bit and I think the solution could be to handle the key with id. NumpadSubtract (among with - and Minus to catch also the other minus key) as mentioned here:

Also, to avoid opening a new issue and being annoying, I take the opportunity to suggest to add CONTROL+MOUSE SCROLL BUTTON too. This key combination is available in almost all file viewers and editors, including web-browsers. It would be a tiny Quality of Life improvement.

Thanks for your attention.

c3er commented 8 months ago

Thanks again🙂

I think, this could be implemented by just extending one if:

https://github.com/c3er/mdview/blob/1c2b1c431b8774e980e9197906ffebdd7b565255/app/main.js#L407

Though, I'm not sure about the mouse wheel but this shouldn't be too difficult either.

I'll see that I implement this to the next release together with #48. Pull requests are welcome!

c3er commented 6 months ago

I just released version 3.1.0, containing this feature. Enjoy!

I'm sorry, to not have fixed the table rendering issue yet but you may see that this is not trivially to fix.