Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mouse input #40

Closed
mtlynch opened this issue Jun 26, 2020 · 14 comments · Fixed by #125
Closed

Support mouse input #40

mtlynch opened this issue Jun 26, 2020 · 14 comments · Fixed by #125
Labels
enhancement New feature or request
Milestone

Comments

@mtlynch
Copy link
Contributor

mtlynch commented Jun 26, 2020

Mouse input capturing is doable. We can use a really similar mechanism to what we're already doing to emulate a keyboard:

https://www.raspberrypi.org/forums/viewtopic.php?t=234495

@mtlynch mtlynch added this to the post-launch milestone Jun 26, 2020
@somik123
Copy link

Mouse input capturing is doable. We can use a really similar mechanism to what we're already doing to emulate a keyboard:

https://www.raspberrypi.org/forums/viewtopic.php?t=234495

+1 on this.

Really need mouse support to finish installing a certain OS developed by Microsoft...

@mtlynch mtlynch added the enhancement New feature or request label Jul 27, 2020
@Lotusshaney
Copy link

This would be fantastic !

@thetanil
Copy link

thetanil commented Jul 28, 2020

moved comment to issue 96

@mtlynch
Copy link
Contributor Author

mtlynch commented Jul 28, 2020

@thetanil a separate issue would be great! Can you include the Windows version where you're seeing this?

@somik123
Copy link

somik123 commented Aug 1, 2020

Any plans or timeline on this? Most installers support mouse so it'll make navigation easier.

@mtlynch
Copy link
Contributor Author

mtlynch commented Aug 1, 2020

@somik123 - It's the top feature on my list. I'm aiming to have it working this month. I just need to find some bandwidth for it because a lot of my focus the past week has been helping new users get up and running and shipping out kits.

@Bramzor
Copy link

Bramzor commented Aug 7, 2020

+1

I need the same functionality in the coming weeks. (Do not need keyboard, only the mouse input). Maybe we can create a new branch and work on this together to get the basic functionality working?

mtlynch added a commit that referenced this issue Aug 11, 2020
@peterberbec
Copy link

I, for one, welcome our new TinyPilot overlords.

@ImCoKeMaN
Copy link

Would it be using this? https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event and then if you were to save the previous mouse position, capture new offset and do a diff, that's what the mouse gadget needs as input right?
If you're already past this stage, awesome, but this idea was in my head and wanted to share it if is on the right track.

@mtlynch
Copy link
Contributor Author

mtlynch commented Aug 17, 2020

@ImCoKeMaN - Yep, that's my plan. Thanks for the pointer!

mtlynch added a commit that referenced this issue Aug 18, 2020
mtlynch added a commit that referenced this issue Aug 18, 2020
mtlynch added a commit that referenced this issue Aug 24, 2020
mtlynch added a commit that referenced this issue Aug 25, 2020
mtlynch added a commit that referenced this issue Aug 25, 2020
mtlynch added a commit that referenced this issue Aug 26, 2020
mtlynch added a commit that referenced this issue Aug 26, 2020
mtlynch added a commit that referenced this issue Aug 26, 2020
mtlynch added a commit that referenced this issue Aug 26, 2020
mtlynch added a commit that referenced this issue Aug 27, 2020
mtlynch added a commit that referenced this issue Aug 27, 2020
mtlynch added a commit that referenced this issue Aug 27, 2020
mtlynch added a commit that referenced this issue Aug 27, 2020
* Add support for mouse input

Fixes #40

* Delete redundant comment

* Adding MOUSE_PATH to README

* Adding more implementation pieces to support mouse movement

* Adding more of mouse implementation

* Reduce slashes

* Update cursor and usb gadget init

* Add more mouse implementation

* Movement and clicking work, but need cleanup

* Move mouse HID code

* Delete debug code

* Mouse tweaks (#162)

* Mouse tweaks

* Address formatter feedback

* Off-by-one comments...

* Fix bad merge

* Switching to mouse buttons property

* Disable context menu on remote screen

* Add TODO

* Delete unused global variable

* Clean up mouse code

* Fix mouse event send

* Fix variable names

* Add unit tests

* Add more tests

* Trim unneeded code

Co-authored-by: Sander Kromwijk <s.kromwijk@gmail.com>
@sstur
Copy link

sstur commented Aug 29, 2020

Hey, let me know if you need any support to help write the JS or any web frontend dev for this, I'll be happy to pitch in!

@mtlynch
Copy link
Contributor Author

mtlynch commented Aug 29, 2020

@sstur - Thanks for reaching out! Is there a feature or piece you're interested in taking on? I think contributions work best when you can work on something you see as improving your experience using TinyPilot.

@sstur
Copy link

sstur commented Aug 29, 2020

Right, I was specifically thinking about the mouse support, just if you need anything on the JavaScript UI side to move that feature forward (although I'm happy to tackle any frontend feature). I'm still waiting on my parts that I ordered as soon as I discovered this project, so I'll have a better idea soon of what I'm interested in improving.

I don't mean to hijack this thread for this discussion, this one is already resolved it looks like.\ I'll pick one of the other issues or create one and see where this can be improved. Thanks!

@mtlynch
Copy link
Contributor Author

mtlynch commented Aug 29, 2020

The only big missing feature from mouse behavior I can think of at the moment is scrollwheel movement. That's probably going to be more backend-heavy, but it does involve a bit of frontend.

mtlynch added a commit that referenced this issue Sep 22, 2020
* Add support for mouse input

Fixes #40

* Delete redundant comment

* Adding MOUSE_PATH to README

* Adding more implementation pieces to support mouse movement

* Adding more of mouse implementation

* Reduce slashes

* Update cursor and usb gadget init

* Add more mouse implementation

* Movement and clicking work, but need cleanup

* Move mouse HID code

* Delete debug code

* Mouse tweaks (#162)

* Mouse tweaks

* Address formatter feedback

* Off-by-one comments...

* Fix bad merge

* Switching to mouse buttons property

* Disable context menu on remote screen

* Add TODO

* Delete unused global variable

* Clean up mouse code

* Fix mouse event send

* Fix variable names

* Add unit tests

* Add more tests

* Trim unneeded code

Co-authored-by: Sander Kromwijk <s.kromwijk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants