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

Closed
opened 2026-01-31 04:14:46 +00:00 by claunia · 2 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.
Author
Owner

@zadjii-msft commented on GitHub (Aug 4, 2021):

(notes for posterity, from teams)

(Leonard) tried:

  • WM_INPUTLANGCHANGE -- not being sent to our UWP app (nor any other event when pressing Win+Space)
  • CoreTextServicesManager.InputLanguageChanged -- gets only triggered for input language but not method (aka layout) changes
  • ITfActiveLanguageProfileNotifySink::OnActivated -- not getting called at all
  • XAML's ResourceContext.QualifierValues -- not getting updated
@zadjii-msft commented on GitHub (Aug 4, 2021): (notes for posterity, from teams) > (Leonard) tried: > * `WM_INPUTLANGCHANGE` -- not being sent to our UWP app (nor any other event when pressing Win+Space) > * `CoreTextServicesManager.InputLanguageChanged` -- gets only triggered for input language but not method (aka layout) changes > * `ITfActiveLanguageProfileNotifySink::OnActivated` -- not getting called at all > * XAML's `ResourceContext.QualifierValues` -- not getting updated
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #10876, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #10876, which has now been successfully released as `Windows Terminal Preview v1.11.2421.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.2421.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14606