microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
106.96k stars 6.31k forks source link

Mapping Copilot (F23) -> CTRL not working #31979

Open Geexp opened 3 months ago

Geexp commented 3 months ago

Microsoft PowerToys version

0.79.0

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

Keyboard Manager

Steps to reproduce

I am trying to map the Copilot / F23 on my new keyboard back to CTRL

I have set up the below configuration but it is not working

image

✔️ Expected Behavior

That the CoPilot key functions like the CTRL key

❌ Actual Behavior

The CoPilolt key now does nothing when pressed

Other Software

No response

Jay-o-Way commented 3 months ago

I am willing to bet that the physical button sends a combination. Try and use "Remap a shortcut" and let us know if that helps. /needinfo

Geexp commented 3 months ago

Hi Jay

When I went to map the key and press the Copilot button, it came up then as F23 (rather than me choosing this).

As its just a single key, I'm not clear how to remap it using the shortcut feature. I tried Win+C, but that remaps that shortcut, but not the Copilot key. I also tried LeftWindows + LeftShift + F23 but that hasnt worked either.

My machine is a new Dell XPS 16 with the key now built in.

Jay-o-Way commented 3 months ago

Try and open "remap a shortcut" in Keyboard manager. Then press the button, like you did.

Geexp commented 3 months ago

Hi Jay, I have tried that, and I have added a shortcut mapping as below, but this still does not give the desired results

image

I've also tried mapping it to "X" and other keys, but the Copilot key simply stops working.

Incidentally, when I click OK to confirm and close the shortcut setup box, the underlying PowerToys dashboard window closes abruptly, though the PowerToys icon remains in the taskbar.

Jay-o-Way commented 3 months ago

Hm. This key is relatively new, so I don't know for sure how it exactly works. Another idea: is the keyboard compatible with the MS Mouse and Keyboard app? Maybe you can change something in there.

Geexp commented 3 months ago

Hi Jay, no I don't believe it is, its the built in keyboard on the laptop.

Would be great to get this working in PowerToys as I can't believe I'm the only person who will wan to remap this crazy key (at least until Copilot becomes more useful).

itswyll commented 3 months ago

Hey, I'm not sure if you've fixed this yourself, but I had some success with this by remapping it as a shortcut specifically via PowerToys like so. Hopefully this sorts you out as well. Had to make sure to remove the other mappings from the key section though as it interfered with this one when I had both like in the screenshot above.

image

tkhyn commented 2 months ago

Willing to get rid of the Copilot key too on a laptop keyboard where I really need the right ctrl (Ctrl + / to comment or uncomment code), I ended up with the same shortcut as @itswyll. However it does not work all the time. To make the Copilot button behave as the Ctrl key in combination I have to hit and release the Copilot button first, and only then the Ctrl + other key combination works.

@itswyll do combinations work all the time first time for you or is your experience similar to what I'm observing?

Jay-o-Way commented 2 months ago

I say this is something Microsoft should deal with

itswyll commented 2 months ago

Willing to get rid of the Copilot key too on a laptop keyboard where I really need the right ctrl (Ctrl + / to comment or uncomment code), I ended up with the same shortcut as @itswyll. However it does not work all the time. To make the Copilot button behave as the Ctrl key in combination I have to hit and release the Copilot button first, and only then the Ctrl + other key combination works.

@itswyll do combinations work all the time first time for you or is your experience similar to what I'm observing?

It works on the first try for me. I'm on a Lenovo Yoga. My use case is the same as yours with 'ctrl + /' and 'ctrl + backspace'

This is the edit view for my shortcut. I didnt make any other changes other than this one, so I don't have much else I can add unfortunately.

image

tkhyn commented 2 months ago

Thanks @itswyll, I have the exact same mapping on a Lenovo Legion Pro, and this is the only one I have.

The 'wake up call' after focussing the window seems to be systematically needed for all the applications I use (CLion, VSCode, Firefox). I'll keep observing / investigating and will report here. Before finding this solution I did a few tests with AutoHotKeys but AHK is no longer running so I doubt it will have changed anything.

ChrisLynnCL commented 2 days ago

I just opened a very similar issue #33589 on Jul 1, 2024: "Keyboard Manager Doesn't Remap key F23 to Ctrl key, instead Remaps it to Ctrl+Shft ." I have tried it with the same Remap a Shortcut configuration described above, and pictured below. BUT, It just now worked properly as Ctrl key when I deleted a Remap Key instruction that was also listed, which must have been interfering. I still don't understand the "Win + Shift + F23" instructions, which self populated when I pressed the pencil button and then pressed the copilot key. I'm using a Lenovo -IdeaPad Slim 5i with Windows 11. Thanks for all the suggestions. I'll close my issue#, but it has some details.

Screenshot 2024-07-02 075117