Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BackOff

A tiny Windows tray app that fixes the phantom double-press of the mouse back button.

Many mice (Logitech G-series in particular) develop "double-clicking" as their microswitches wear: a single physical press is registered twice in quick succession. BackOff sits in the notification area, listens for the back button (XButton1) with a global low-level mouse hook, and swallows any press that arrives within a configurable cooldown (default 120 ms) of the previous one.

No window, no installer, no dependencies — a single self-contained exe (~160 KB) that lives in your tray and starts with Windows.

How it works

  • Installs a WH_MOUSE_LL low-level mouse hook (zero-allocation hot path).
  • First back press is passed through untouched; any press landing inside the cooldown window is discarded (along with its paired release), so applications see one clean click.
  • The release event of a forwarded press is always delivered — pairing is tracked per stroke, so rapid intentional double-backs still work as long as they are slower than the cooldown.

Why 120 ms?

Measured with the included gap meter (BackOffMeasure) on hardware that exhibits the issue:

Cluster Observed gaps
Phantom double-press 38, 49, 68, 69, 71, 72, 85, 96, 105, 121 ms
Fastest deliberate back-back 489 ms (typical rhythm 530–800 ms)

120 ms sits between the clusters: it removes every phantom press while staying far below the speed of real double-clicks. You can tune it live from the tray menu.

Usage

  1. Publish or download the release exe (see below).
  2. Double-click BackOff.exe — a white back-arrow icon appears in the tray.
  3. Right-click (or double-click) the icon to adjust the cooldown, enable "Start with Windows", or exit.

Single-instance guarded: launching a second copy just exits. If the hook fails to install at startup, it retries every 10 seconds and notifies via a tray balloon instead of blocking a prompt.

Build

Requires the .NET 8 SDK (Windows).

dotnet publish -c Release -r win-x64 --self-contained false /p:PublishSingleFile=true
# output: bin\Release\net8.0-windows\win-x64\publish\BackOff.exe

Configuration is persisted to %APPDATA%\BackOff\config.json.

Gap meter (BackOffMeasure)

Measure\ contains a small companion console app: a passive listener that logs the exact time between consecutive back/forward presses so you can measure your own mouse's phantom cluster and pick the right cooldown. Run it without BackOff, click normally for a couple of minutes, and read the min/median/max gaps. Press Esc to exit (log saved to gaps.log).

dotnet publish .\Measure\BackOffMeasure.csproj -c Release -r win-x64 --self-contained false

Honest limitations

  • Hardware is the root cause. Software debouncing papers over a worn-out or bad microswitch. Replacing the switch (or the mouse) fixes it permanently; this app is the cheap stopgap.
  • Raw-input applications (some games) read the mouse directly and bypass low-level hooks, so the debounce does not apply there.
  • If the switch keeps degrading, the phantom cluster can widen over time — bump the cooldown in the tray menu whenever one starts sneaking through.

License

MIT — see LICENSE.

About

Windows tray app that debounces the mouse back button against phantom double-press (microswitch bounce). Includes a gap meter for tuning.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages