Giter Site home page Giter Site logo

Comments (8)

jschwerdlin avatar jschwerdlin commented on September 12, 2024

FYI - I was able to hack something together by editing inputhandler.py, but it is VERY specialized to the RPi official 7" 800x480 screen with exactly 4 streams being shown. I only got the double click part working and it can be a bit flakey

Basically, in your event loop I added listening for BTN_TOUCH and EV_ABS. Any time I get a new position with ABS_X or ABS_Y I store it off.

I check for two clicks (BTN_TOUCH) events within 500ms of each other to declare a double click. If so and if we're already full screen, I inject a "0" keypress events into your queue to go back to the grid. If we're already in a grid, I inject a 1-4 keypress based on dividing the screen into quadrants and the most recent position reading to full screen the right stream.

It can be a bit flakey on the injection for some reason. It always detects the double click, but it seems that the event doesn't always cause an action to take place.

So, like I said, very specialized to that screen only (not a general screen and not a mouse) and to a 2x2 setup, but it could definitely be generalized. And maybe there is a more efficient way to trigger the events than injecting a fake keypress into the queue

from camplayer.

raspicamplayer avatar raspicamplayer commented on September 12, 2024

@jschwerdlin Thanks for sharing, I may implement something similar for V2.

from camplayer.

jschwerdlin avatar jschwerdlin commented on September 12, 2024

FYI - I did fork your code and have committed into my fork so you can see the mods (I didn't do a pull request though). I fixed the flakey event injection and also was able to add swipe left/right support to change pages.

from camplayer.

cybermaus avatar cybermaus commented on September 12, 2024

@raspicamplayer If you do get round to implementing such. I would suggest a mouse driver. My guess is that would also work for the touch screen, and it would work for normal monitors too, a cheap (wireless) mouse mouse is easier/cheaper/smaller to have nearby each monitor then a keyboard.

I am trying to figure out myself how to do this, but I am a bit of a noob in python. But I did get one fix/PR already, so who knows.

from camplayer.

cybermaus avatar cybermaus commented on September 12, 2024

I made a PR with a mouse gesture driver. #49

Somewhat similar to above, contained in InputHandler and injecting keystrokes. But using relative instead of absolute positioning. It should work for all grids and screen sizes.

from camplayer.

OtherwisePrickly avatar OtherwisePrickly commented on September 12, 2024

@jschwerdlin I've just used your fork and it works great on a 1600x1200 touchscreen. @raspicamplayer thanks for making this great software.

from camplayer.

jschwerdlin avatar jschwerdlin commented on September 12, 2024

@Wilksj01 Glad you found it helpful. I'm guessing you had to make some mods though since the coordinate division is extremely tied to the 800x480 Pi screen, though I think it would be a really simple mod to work on a larger screen

from camplayer.

OtherwisePrickly avatar OtherwisePrickly commented on September 12, 2024

@jschwerdlin I just changed the lines where you listed the rules for upper left lower left etc with my resolution i.e. 800 for x rather than 400.

from camplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.