jahnf / Projecteur

Linux Desktop Application for the Logitech Spotlight device (and similar devices) - Digital Laser Pointer
MIT License
379 stars 33 forks source link

Feature Request: Add global shortcuts for entering and exiting test mode #100

Closed rombert closed 4 years ago

rombert commented 4 years ago

Is your feature request related to a problem? Please describe. I am testing Projecteur before actually getting a supported presenter device. I noticed the test mode, which looks very good, and it got me thinking.

I no longer make 'in-person' presentations these days, but am scheduled for a couple of virtual ones. For me it would be great if there would be way to enter/exit test mode using global keyboard shortcuts, without the preferences window being shown. Customisable shortcuts would be ideal :-)

Describe the solution you'd like Enter/exit test mode using keyboard shortcuts, without opening the preferences dialog.

Describe alternatives you've considered Buying a supported device. But this solution is less costly.

jahnf commented 4 years ago

Hi Rombert, I see your point. A global shortcut that works consistently across all these desktop environments (GNOME, KDE...) is tricky though. Then also you have wayland and X11. I'll see if it is doable.

In the meantime: you can tell Projecteur to turn on/off the spotlight from the command line: (If you have an instance already running:

projecteur -c spot=on
projecteur -c spot=off

With that you could map a global shortcut in the desktop environment of your choice to a shell script that executes those commands.

rombert commented 4 years ago

@jahnf - your solution works perfectly for me, I did not think to check the CLI arguments.

Feel free to treat this as lower priority, I have a working solution. Thanks!

jahnf commented 4 years ago

After some thought about this, I decided to not implement global shortcuts, since it's Desktop and Window Manager dependent, but instead emphasize more on "scriptability" of Projecteur and mention how to solve global shortcuts in the Documentation / README.

Will keep this issue open until documentation is updated.