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: emulate keyboard keypress #58

Closed rkerschn closed 4 years ago

rkerschn commented 4 years ago

Dear Jahn, first of all, I found your project to be very useful to be able to use the Logitech Spotlight on Linux. I do use Fedora on my own.

Have you heard of "Impressive!" I present my slideshows using "Impressive!". It presents PDF slideshows in a great and impressive way. Thus, the name. For example does Impressive support a spotlight like highlighting by itself, as well as zoom, rectangular highlighting or overview. I love it, it is the perfect tool for slideshows. It is great especially when you write your slideshows with LaTeX and the Beamer Class.

To activate the effects of Impressive one uses keypresses like "Return" for the spotlight", "left mouse click" to highlight an area, "Z" to zoom, middle mouse button to show the overview. In the beginning I thought that Logitech Spotlight emulates keyboard keypresses for all buttons, but actually thats not the case, which is a pity. The top button only sends a mouse click.

But there is an issue with impressive and projecteur: the projecteur spotlight effect extremely stucks. So currently it is not really possible to use projecteur in combination with Impressive! So the Logitech Spotlight is degraded to just a forward and backward button connected via bluetooth or USB dongle.

So I thought, why not improve your Projecteur that way to make it a bit more flexible. Instead of using the projecteur effetcts just juse impressive ones but use projecteur to emulate keypresses. So it would be necessary to disable the projecteur spotlight effect.

What is the idea for improvement: The goal would be to detect the number of button presses and emulate keyboard buttons like "Return", "Z" that specific presentation tools use for certain actions, etc. What I have read is that the original Logitech software supports up to for times click of the button.

From my understanding it shouldn't be too difficult to count the numbers of keypresses within a certain amount of time and then send a preconfigured key.

In addition it may be combined with #43 "Remap Buttons"

In addition it would be necessary to add an option to to projecteur config to disable the spotlight effect (or every effect or overlay effect produced by projecteur).

What do you think about the idea? I think it offers many room for flexibility and applicability with almost every presenting tool that way.

Best Regards, Reinhard

jahnf commented 4 years ago

Hi Reinhard, thanks for the input. Custom key-bindings is on the road map (as you mentioned #43 is related to this). There is also a branch that has changes from @mayanksuman that will make it possible (via a virtual device) in the future. During the holidays I will allocate some time to drive development further by merging mayank's changes and prepare support for multiple devices (v0.7: multiple device support), after that custom key bindings will follow (v0.8)

In addition it would be necessary to add an option to to projecteur config to disable the spotlight effect (or every effect or overlay effect produced by projecteur).

I think disabling every effect is already possible, but the overlay window is still there (just completely transparent) - Edit: I don't think disabling the overlay completely will be a default visible option to the user since Projecteur is not a button mapping tool in the first place - But as an advanced command line option or manual option in the settings file that would be possible.

rkerschn commented 4 years ago

What I understood for custom key-bindings is that it only covers the next and previous buttons on the Logitech Spotlight but not the top button which only sends a left mouse button click. The idea would be to count how often the top button was pressed and send a configured emulated keyboard button

So it could be extended to the next and previous button as well. example: one button press NEXT: right key two button presses NEXT: page down key three button presses NEXT: end key

one button press PREV: left key two button presses PREV: page up key three button presses PREV: home key (pos1 key)

one button press TOP BUTTON: return key two button presses TOP BUTTON: shift+return keys three button presses TOP BUTTON: esc key

jahnf commented 4 years ago

Custom key-bindings are on the roadmap for v0.8 (also something like double tap or long press - although 3 consecutive button presses like your suggestion will not be in there, that is just not intuitive in opinion - also in a case where you would use Projecteur only as a button mapper - and that is not the project's first priority)

jahnf commented 4 years ago

This feature, as well as #43 and #68 will be covered in #69

jahnf commented 4 years ago

Closing this issue, button mapping is implemented in the current develop version, see #69 for details.