Skip to content

Shortcut Guide renders single-digit shortcut keys incorrectly (Ctrl+0, Ctrl+9) #48460

@brycewc

Description

@brycewc

Summary

In the new Shortcut Guide (V2, shipped in 0.100), shortcuts whose key is a single digit render incorrectly. The digit is interpreted as a Windows virtual-key code rather than the literal number, so the displayed keycap is blank or wrong.

Steps to reproduce

  1. Enable Shortcut Guide and focus an app whose manifest uses a digit key — e.g. Microsoft Edge, Chrome, or Firefox (the "switch to last tab" Ctrl+9 entry), or any manifest with Ctrl+0.
  2. Open Shortcut Guide (default Win+Shift+/).
  3. Look at the shortcut that uses a single digit.

Expected

The keycap shows the digit, e.g. Ctrl + 9 or Ctrl + 0.

Actual

The keycap is blank or shows an incorrect glyph, because the digit is treated as a virtual-key code:

  • VK 1 = left mouse button
  • VK 9 = Tab
  • VK 0 = undefined

Root cause

In ShortcutDescriptionToKeysConverter.GetKeysList (src/modules/ShortcutGuide/ShortcutGuide.Ui/Converters/ShortcutDescriptionToKeysConverter.cs), a numeric Keys string is parsed with int.TryParse and passed to Helper.GetKeyName((uint)keyCode) as a virtual-key code. Per the manifest spec a numeric key is a VK code, but single digits 09 are commonly authored to mean the literal digit, and no VK mapping yields the digit character — so they render incorrectly.

Proposed fix

Treat a single digit 09 in a manifest's Keys as the literal character. A PR adding this (plus a Postman manifest that exercises it) follows.

Environment

  • PowerToys: built from main (post-0.100 Shortcut Guide V2)
  • OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions