ililim / dual-key-remap

Remap any key to any other two keys on Windows 🔥. Remap CapsLock to both Ctrl and Escape! (It's like xcape for windows!)
GNU General Public License v2.0
499 stars 36 forks source link

Add support for the Copilot key on new laptops/keyboards #71

Open dumblob opened 2 months ago

dumblob commented 2 months ago

Hi @ililim, great to see this project still exists.

Could you please add support also for the Copilot key? I would like to remap it to R_Ctrl.

Thank you, much appreciated!

FrnkPsycho commented 1 month ago

It's possible if the copilot key is not a shortcut for Win+C. From what I can find it's most likely a F23 key VK_F23. So in theory you can edit keys.c like this and build it yourself:

...

#define VK_F12 0x7B
#define VK_F23 0x86

...

#define SK_F12 0x58
#define SK_F23 0x6E

...

KEY_DEF key_table[] = {
    {"COPILOT", SK_F23, VK_F23},
    {"CTRL", SK_LEFT_CTRL, VK_LEFT_CTRL},

...

Then edit the config with remap_key=COPILOT.

You can lookup sk/vk codes from here and there or use some program to help you find your copilot keycodes.

Since I don't have this key so idk whether it works, good luck!