microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.89k stars 6.59k forks source link

Keyboard Mappings Issue with PowerToys in Cloud/Dev Boxes #33932

Open irodneyedwards opened 4 months ago

irodneyedwards commented 4 months ago

Microsoft PowerToys version

v0.82.1

Installation method

Other (please specify in "Steps to Reproduce")

Running as admin

Yes

Area(s) with issue?

Keyboard Manager

Steps to reproduce

I am encountering an issue where keyboard mappings set via PowerToys on my local system do not carry over to cloud/dev boxes. When I set up the same settings on PowerToys in the cloud/dev boxes, they don't work if the local system keyboard manager settings are enabled.

Steps to Reproduce:

  1. Set up keyboard mappings using PowerToys on the local system.
  2. Connect to a cloud/dev box.
  3. Attempt to use the same keyboard mappings in the cloud/dev box.

Alternatively, if I set up the keyboard mappings directly on the cloud/dev box, they still don't work if the local system keyboard manager settings are enabled.

Workaround: If the keyboard manager on the local system is turned off, the mappings work correctly in the cloud boxes. This requires manually turning off the keyboard manager on the local system while using the dev box and turning it back on afterward.

Impact: This issue is a significant inconvenience and impacts the usability of dev boxes, as it requires constant toggling of the keyboard manager on the local system.

Additional Information:

Request: Please investigate and provide a solution that allows for consistent keyboard mappings across local and cloud/dev boxes without needing to manually toggle the keyboard manager. Ideally, I should be able to set up the keyboard mappings on my local box once and not have to configure them in both places.

✔️ Expected Behavior

The keyboard mappings should work seamlessly in the cloud/dev box as they do on the local system.

❌ Actual Behavior

The key mappings trigger functions like Sticky Keys or Start instead of the intended mappings.

Other Software

No response

bradgwest commented 1 month ago

I was also hitting this issue in PowerToys 0.85.1 (both local and remote). In my particular case, I was using Keyboard Manager to remap Capslock to Ctrl (left) and to define many shortcuts. I was able to workaround the issue and get shortcuts working by:

  1. Deleting my Remap keys in the local machine's Keyboard Manager. I only had a single key mapped (Capslock to Ctrl).
  2. Mapping Capslock to Ctrl via Registry Editor with the following script, and then rebooting the local machine:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

At this point, I am able to run Keyboard Manager on both the local and remote machines, and the shortcuts defined on the remote system work as intended.

I want to reiterate that this is a special case, but hopefully is helpful given the frequency of remapping capslock to control (and perhaps helpful in solving the general case since it seems to show that remapping shortcuts is not the root cause).