Monkey see, monkey do
msmd lets you draw a rectangle over text on a macOS screen, recognizes
that region with Apple's built-in Vision framework, and emits the recognized
characters as keyboard events. An amber border remains around the capture region
while OCR and typing are active.
The first release targets macOS. Capture, OCR, and keyboard output are separate interfaces so Linux and Windows adapters can be added without changing the text tracking or command-line flow.
Use this only on sites and accounts where automation is permitted. Automated results are not meaningful typing scores and may violate a site's rules.
Install with uv
Install uv and make sure your Python build has Tk support. Then let uv create and synchronize the managed project environment:
uv sync
There is no environment activation step. Run commands through uv run so uv
uses the locked project environment.
On first use, macOS will ask for two permissions for your terminal or Python:
- Screen & System Audio Recording, so the selected pixels can be captured.
- Accessibility, so keyboard events can be sent to the browser.
Enable them under System Settings → Privacy & Security, then quit and relaunch the terminal if macOS does not apply the permission immediately.
Run
Start with a dry run to verify OCR without typing:
uv run msmd --dry-run
Then run a single capture:
uv run msmd
The interaction is:
- Drag a rectangle tightly around the typing-test text.
- Press Enter to confirm it, or Esc to cancel.
- During the three-second countdown, click the browser's typing area.
- Keep the target field focused while the recognized characters are emitted.
For a test whose viewport changes or scrolls, use experimental continuous mode:
uv run msmd --continuous --typing-delay 0.01
Stop continuous mode with Ctrl+C in the launching terminal. The tracker uses exact overlap between consecutive OCR frames and waits for two matching frames before accepting a completely replaced viewport. This reduces duplicate typing, but OCR mistakes or animated layouts can still produce incorrect input.
For a typing test with a fixed time limit, --duration implies continuous mode
and stops automatically after the requested number of seconds. The timer starts
after the focus countdown:
uv run msmd --duration 30
uv run msmd --duration 60 --typing-delay 0.01
Useful options:
--countdown SECONDS Time available to focus the browser
--typing-delay SECONDS Delay after each generated character
--scan-interval SECONDS Delay between continuous OCR frames
--duration SECONDS Stop continuous OCR after this many seconds
--language LANGUAGE Vision language, such as en-US or de-DE
Current limitations
- Region selection currently targets the primary display.
- OCR quality depends on contrast, font size, animation, and the selected bounds.
- Unicode events work for ordinary typing-test text, but a site that requires physical key codes may need a keyboard-layout-aware writer later.
- Continuous mode is intentionally conservative but cannot guarantee that noisy OCR will never retype text.
Development
uv sync
uv run pytest
Platform-neutral behavior lives in core.py; macOS-specific screenshot, Vision,
and keyboard implementations live in platforms/macos.py. A future Linux adapter
can use X11/Wayland capture plus Tesseract, while Windows can use Windows Graphics
Capture plus Windows OCR without changing the rest of the application.
Metadata
Release files for msmd 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| msmd-0.1.0.tar.gz | 14.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| msmd-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / msmd-0.1.0.tar.gz
| Download URL | msmd-0.1.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1aadfe57802940e39ca96fda0120cf9e14be0e3df7020c142d7ea5970806ca53
|
|
BLAKE2b-256 checksum How to use checksums |
5e83c45afd9e2fdbe161dffde56143729c62261c752a3e6d8534cfa7844b53a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / msmd-0.1.0-py3-none-any.whl
| Download URL | msmd-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b278774916f62c16216c86546383543a3acdda31fc4a7fe0438a2ae2cee89fb2
|
|
BLAKE2b-256 checksum How to use checksums |
6555d4dff757f7cbbf6e4ffcd98ee53e096afaad27688b64cec8ff7a012ddf18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for msmd 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.