microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.31k stars 6.55k forks source link

Keyboard Manager: Remapping a shortcut using "right Ctrl"/⇨ with CAN/CSA Z243.200 fails (detected as "VK 223") #35009

Open Chealer opened 1 month ago

Chealer commented 1 month ago

Microsoft PowerToys version

0.84.1

Installation method

GitHub, PowerToys auto-update

Running as admin

No

Area(s) with issue?

Keyboard Manager

Steps to reproduce

In Keyboard Manager:

  1. Ensure that the layout is Canadian multilingual standard
  2. Click Remap a shortcut
  3. At the bottom, select Add a shortcut remapping
  4. Click the pencil shortcut (left)
  5. Toggle "Authorize simultaneous presses" on
  6. Depress the bottom right key (located where the right Ctrl usually is)
  7. Press any key, for example L
  8. Release the key depressed in #6

✔️ Expected Behavior

A shortcut using the bottom right key as a modifier (Ctrl/ + L)

❌ Actual Behavior

An unusable sequence of 2 keypresses, with the first key named "VK 223" (VK 223, L) After activating OK, Keyboard Manager complains that a shortcut must start with a modifier key.

Other Software

No response

Chealer commented 1 month ago

Some background: CSA Z243.200:92 is mostly used in the province of Quebec. It is a proprietary standard which most people cannot consult for free. That layout is complex and outdated and the implementation in Microsoft Windows does not match closely. According to the norm, the bottom right key seems not to be a right Ctrl, which would probably make it a unique layout. And indeed, Windows does not behave as if it is a right Ctrl. This causes significant issues, which is precisely why I was trying to create a shortcut.

On the other hand, according to Keyboard Layout Info as well as Microsoft's own documentation, it should be a right Ctrl (VK_RCONTROL).

So it's not clear exactly how this should behave, but since the bottom right key is most definitely a modifier in CMS, Keyboard Manager should definitely treat it as such and not behave as it currently does. Note that this issue is made worse by issue #31079, which also prevents from using the right Alt, making it very difficult to create shortcuts for those who use their mouse to the left.

Note that this affects Microsoft's own Natural Ergonomic Keyboard 4000 (version canadienne francophone), using Windows 11.