v0.1.0-beta.1 · Windows
Hold a key.
Get the accents.
macOS has done this since 2011: hold a and a little menu of à á â ä appears. Windows never picked it up. This is that behaviour, rebuilt — free, open source, and about 400 KB.
Windows 10 and 11, 64-bit. Linux is designed but not yet built — that one needs you.
Try it — hold the key
caf
What it does
One setting, two behaviours
On macOS the whole feature is a single boolean called
ApplePressAndHoldEnabled. Leave it on and holding a key opens the
accent menu. Turn it off and the key repeats, which is what people who write
code or play games usually want. There is no third option, and there does not
need to be.
pressandhold recreates both, and fixes the part everyone complains about: on macOS you must log out or restart the application for a change to apply. Here it takes effect within a second.
| On macOS | Here |
|---|---|
defaults read NSGlobalDomain ApplePressAndHoldEnabled | pah get |
defaults write … -bool false | pah set false |
defaults delete … | pah reset |
| Log out and back in | Nothing — it is already applied |
Setup
Installing on Windows
Two routes. The download takes a minute; building it yourself takes about ninety seconds and means you never have to take anyone's word for what the binary does. For a program that reads every keystroke, the second is worth considering.
-
Get the binaries
Download: grab
pressandhold-windows-x64.zipfrom the latest release and unzip it somewhere permanent —C:\Tools\pressandholdis fine. Verify the checksum againstSHA256SUMS.txtin the same release.Or build it: install rustup, then:
git clone https://github.com/__REPO__ cd pressandhold cargo build --release # binaries land in target\release\ -
Expect a SmartScreen warning
The builds are not code-signed yet, and Windows is right to be suspicious of an unsigned program that hooks the keyboard. If you downloaded rather than built, this is the moment to decide whether you trust it — the security section is there to help you decide, not to talk you past it.
-
Run the daemon
Double-click
pressandhold.exe, or run it from a terminal. It prints its version, its config path and the current mode, then sits there..\pressandhold.exeThat console window is the program. There is no tray icon yet, so closing the window is how you stop it. Do not run it as administrator — it will refuse, on purpose.
-
Try it in Notepad
Hold a for about half a second. An
aappears immediately, then the menu opens above it. Press 2 and theabecomesá. Arrow keys move the selection, Enter confirms, Esc cancels and leaves the plain letter.Keys with accents are
a c e i l n o s u y zand their capitals. Everything else repeats exactly as it always did. -
Switch modes whenever you like
.\pah.exe set false # hold to repeat the character .\pah.exe set true # hold for the accent menu .\pah.exe show # the whole current configNo restart. Add the folder to your
PATHif you want to typepahfrom anywhere. -
Start it with Windows (optional)
Press Win+R, run
shell:startup, and put a shortcut topressandhold.exein the folder that opens.Hold off on this until you have used it for a few days. It is a beta, and you want to be able to remember what you started.
Configuration
The config file
Everything lives in one TOML file at
%APPDATA%\pressandhold\config.toml. pah path prints it,
pah show dumps the effective settings. The daemon notices edits within a
second.
mode = "accent-menu" # or "repeat-character"
hold-ms = 500 # how long before the menu opens
wrap-selection = false # arrow keys wrap at the ends
menu-timeout-ms = 5000 # close an abandoned menu
tables = ["us"] # or ["us", "extended"]
excluded-apps = ["some-game.exe"]
excluded-apps is the important one. Held keys mean movement, not text, in
games, and a and s are both accent keys — so add anything where
a popup appearing mid-match would be unwelcome. Run
pah table us to see every candidate list.
Before you run it
It reads every key you press
There is no way to build this without a global keyboard hook, which means the program is structurally indistinguishable from a keylogger. Pretending otherwise would be the wrong way to earn your trust, so here is the honest version.
What happens to your keystrokes
Nothing is logged, stored, or transmitted. The project contains no network code at all — no socket, no telemetry, no update check — and a CI job fails the build if one ever appears. The process touches exactly one file, its own config. The most it holds at once is a single character. You can confirm all of that from outside with Process Monitor and about two minutes.
What it does not protect you from. It sees your passwords as you type them. It does not keep them — but if you hold an accent key in a password box, it draws a popup showing that letter. We suppress this in classic Windows password fields and keep the popup out of screen recordings, but browsers, Electron apps and terminals expose nothing we can detect. Treat that as a real limitation, not a solved problem.
Deliberate limits
- Refuses to run as administrator, so it can never see or type into elevated windows and credential prompts.
- Only one copy can run at a time.
- A broken config file makes it stand down to plain key repeat, never to "switch the intrusive thing back on".
- Before replacing a letter it re-checks that the window and caret it started from are still there, because that replacement deletes a character.
Kernel anti-cheat treats keyboard hooks as an automation vector, so don't run it while playing competitive games. The full write-up, including what a security review found and what is still open, is in SECURITY.md.
Honest status
What works and what doesn't
This is 0.1.0-beta.1. The behaviour is covered by tests and the Windows
backend has been through a security review, but almost nobody has used it yet.
| Piece | State |
|---|---|
| Accent menu, mode switching, exclusions | Working |
| Notepad, WordPad, Office | Should be the happy path |
| Browsers and Electron apps | Works, but the popup follows your mouse — they publish no caret position |
| Terminals | Rough. Backspace means something else at a shell prompt |
| Tray icon, installer, autostart | Not built |
| Non-US keyboard layouts | One file each — none written yet |
| Linux | Designed, not started |
Contributing
Four ways to help
The behaviour lives in a crate with no operating system in it, so most of the project is testable anywhere — and the Windows backend type-checks on Linux and macOS too. You do not need a PC to work on the PC part.
Check the accent order
The candidate lists are right; their left-to-right order for e,
s and o is unverified. Order is what the number keys map to,
so it matters as much as the contents. No Rust required.
Add your layout
Only the US layout ships. Spanish, French, German, Portuguese and the Nordic layouts are all one TOML file each, and the tests will tell you if you get a list wrong.
Kill ToUnicodeEx
Asking the layout what a key types disturbs dead-key state, so ´
then e can break on international layouts. The fix is reading the
layout tables directly. One function, clear test.
Build the IBus engine
The design is written down and the logic already exists and passes its tests. What is missing is the engine plumbing. On Linux the whole destructive-backspace problem disappears — you commit from a preedit buffer instead.
Questions
Frequently asked
How do I type accented characters on Windows without alt codes?
Hold the base letter. Holding a gives à á â ä æ ã å ā; press
1–9 or use the arrow keys. Nothing to memorise, which is the
entire point — alt codes and the character map both require you to know something
before you can type something.
How is this different from WinCompose or the compose key?
A compose key is a different gesture: press a dedicated key, then a sequence (Compose ' e for é). It is excellent and it covers far more characters. This is specifically the hold the key you already pressed behaviour, so people coming from a Mac keep a reflex they already have. If you already think in compose sequences, you probably want WinCompose instead.
Does it work in games?
Turn it off there. Holding a and s means movement, not
text, and kernel anti-cheat treats keyboard hooks as an automation vector — you
can be flagged. Add the executable to excluded-apps, or run
pah set false before you play.
Why is it not signed?
Code-signing certificates cost money and the project has none yet. SmartScreen will warn you, and that warning is doing its job. Until then, building from source is the recommendation — it is one command.
When will Linux work?
When someone builds it. The design is settled — an IBus or Fcitx5 input method engine, because it is the only approach that works on X11 and Wayland across GNOME and KDE — and the behaviour it needs is already written and tested. The missing part is the engine plumbing, and it is the largest open piece of the project.
Is this affiliated with Apple?
No. It is an independent reimplementation of a behaviour, written from scratch in Rust. No Apple code is involved, and macOS is only referenced as the thing being matched.