Skip to content

TinyHand for Windows (Rust) - #19

Draft
MUL7ii wants to merge 28 commits into
nilbuild:mainfrom
MUL7ii:windows-port
Draft

MUL7ii wants to merge 28 commits into
nilbuild:mainfrom
MUL7ii:windows-port

Conversation

@MUL7ii

@MUL7ii MUL7ii commented Nov 8, 2026

Copy link
Copy Markdown

Summary

This adds a Windows version of TinyHand in a new windows/ folder. It is written in Rust and does the same thing as the Mac app: a tiny hand on a stick follows the cursor, a click taps, a drag draws, and a toolbar picks one of the 36 hands or the laser. It uses the same hand images, tap sounds and logo from this repo, so there is no duplicated art.

The Mac code is not touched. Outside windows/ the PR changes only:

  • README.md: Windows line, badge, and a Windows column in the Use table.
  • .github/workflows/build.yml: a Windows build job next to the Mac one.
  • .github/workflows/release-windows.yml: builds and publishes a zip when a windows-v* tag is pushed. It does not match the Mac v* tags.

Why Rust

The Windows version needs a low-level mouse hook, a transparent click-through overlay that redraws in step with the display, and very little CPU when idle. Rust gives that with no runtime to install and a small, fast exe. The Win32 API is used through the windows crate, drawing is done with tiny-skia, and sound goes through WASAPI. The settings window is a WebView2 page (via wry) that is created when you open Settings and destroyed when you close it, so it costs nothing while closed.

What is in it

  • Pointer: the 36 hands and the laser, aiming, press animation and shadow, ported from the Mac app's geometry.
  • Drawing: strokes that fade, with a choice of ink color.
  • Toolbar: pick the hand, toggle click through and the tap sound, exit. It appears near the bottom of the screen and follows you across monitors, scaled for each monitor's display scaling.
  • Tap sounds: the same six sounds, played with WASAPI on their own thread.
  • Tray icon and menu, with the official logo as the app and tray icon.
  • Settings window: click through, the hold-to-click key, pointer size, shadow, ink fade and color, sounds, and which hands show on the toolbar (add, remove, reorder).
  • Windows-specific handling: menus, the hidden-icons flyout, Start and the taskbar still work while the pointer is on, and the pointer steps aside while Snipping Tool or the Win+Shift+S overlay has focus.
  • A Windows-only click through mode (Ctrl+Alt+C): plain clicks reach the app under the pointer and the hand still taps, while a drag draws and never reaches the app, so it cannot select text underneath.

windows/README.md has the build steps, how the code is laid out, what differs from the Mac app, and known limits.

Try it

You need Rust (stable) and the MSVC build tools with the Windows SDK.

cd windows
cargo run --release

Press Ctrl+Alt+H, or click the tray icon, to turn the pointer on. A preview build is also available as a pre-release on my fork:
https://github.com/MUL7ii/tinyhand/releases/tag/windows-v0.1.0

Testing

  • Developed and tested on Windows 11.
  • The Windows release workflow ran on windows-latest and passed (build, package, publish).
  • Checked by hand and with scripted tests: tapping and drawing, click through, the hold-to-click key, popups and menus, multi-monitor, per-monitor scaling, settings, and tap sounds.
  • Not tested: Windows 10, and real mixed display scaling (only a simulated second monitor).

Not done yet

  • An installer and auto-update. There is no signing either, so SmartScreen warns on first run.
  • A shortcut recorder, "make your own hand", the toolbar ink color button, opening at login, and the first-run hint.
  • Hand images and sounds are read from an assets/ folder next to the exe (the release zip includes it). Embedding them in the exe is a possible follow-up.

Known limits

  • Windows does not let a program see or block input going to an app running as administrator, so TinyHand cannot draw over or tap such windows.
  • Drawings clear when the cursor moves to another monitor, as on the Mac.

Notes for review

  • About page: it currently says "Unofficial Windows port based on TinyHand for Mac by Kamran Ahmed". Please reword it however you like if this is merged.
  • The Windows build adds a dependency set (258 crates in windows/Cargo.lock, mostly from the web view used for settings). If that is too heavy for this repo, I can move the Windows version to its own repository and link it from the README instead. Happy to do either.
  • I am glad to change names, structure or scope. This is a first version and I would rather get it right with you than guess.

MUL7ii added 28 commits November 8, 2026 20:55
@MUL7ii

MUL7ii commented Nov 9, 2026

Copy link
Copy Markdown
Author

I see #17 is also adding Windows support, opened a few hours before this one. I did not know about it when I started.

They take different approaches. #17 uses Tauri with a shared core crate that could also serve other platforms, plus an installer and a Vietnamese UI. This PR is a single native Rust crate that I have run and tested on Windows 11 (hook, overlay, popups, multi-monitor, display scaling).

@nilbuild, your call: pick one, or I am happy to work with the #17 author to combine them, for example their core and installer with the Windows input and overlay layer from here. I will keep this as a draft until you say which way you prefer.

@MUL7ii MUL7ii mentioned this pull request Nov 9, 2026
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.

1 participant