jeertmans / manim-slides

Tool for live presentations using manim
https://manim-slides.eertmans.be
MIT License
419 stars 46 forks source link

[FEATURE] Ability to control outside of window would be awesome #29

Closed arash-ashra closed 1 year ago

arash-ashra commented 1 year ago

I noticed that it is limiting for me that control keys only work when the presentation window is open. Because I'd like to use OBS to add overlays and have only one monitor, I need to be on the OBS window, but then I can't control the presentation.

So an option for global key bindings would be Awesome.

jeertmans commented 1 year ago

Well that’s not impossible to achieve, but I don’t know how I can make both option available. Because having global key presses recorded means that you can override the behavior of some random application, so caution has to be taken.

I will have a look at it when I have time :)

arash-ashra commented 1 year ago

Yaaay. I can't wait to point at equations by overlaying myself in OBS in realtime :)

btw here's the last video I made with this manim-slides. Thanks! https://youtu.be/bCRnlanHr8s

jeertmans commented 1 year ago

Hey @arashash, small update on your issue / feature request.

After some thoughts, I think having a global keyboard listener is not a good idea, as it will add additional Python dependencies (at least one), and be hard to integrate with the current way key press events are handled.

PR #49 refactors how things are displayed, using now QT5, and you can now --hide-mouse to hide your mouse when hovering on top of your slides. As long as you have focus on either the main window, or the info window, key presses will be registered.

Using myself OBS for recording presentations, I don't feel like not having global key presses in a limitation.

I hope you're not disappointed with this decision, and I will gladly take any feedback!

I am closing this now.

arash-ashra commented 1 year ago

Oh I didn't know the controls work with info window. Thats awesome. Hiding the mouse is great too. Thaanks