Skip to content

How do detect key modifiers is missing from migration docs #4614

@michael-hawker

Description

@michael-hawker
Contributor

The Modifier Keys section still calls out CoreWindow here:

https://learn.microsoft.com/en-us/windows/apps/design/input/keyboard-events#modifier-keys

And the GetKeyState API: https://learn.microsoft.com/en-us/uwp/api/windows.ui.core.corewindow.getkeystate

However, that is not mentioned in the migration docs (either the table summary) or this page.

Looking at the Window/AppWindow apis called out even in this doc, there doesn't appear to be an obvious mapping. Would be nice to have updated guidance here for dealing with keyboard input.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Activity

michael-hawker

michael-hawker commented on Sep 14, 2023

@michael-hawker
ContributorAuthor

Looks like it maybe should be:

InputKeyboardSource.GetKeyStateForCurrentThread(Windows.System.VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);

From Microsoft.UI.Input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Karl-Bridge-Microsoft@michael-hawker@stevewhims

      Issue actions

        How do detect key modifiers is missing from migration docs · Issue #4614 · MicrosoftDocs/windows-dev-docs