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

Add support for mouse input #125

Merged
merged 23 commits into from Aug 27, 2020
Merged

Add support for mouse input #125

merged 23 commits into from Aug 27, 2020

Conversation

mtlynch
Copy link
Collaborator

@mtlynch mtlynch commented Aug 11, 2020

Fixes #40

@mtlynch
Copy link
Collaborator Author

mtlynch commented Aug 11, 2020

Update: August 26th

Basic mouse functionality is now working. The code still needs a lot of cleaning, but we're pretty close.

tinypilot-mouse

If you'd like to test out the early version:

export TINYPILOT_INSTALL_VARS="tinypilot_repo_branch=mouse"
curl \
  --silent \
  --show-error \
  https://raw.githubusercontent.com/mtlynch/tinypilot/master/quick-install | \
    bash -

Previous

This is a very early piece of the work at this point. If you'd like to follow along, you can run the update script from the main repo (it will update your systemd services to point to the new USB init script) and then git checkout this repo from /opt/tinypilot and reboot again. When you boot, you'll be able to try this:

echo -ne "\x00\x00\x0a\x00\x00" > /dev/hidg1
echo -ne "\x00\xca\x00\x00\x00" > /dev/hidg1

Which should make the mouse move a little on the target computer.

@mtlynch mtlynch force-pushed the mouse branch 3 times, most recently from a933109 to 3fb63a3 Compare August 24, 2020 21:57
mtlynch added a commit that referenced this pull request Aug 25, 2020
The init script will eventually support more than one USB gadget function, so this makes the keyboard function explicit as its own function.

Related: #125
mtlynch added a commit that referenced this pull request Aug 25, 2020
The init script will eventually support more than one USB gadget function, so this makes the keyboard function explicit as its own function.

Related: #125
@mtlynch mtlynch force-pushed the mouse branch 8 times, most recently from 40d2775 to b22e7da Compare August 27, 2020 13:01
@mtlynch mtlynch marked this pull request as ready for review August 27, 2020 18:31
@mtlynch mtlynch merged commit ea853b5 into master Aug 27, 2020
mtlynch added a commit that referenced this pull request Sep 22, 2020
The init script will eventually support more than one USB gadget function, so this makes the keyboard function explicit as its own function.

Related: #125
mtlynch added a commit that referenced this pull request 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>
@mtlynch mtlynch deleted the mouse branch March 20, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support mouse input
2 participants