Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不想使用画布或虚拟键盘,只需在按下 key_A 时触发一个事件,在释放时触发另一个事件。
我查看了UIElement.keydown,但它似乎只适用于屏幕键
使用Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown;应该可以工作。
Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown;