How to detect key presses modifer keys #2685
Unanswered
johnt-star
asked this question in
Q&A
Replies: 2 comments 1 reply
-
You can use Microsoft.UI.Input.InputKeyboardSource.GetKeyStateForCurrentThread |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks for the response! I haven't used hooks before but I will certainly give it a try. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before I converted my WinUI 3 app to WindowsAppSDK 1.1, I would use CoreWindow to detect key presses and accelerator key presses, as follows:
I have yet to find the replacement way to do this in WindowsAppSDK, since CoreWindow is not supported.
I would appreciate if someone can point me in the right direction on how to detect key presses at the Window level and not at the control level.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions