Devlog #2: Shipping v1.0 of my iPhone Trackpad for Mac!
Hey guys! Welcome to the second devlog for my project 🙌
Time spent: ~6 hours
Stack: Node.js, Socket.io, @nut-tree-fork/nut-js, HTML5 Touch Events
Status: Shipped v1.0 on GitHub!
What I Built for v1.0
- 1-Finger: Smooth mouse cursor movement + tap-to-click.
- 2-Fingers: Page scrolling + Chrome back/forward swipe
-
3-Fingers: Switching desktop spaces (Left/Right) and opening Mission Control (Up/Down) using simulated
Ctrl + Arrowkeys. - Web-First: Runs directly in Safari on iPhone over local Wi-Fi, so no need to install any apps from the App Store!
Challenges
-
Dealing with
robotjsbreaking:
I spent way too much time fighting random build errors withrobotjs. Eventually I gave up on it and switched to@nut-tree-fork/nut-js, which finally let me control the mouse and shortcuts without crashing. -
Messy multi-finger touch :
Trying to make sure the app didn’t accidentally move the mouse while I was trying to scroll or switch desktops was super annoying. I had to lock down the touch coordinates so 3-finger swipes didn’t trigger random clicks. -
Gived up at the handwriting feature:
At first I tried to make a cool handwriting feature on top of the trackpad, but mixing drawing controls with mouse physics was causing way too many overlapping touch bugs. I decided to scrape that out.
What I want to add in v2.0
- 2-finger tap for right-click
- Tap-and-hold to drag and drop stuff
- Phone vibration (haptics) when I click
- Visual ripple effects on screen when touching
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.