Mouse gesture control#53
Open
cybermaus wants to merge 13 commits intoraspicamplayer:masterfrom
Open
Conversation
I have 10 old DVI monitors that result in tvservice yielding "state 0x6 [DVI CUSTOM RGB full unknown AR], 1440x900 @ 60.00Hz, progressive" which is not properly processed by utils.py. Since tvservice does this for every resolution the monitors support, rather then keep changing the config, I traced the source.
Sidenote: tvservice does normally read and list the monitors mode. Only when asking the active status does it list custom. So the root problem is probably somewhere in tvservice:
pi@raspberrypi:~ $ tvservice --device 2 -s
state 0x6 [DVI CUSTOM RGB full unknown AR], 1440x900 @ 60.00Hz, progressive
pi@raspberrypi:~ $ tvservice --device 2 -m DMT
Group DMT has 16 modes:
mode 4: 640x480 @ 60Hz 4:3, clock:25MHz progressive
mode 5: 640x480 @ 72Hz 4:3, clock:31MHz progressive
mode 6: 640x480 @ 75Hz 4:3, clock:31MHz progressive
mode 8: 800x600 @ 56Hz 4:3, clock:36MHz progressive
mode 9: 800x600 @ 60Hz 4:3, clock:40MHz progressive
mode 10: 800x600 @ 72Hz 4:3, clock:50MHz progressive
mode 11: 800x600 @ 75Hz 4:3, clock:49MHz progressive
mode 16: 1024x768 @ 60Hz 4:3, clock:65MHz progressive
mode 17: 1024x768 @ 70Hz 4:3, clock:75MHz progressive
mode 18: 1024x768 @ 75Hz 4:3, clock:78MHz progressive
mode 21: 1152x864 @ 75Hz 4:3, clock:108MHz progressive
mode 32: 1280x960 @ 60Hz 4:3, clock:108MHz progressive
mode 35: 1280x1024 @ 60Hz 5:4, clock:108MHz progressive
mode 36: 1280x1024 @ 75Hz 5:4, clock:135MHz progressive
(prefer) mode 47: 1440x900 @ 60Hz 16:10, clock:106MHz progressive
mode 48: 1440x900 @ 75Hz 16:10, clock:136MHz progressive
normal left click --> does nothing normal mouse movement --> does nothing while left mouse button down: left, right, up, down --> inserts left, right, up, down keystroke right click --> inserts Q keystroke (quit program) normal right click --> inserts SPACE keystroke (pause/unpause) normal scroll up/down --> inserts 1 or 0 keystroke (zoom/unzoom) Example: to enlarge camera 3, zoom with scroll will, then holding the mouse button down move right 2 times
This reverts commit 1dc83b5.
This reverts commit ffa9901.
This reverts commit 0323aed.
This reverts commit 11ddace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redo after cleaning up my own fork, I messed it up, this should be a clean offer.
Apologies for the mess of retracted PR, I am new to this.
Simple mouse gesture control
A monitoring station can now simply use a mouse as a cheap simple ubiquitous control device, so no keyboard or IR remote needs to be present. The gestures are made so that accidental moving or touching of the mouse will not do anything, or not do anything significant:
Tested with when running from CLI and from GUI desktops. This gesture driver does not need a mouse being maintained by X The mouse will not be visible and there is no need for a absolute mouse position.
-normal left click --> does nothing
-normal mouse movement --> does nothing
-normal right click --> injects SPACE (pause/unpause)
-normal scroll wheel down, up --> injects ENTER, ESC (single/grid view)
The latter two do not require the video stream to be stopped and restarted, so is acceptable if it happens by accidental touch
While left mouse button down:
-move left, right, up, down --> injects LEFT, RIGHT, UP, DOWN keystroke
-right click --> injects B keystroke (blank screen, this is a separate addition in my fork, but does not hurt here)
Special sequence to insert Q (Quit)
I purposely did not assign/use double click, as I presume that would directly zoom to a specific camera, once we also add absolute positioning and a visible mouse.