AutoHotkey script that remaps the Copilot key (on Windows 11 laptops) to Right Control (RCtrl) with Sticky Keys functionality.
The script redirects the Copilot key (which normally sends the combination LShift + LWin + F23) to the Right Control key with two modes of operation:
- Press the Copilot key once
- RControl activates as "sticky" - it stays pressed
- Press any other key (e.g.,
C) - The combination
Ctrl+Cis executed - RControl automatically releases
Use case: Quick keyboard shortcuts without holding Control
- Press the Copilot key twice in quick succession
- RControl is locked (stays pressed permanently)
- All subsequent keys are executed with Control
- Press Copilot again to unlock
Use case: Series of Control commands without repetition (e.g., text selection with arrows)
Windows Sticky Keys don't work with remapped keys from AutoHotkey because Sticky Keys monitor only physical keys at the driver level. This script implements its own Sticky Keys functionality directly in AutoHotkey.
- Install AutoHotkey v2
- Save the script as
remap_copilot_key_sticky.ahk - Run by double-clicking the file
- (Optional) Add to Startup folder for automatic launch at Windows startup
Displayed at the text cursor (not at the mouse):
- ⌨ RControl sticky (1 key) - sticky mode active
- 🔒 RControl LOCKED - locked mode
- ✓ RControl released - Control has been released
- Single beep (600 Hz) - sticky mode activated
- Double beep (800 Hz) - locked mode activated
- Low beep (400 Hz) - Control released
To disable sound, set ENABLE_SOUND := false on line 17
If you find the sound beeps annoying, you can disable them on line 17:
global ENABLE_SOUND := false ; Set to false to disable all beepsChange true to false to turn off all audio feedback.
If you have trouble detecting double-tap, adjust the value on line 14:
global DOUBLE_TAP_TIME := 400 ; time in milliseconds- Tapping too fast? → Decrease to
300or250 - Tapping too slow? → Increase to
500or600
If you want to monitor additional keys in sticky mode, add them to the list on line 112:
keys := ["a","b","c",...,"Insert","PrintScreen"]- Capturing Copilot key: Script intercepts the combination
LShift + LWin + F23 - Releasing original modifiers:
LShiftandLWinare released - Pressing RControl: Right Control is pressed instead of the original
- Double-tap detection: Compares time between presses (default 400ms)
- Key monitoring: Timer checks every 10ms using
GetKeyState()if any key was pressed - Automatic release: After detecting a key in sticky mode, Control is released
| Combination | Action |
|---|---|
Copilot 1× |
Sticky mode (one key) |
Copilot 2× |
Lock/Unlock mode |
Ctrl+Shift+Alt+R |
Reload script |
The script monitors these keys in sticky mode:
- Letters:
a-z - Numbers:
0-9 - Function keys:
F1-F12 - Navigation:
←↑↓→,Home,End,PgUp,PgDn - Special:
Space,Enter,Tab,Backspace,Delete,Escape,Insert - Punctuation:
,,.,/,;,',[,],\,-,=
- Increase
DOUBLE_TAP_TIMEvalue (e.g., to500or600) - Try tapping with a more consistent rhythm
- Check if the key you're using is in the list of monitored keys
- Add it to the
keyslist if missing
- Add script to Startup folder:
Win+R→shell:startup→ Copy script here
- Windows 11 (or laptop with Copilot key)
- AutoHotkey v2.0 or newer
This script is freely usable and modifiable according to your needs.
Akrotkiv Created with the help of Ai.
Windows Sticky Keys operates at the keyboard driver level and only recognizes physical hardware key presses. AutoHotkey's Send() commands (including SendInput, SendEvent, SendPlay) work at a higher level - they inject events into the Windows message queue, which normal applications see, but Sticky Keys does not.
This script implements sticky key behavior by:
- Using
InstallKeybdHookto intercept keys at a low level - Monitoring the physical state of keys using
GetKeyState()with the "P" (Physical) flag - Using a timer that checks every 10ms if any key has been pressed
- Automatically releasing the Control modifier after detecting a key press in sticky mode
The script is very lightweight:
- Memory usage: ~2-3 MB
- CPU usage: Negligible (timer runs only in sticky mode)
- No noticeable impact on system performance