-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out how to support bindings for "VK_OEM" keys #1212
Comments
Yanking the triage tag. This is a |
I’m looking to have CTRL+| (which is ctrl shift \ on my keyboard) split vertical. Not possible today. For horizontal I’m using CTRL+SHIFT+- which is CTRL+_ FYI+context |
One way maybe to be able to handle this would be to allow VK_** int values to be used in the binding 'language' to avoid a bunch of hard coding of VK and missing ones. enables you to you say "ctrl+(vk)32" ? -- just a wild idea. I think in @shanselman use case, supporting a keybinding that already involves a modifier might be tough (I don't see cmder/conemu handle this either). But even supporting CTRL+\ (the non-shifted pipe character that maps to VK_SEPARATOR) doesn't work right now. |
I'd really love it if there was a way that we could just take a character and get the vkey from it. That way, if a user put |
I think this is what you're looking for in this case: https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-oemkeyscan And then for keys on the "Main" keyboard, there's also: https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-vkkeyscanexa |
This commit introduces support for key bindings containing keys traditionally classified as "OEM" keys. It uses VkKeyScanW and MapVirtualKeyW, and translates the modifiers that come out of VkKeyScanW to key chord modifiers. The net result of this is that you can use bindings like "ctrl+|" in your settings. That one in particular will be reserialized (and displayed in any menus) as "ctrl+shift+\". Admittedly, this is not clear, but it _is_ the truest representation of the key. This commit also moves the Xaml key chord name override generator into App as a static function, *AND* it forces its use for all modifier names. This will present a localization issue, which will be helped in part by #1972. This is required to work around microsoft/microsoft-ui-xaml#708. I've kept the original code around guarded by a puzzling ifdef, because it absolutely has value. Fixes #1212.
This commit introduces support for key bindings containing keys traditionally classified as "OEM" keys. It uses VkKeyScanW and MapVirtualKeyW, and translates the modifiers that come out of VkKeyScanW to key chord modifiers. The net result of this is that you can use bindings like "ctrl+|" in your settings. That one in particular will be reserialized (and displayed in any menus) as "ctrl+shift+\". Admittedly, this is not clear, but it _is_ the truest representation of the key. This commit also moves the Xaml key chord name override generator into App as a static function, *AND* it forces its use for all modifier names. This will present a localization issue, which will be helped in part by #1972. This is required to work around microsoft/microsoft-ui-xaml#708. I've kept the original code around guarded by a puzzling ifdef, because it absolutely has value. Fixes #1212.
This commit introduces support for key bindings containing keys traditionally classified as "OEM" keys. It uses VkKeyScanW and MapVirtualKeyW, and translates the modifiers that come out of VkKeyScanW to key chord modifiers. The net result of this is that you can use bindings like "ctrl+|" in your settings. That one in particular will be reserialized (and displayed in any menus) as "ctrl+shift+\". Admittedly, this is not clear, but it _is_ the truest representation of the key. This commit also moves the Xaml key chord name override generator into App as a static function, *AND* it forces its use for all modifier names. This will present a localization issue, which will be helped in part by #1972. This is required to work around microsoft/microsoft-ui-xaml#708. I've kept the original code around guarded by a puzzling ifdef, because it absolutely has value. Fixes #1212.
🎉This issue was addressed in #2067, which has now been successfully released as Handy links: |
terminal/src/cascadia/TerminalApp/KeyChordSerialization.cpp
Lines 75 to 85 in ecfaa76
The text was updated successfully, but these errors were encountered: