v0.1.0-beta.3 · 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 it
The installer: download
pressandhold-setup-<version>.exefrom the latest release and run it. It installs into your own user folder and never asks for administrator — this program does not need it, and a keyboard utility that demands it should make you suspicious. Uninstall from Settings → Apps like anything else.Or the plain files:
pressandhold-windows-x64.zipfrom the same release, unzipped somewhere permanent. Check it againstSHA256SUMS.txt.Or build it: install rustup, then:
git clone https://github.com/TXOTY/pressandhold 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. An unsigned installer gets the strongest warning of all, which is fair: an installer is exactly the shape malware likes to take.
This is the moment to decide whether you trust it. The security section exists to help you decide, not to talk you past it — and if the answer is no, building from source takes ninety seconds and requires trusting nobody.
-
Run the daemon
The installer offers to start it for you and to start it when you sign in. If you took the zip instead, double-click
pressandhold.exe..\pressandhold.exeA tray icon appears. Right-click it to turn the accent menu on or off, switch on Start with Windows, edit your settings, undo your last change, or quit. Its tooltip always says which mode you are in.
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)
Tick it in the installer, or turn it on later from the tray icon. Either way it is a per-user setting, so it also appears in Task Manager → Startup where you can switch it off without going through us.
Worth holding off until you have used it for a few days. It is a beta, and you want 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
pause-in-games = true # stand down in fullscreen games
tables = ["us"] # or ["us", "extended"]
excluded-apps = ["some-game.exe"]
[bindings]
e = ["é", "è", "ê"] # just the three you actually use
a = [] # no menu on a — it repeats normally
Or from a terminal, without editing anything:
pah bind e é è ê # set your own list, in order
pah bind a off # no menu on that key
pah unbind e # back to the built-in list
pah bindings # what you have customised
Changed something and it made things worse?
pah undo steps back to the settings you had before your last change, and
pah history lists every saved version. The tray menu has the same thing.
You should never be stuck with an edit you can't reverse.
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.3. 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 |
| Tray icon, start with Windows, custom bindings, undo | Working |
| Games and presentations | Stands down automatically while fullscreen |
| 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 |
| Installer, code signing | 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?
It gets out of the way on its own. Any fullscreen game puts Windows into a state the shell reports, and pressandhold stands down completely while that is true — no popup, no swallowed key repeat, so holding a or e behaves exactly as the game expects. The same applies while you are presenting or screen-sharing.
For windowed or borderless games, where Windows does not report a fullscreen
state, add the executable to excluded-apps — or switch off the two
keys that matter with pah bind a off and pah bind s off,
which leaves accents working everywhere else.
One thing that is not solved by any of this: kernel anti-cheat (EAC, BattlEye, Vanguard) treats a program that hooks the keyboard as an automation vector, and you can be flagged for running one at all. If you play anything competitive, quit it from the tray before you launch.
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.