Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CopilotCtrl

CopilotCtrl icon

Download

The executable is a small, locally compiled, unsigned Windows application. Windows may show an Unknown Publisher warning because the project does not have a commercial code-signing certificate.

CopilotCtrl is a small Windows tray app for laptop Copilot keys that emit the standard Left Windows + Left Shift + F23 hardware chord. It offers three modes:

  • Right Ctrl (default)
  • Copilot unchanged
  • Disabled

Remote desktop compatibility is enabled by default. CopilotCtrl periodically renews its low-level keyboard hook so it runs before keyboard-capture hooks used by Moonlight and similar remote-desktop clients. This prevents a client from forwarding both the original Win + Shift + F23 chord and the mapped Right Ctrl to the remote computer. The compatibility option can be toggled from the tray menu.

It is designed for the Lenovo ThinkBook keyboard in this workspace, while staying compatible with other Windows laptops that emit the same standard Copilot chord.

Run

Open artifacts\Release\CopilotCtrl.exe. Right-click or left-click its notification area icon to change modes, enable Start with Windows, restart it as administrator, or exit.

Administrator mode is only needed when the remap must be injected into applications that themselves run as administrator. The app otherwise runs with ordinary user permissions and does not install a driver or service.

Build and test

From Windows PowerShell:

powershell -ExecutionPolicy Bypass -File .\build.ps1

The build uses the .NET Framework 4.8 compiler included with Windows on this machine, then runs deterministic state-machine tests. No package download is required. The build also creates a multi-resolution Windows icon from assets\CopilotCtrl.png.

To build the per-user installer with Inno Setup 6:

powershell -ExecutionPolicy Bypass -File .\build-installer.ps1

How it works

The keyboard hook buffers only the beginning of the exact Copilot chord for up to 100 ms. A complete chord is swallowed and converted to Right Ctrl (or swallowed in Disabled mode). If the chord does not complete, the buffered Windows/Shift input is replayed in order so normal shortcuts keep working.

Windows exposes the Copilot key as a synthetic key combination rather than a unique key code. Consequently, no user-mode remapper can distinguish the physical Copilot key from a person deliberately pressing Left Windows + Left Shift + F23.

Files written at runtime

  • Mode preference: %LOCALAPPDATA%\CopilotCtrl\settings.ini
  • Optional startup entry, only when enabled from the tray: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\CopilotCtrl

Unchecking Start with Windows removes that registry value. Exiting the app removes the keyboard hook immediately.

About

A lightweight Windows tray app that remaps the laptop Copilot key to Right Ctrl, with remote desktop compatibility.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages