altoggle dayflower
winget install --id=dayflower.altoggle -e Switch the Windows IME with a solo press of a modifier key
winget install --id=dayflower.altoggle -e Switch the Windows IME with a solo press of a modifier key
Switch the Windows IME with a solo press of a modifier key.
No new key to learn and no chord to hit: the two keys already under your thumbs become "start typing Japanese" and "stop typing Japanese", and they stay ordinary Alt for everything else.
Whichever key you assign gives up its usual solo-press behaviour — Alt the menu bar, Win the start menu, Menu the context menu.
You get it back by holding the key. A press longer than the threshold (400ms by default) falls through to Windows untouched, so holding Alt still opens the menu bar. That is the escape hatch, and it is deliberate.
Either direction can also be set to (none) if you only want one of the two.
altoggle sends the VK_IME_ON / VK_IME_OFF virtual keys. Under a US keyboard
layout those keys do nothing, so with no Japanese IME active the app is inert
rather than broken.
Any of three ways. The first two also keep it up to date.
winget
winget install dayflower.altoggle
Scoop
scoop bucket add dayflower https://github.com/dayflower/scoop-bucket
scoop install dayflower/altoggle
By hand
altoggle.exe somewhere permanent — %LOCALAPPDATA%\Programs\altoggle\
is a reasonable home. There is no installer; the exe is the whole app.Step 2 is the one the package managers spare you: they fetch the file themselves, so nothing arrives marked.
Then, however you installed it:
altoggle on your
PATH, and Scoop adds a start-menu entry.Autostart records the path the exe has right now. If you move or rename
altoggle.exe afterwards, Windows will keep launching the old path; untick
Start with Windows and tick it again to repoint it.
Quit altoggle from the tray before updating it. A running instance holds the
executable open, and neither winget upgrade nor scoop update can replace a
file that is in use.
altoggle is not code-signed, and it installs a low-level keyboard hook. Both are things SmartScreen and some antivirus heuristics react to, so expect a "Windows protected your PC" dialog (More info → Run anyway) on first launch.
That warning is about the absence of a certificate, not about anything the app was observed doing. What it actually does:
%APPDATA%\altoggle\config.toml, and one value
under HKCU\Software\Microsoft\Windows\CurrentVersion\Run — and that one only
while Start with Windows is ticked.crates/app/src/hook.rs and the whole
source is here to read.If you would rather not trust a binary from a stranger, build it yourself — see below. It takes one command.
Settings… on the tray menu opens a small dialog. It stays live while it is open, so you can change the threshold, press Apply, press the key, and feel whether the new value is right.
(none). Note that many Japanese laptops and JIS
keyboards have no right Win key, and some have no Menu key; mixing sides
(say left Win and right Alt) is fine.0x07.The same values live in %APPDATA%\altoggle\config.toml, which is written with
explanatory comments on first run. Editing it by hand works, but only takes
effect at the next start — and the dialog rewrites the file whole when you save,
so anything you add to it will not survive.
Reinstall hooks on the tray menu is there for the rare case where Windows drops the hook (it does so silently, and gives no way to ask). If solo presses suddenly stop working, try that before restarting the app.
Quit on the tray menu. The release build has no console, so Ctrl+C does nothing — the tray menu is the way out.
Quitting releases every modifier key on the way, which matters here: altoggle suppresses the trigger key's release, and a modifier left logically held down would turn every later keystroke into a chord.
winget uninstall dayflower.altoggle, scoop uninstall altoggle, or delete altoggle.exe if you put it there yourself.%APPDATA%\altoggle\ folder.Steps 1 and 4 are yours whichever way you installed it. The Run entry and the config file are written by the app while it runs, and an uninstaller knows nothing about them. Beyond those two, that is everything: no installer state, no service, and nothing else in the registry.
cargo build --release --bin altoggle
The result is target\release\altoggle.exe, a single self-contained executable
— the icons are compiled into it and there are no DLLs to ship beyond the MSVC
runtime.
One prerequisite is easy to miss: the build needs rc.exe from the Windows
SDK, to compile the icon and version resources. A Rust MSVC toolchain that has
link.exe but no SDK resource compiler fails here and nowhere else. Installing
the Desktop development with C++ workload of Visual Studio Build Tools, with
the Windows SDK component, is enough.
cargo build --release without --bin altoggle also builds three developer
tools that are deliberately not distributed. Only altoggle.exe is the app.
MIT — see LICENSE.