Reload locale specific data when the input language or method changes #14604

Open
opened 2026-01-31 04:14:43 +00:00 by claunia · 0 comments
Owner

Originally created by @lhecker on GitHub (Jul 20, 2021).

Originally assigned to: @lhecker on GitHub.

VkKeyScanW as well as MapVirtualKeyW are widely used throughout the project, but are locale sensitive functions. For instance VkKeyScanW(0) will return different values for "English (United States)" and "English (United Kingdom)". See #8871.

This issue occurs primarily in two areas:

  • The settings model maps characters to virtual keys when deserializing key bindings.
    For instance using the following locale / keyboard layout ctrl+< will deserialize to:
    • German: ctrl+vk(0xE2) (there's a dedicated < key where the \ key is on the US English keyboard)
    • US English: ctrl+shift+vk(0xBC) (< is shift+,)
  • After #10666 has been merged it'll map the scan code in the quake mode key binding win+sc(41) to a virtual key in order to call RegisterHotKey. This scan code to virtual key mappings are highly dependent on the locale, the quake mode key binding will fail to work once the input language was changed.
Originally created by @lhecker on GitHub (Jul 20, 2021). Originally assigned to: @lhecker on GitHub. `VkKeyScanW` as well as `MapVirtualKeyW` are widely used throughout the project, but are locale sensitive functions. For instance `VkKeyScanW(0)` will return different values for "English (United States)" and "English (United Kingdom)". See #8871. This issue occurs primarily in two areas: * The settings model maps characters to virtual keys when deserializing key bindings. For instance using the following locale / keyboard layout `ctrl+<` will deserialize to: * German: `ctrl+vk(0xE2)` (there's a dedicated `<` key where the `\` key is on the US English keyboard) * US English: `ctrl+shift+vk(0xBC)` (`<` is `shift+,`) * After #10666 has been merged it'll map the scan code in the quake mode key binding `win+sc(41)` to a virtual key in order to call `RegisterHotKey`. This scan code to virtual key mappings are highly dependent on the locale, the quake mode key binding will fail to work once the input language was changed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14604