microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
108.29k stars 6.39k forks source link

Key mappings don't work when Visual Studio has focus #23582

Open tsobczynski opened 1 year ago

tsobczynski commented 1 year ago

Microsoft PowerToys version

0.66.0

Installation method

GitHub, PowerToys auto-update

Running as admin

No

Area(s) with issue?

Keyboard Manager

Steps to reproduce

Set up Keyboard Manager to swap Caps Lock with Control, and Left Win with Left Alt.

Exercise the remapped keys, see that they are swapped as requested.

Run Visual Studio.

Exercise the remapped keys again.

image

✔️ Expected Behavior

I expected the remapped keys to still be remapped when Visual Studio has focus.

❌ Actual Behavior

Instead, the keys behave according to their original function with no remapping applied. As soon as focus leaves Visual Studio, remapping resumes. For example, press remapped Win in Visual Studio, and the menu bar pops up. Press remapped Alt in Visual Studio, and the Windows menu appears. Now that focus has left Visual Studio, press remapped Win and the Windows menu disappears.

Other Software

Microsoft Visual Studio Community 2022 (64-bit) Version 17.4.4

running on Windows 10 21H2

tommy-hansen commented 1 year ago

It seems intermittent. I'm using VsVim 2022 and it works for the most part but sometimes not. Ctrl-[ will sometimes put caps lock on. Remapped Insert will turn capslock off until next time it fails.

Powertools 0.69.1.

Yushann commented 9 months ago

I have the same problem. Kyeboard Manager works fine everywhere except the Visual Studio 2022.

Other Information Windows 10 Enterprise 22H2 Microsoft Visual Studio Enterprise 2022 (64-bit) Version 17.6.5 PowerToys v0.74.1

xpengineer commented 3 months ago

If you run VS as Admin, you need to run PowerToys as admin as well https://powertoys.io/keyboard-manager-utility-for-windows/ https://stackoverflow.com/questions/67593307/microsoft-powertoys-key-mapping-not-working-in-visual-studio