We are working on a PowerToys CommandPallete Extension. Documentation is located at: https://learn.microsoft.com/en-us/windows/powertoys/command-palette/extension-development This documentation details the architecture and API reference for extension development.
- Target: Create a "HyperKey" functionality using CapsLock (default, but configurable) as a common modifier.
- Goal: Hold HyperKey and activate another command.
- Default Emulation: Emulate the holding of
SHIFT + LEFTCTRL + WIN + ALT. - Interaction Example: If there is another shortcut like
SHIFT + LEFTCTRL + WIN + ALT + C, holdingHyperKey + Cshould trigger the same shortcut/command. - Default implementation targets the
CapsLockkey.
- When the user holds CapsLock, simulate the hold of
SHIFT + LEFTCTRL + WIN + ALT. - When the user releases CapsLock, simulate the release of
SHIFT + LEFTCTRL + WIN + ALT. - If the user taps CapsLock quickly (default 300 ms, configurable later), simply toggle/activate CapsLock (do not simulate the hold of other keys).
- Maintain and update the root
README.mdwhenever new features, configurations, or commands are introduced to keep the user-facing documentation in sync with the codebase. - Never run the application directly as it is a PowerToys Command Palette extension (and runs as a packaged WinRT COM out-of-process server). Only compile the solution to validate for compiler errors and warnings, and let the user deploy/install it from Visual Studio.
#Requires AutoHotkey v2.0
*CapsLock::
{
startTime := A_TickCount
Send("{Ctrl down}{Shift down}{Alt down}{LWin down}")
KeyWait("CapsLock")
Send("{Ctrl up}{Shift up}{Alt up}{LWin up}")
if (A_TickCount - startTime < 200) && (A_PriorKey = "CapsLock")
{
SetCapsLockState(!GetKeyState("CapsLock", "T"))
}
}- Hyper Key: Caps Lock (⇧)
- Pressing Caps Lock (⇧) will trigger the left Ctrl+Alt+Shift+Win modifier keys. Hyper Key shortcuts will be shown with ✦.
- Quick Press: Trigger Caps Lock (⇧)
- Action to perform when Caps Lock (⇧) is pressed without any other keys.
- Include Shift (⇧): Enabled (toggled on).
- Create a single command called "Activate HyperKey" in the Command Palette extension that enables this functionality.