Skip to content

Wolren/DoubleKeyPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Double Key Press

.NET Platform License

A Windows utility that turns any key into a "double-press modifier." Hold the configured base key while pressing another key, and that key is registered twice in rapid succession.

Features

  • Configurable base key -- set any virtual-key code as the modifier trigger
  • Global low-level hook -- works in any application, no focus required
  • Scan-code injection -- compatible with OEM keys that fail under virtual-key-only methods
  • Self-suppressing -- original key events are consumed; only the doubled output reaches the system
  • No tray icon, no UI -- runs minimized with a single configurable window title for verification

How it works

The application installs a WH_KEYBOARD_LL hook. When the base key is pressed and held, every subsequent key-down event is intercepted: the original event is suppressed, and two synthetic key events (down + up, using scan codes) are injected in its place. The base key itself is also suppressed so it never reaches the active window.

Key up events from the doubled key are suppressed to prevent stray repeats.

Configuration

Edit MainForm.cs, line 13:

private static readonly int BaseKeyVK = 0xBA;

Change the hex value to any Windows virtual-key code. Common examples:

Key VK Code
Right Alt 0xA5
Right Ctrl 0xA3
Pause/Break 0x13
OEM ; 0xBA

Rebuild after changing the value.

Build

dotnet build -c Release

Requires the .NET 7 SDK and Windows (the project targets net7.0-windows and uses WinForms + P/Invoke).

Usage

  1. Launch DoubleKeyPress.exe
  2. Hold the configured base key and press any other key
  3. The pressed key registers twice instead of once
  4. To quit, use Task Manager -- the application has no visible UI

License

MIT -- (c) 2026 Wolren

About

C# Windows utility that turns any key into a double-press modifier

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages