jahnf / Projecteur

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

[WIP] Process hid read events #136

Closed mayanksuman closed 3 years ago

mayanksuman commented 3 years ago

Processing HID read events from device will help in implementing next and back hold events (#71, #85) and battery status of spotlight device. This pull request uses the code from pull request #135 for implementing read and write notifier on Hidraw device.

Code in this PR can configure the Spotlight device to send next and back hold event (hence, fixes #71) and uses the hold events to move cursor on screen (as demo) but connecting it to scroll event (#85) is remaining.

This pull request is for review and suggestion purpose currently.

Remaining work:

  1. Add two default rows in Input Mapper widget for Next hold and Back Hold.
  2. Add a category to Input Mapper Actions having two values: General and Repeated. Currently available actions are all of general category as repeated calling is not required to complete them. However, 'Repeated' actions (like scrolling, moving mouse, change volume; See #14 ) etc. require repeated calls.
  3. When a button is on hold press, general actions will be called only once, however, repeated actions will called till the button is on hold. Repeated actions will only be available for Next hold and Back hold inputs.
mayanksuman commented 3 years ago

I am closing this PR. All the remaining work (in this PR) is completed and submitted as PR #143 .

@jahnf , you can review new PR.