A PowerToys Command Palette extension that adds HyperKey functionality to Windows. It allows you to use your CapsLock key as a powerful modifier key that simulates holding down Ctrl + Shift + Alt + Win.
The default mapping of Ctrl + Shift + Alt + Win is to open Office applications. Currently, you can disable this feature by changing the registry to turn off the shortcut key for opening Office applications. Pressing Ctrl + Shift + Alt + Win will no longer open the Office application.
However, if you want to use the "Hyper" key to set other shortcuts, you need to follow this rule and change it through the registry. Modifying the registry has risks. Perform this operation with caution.
I will list the contents of the registry for closing Office application shortcuts below.
Click Search on the taskbar, enter CMD, select Run as administrator to open, enter the following command and press Enter:
REG ADD HKCU\Software\Classes\ms-officeapp\Shell\Open\Command /t REG_SZ /d rundll32 After this command is completed, the Office app shortcut will be disabled and the Hyper key will not open it again.
Disclaimer: Generally, modifying registry subkeys or work group is intended for advanced users, administrators, and IT Professionals. It can help fix some problems, however, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For further protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click here to view the article.
- HyperKey Modifier: Hold the configured modifier key and press any other key to trigger shortcuts bound to the remapped chord.
- Customizable Modifier Key: Choose the activation key from standard options like
Caps Lock,Left/Right Ctrl,Left/Right Shift,Left/Right Alt,Left/Right Win, function keysF1throughF12, orNone(effectively disabled). - Include Shift Key Option: Toggle whether the simulated modifier chord includes the
Shiftkey. - Quick Press (Original Function): Press and release the modifier key quickly (within 300 ms) to toggle or trigger its original function (e.g., toggling capitalization lock for Caps Lock, or sending a standard keypress for other keys).
- Dynamic Command Palette Toggle: A single "Activate/Deactivate HyperKey" command within the PowerToys Command Palette manages the hook.
- Isolated Hook Process: Runs in a dedicated background STA thread within the extension COM out-of-process server, keeping the PowerToys process clean and responsive.
- Zero Orphaned Hooks: The keyboard hook is automatically unregistered upon extension disposal or unloading.
You can configure HyperKey settings directly within the PowerToys Command Palette extension settings manager:
- Modifier Key: Choose which key acts as the HyperKey.
- Options include:
None(effectively disabled),Caps Lock (⇪)(default), standard modifiers (Ctrl, Shift, Alt, Win for left/right keys), and function keys (F1throughF12). - Fallback: If settings are empty,
Caps Lockis selected.
- Options include:
- Include shift key: Toggles whether the simulated modifier chord includes the
Shiftkey (emulatesCtrl + Shift + Alt + Winwhen enabled, orCtrl + Alt + Winwhen disabled).- Default: Enabled (
true).
- Default: Enabled (
The extension is built on top of the Microsoft Command Palette Extensions SDK and runs as an out-of-process WinRT COM server.
┌─────────────────────────────────┐
│ PowerToys Command Palette │
└────────────────┬────────────────┘
│ (WinRT COM IPC)
┌────────────────▼────────────────┐
│ HyperKey COM Server Process │
│ ┌───────────────────────────┐ │
│ │ Extension Page & UI │ │
│ └───────────────────────────┘ │
│ ┌───────────────────────────┐ │
│ │ HyperKey Hook Thread │ │
│ │ - WH_KEYBOARD_LL │ │
│ │ - STA Message Pump │ │
│ └───────────────────────────┘ │
└─────────────────────────────────┘
- Activation: When "Activate HyperKey" is invoked, the extension starts a dedicated background thread configured with a Win32 message loop (
GetMessage) and registers a low-level keyboard hook. - Press Interception: When
CapsLockis pressed down, the hook swallows the keypress, records the start time, and usesSendInputto simulate key downs forLeft Ctrl,Left Shift,Left Win, andLeft Alt. - Release Interception: When
CapsLockis released, the hook releases the simulated modifier keys. If the press duration was under 300 ms and no other keys were pressed, a simulated Caps Lock key cycle (down/up) is sent to toggle standard capitalization lock. - Recursion Prevention: Simulated keystrokes sent by the extension are flagged with a unique signature in
dwExtraInfo. The hook intercepts these and passes them along directly to avoid recursive loops.
- Windows 10 or 11
- .NET 10 SDK
- PowerToys (with Command Palette enabled)
- Open the solution in Visual Studio or your preferred C# IDE, or use the .NET CLI:
dotnet build
- To compile and generate MSIX packages for publish/sideloading (both
x64andARM64configurations), run the provided PowerShell script from the root folder:.\buildForPublish.ps1
- Build and deploy the project. (To register the COM server, ensure the MSIX package is deployed or run in development mode).
- Open the Command Palette in PowerToys.
- Search for and select "Reload Command Palette extensions".
- Locate the "HyperKey for CommandPallete" page to activate the hook.