如何检测ALT键? [英] How do I detect ALT key?

查看:253
本文介绍了如何检测ALT键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C ++编写Metro App。我正在捕获CoreWindow对象的KeyDown和KeyUp事件。如果将键与ALT键组合使用,则似乎不会触发这些事件。

I am writing a Metro App in C++. I am capturing the KeyDown and KeyUp events of the CoreWindow object. These events do not appear to be triggered if key is pressed in combination with the ALT key.

有没有办法检测ALT按键。是自己还是与其他键组合使用?

Is there any way to detect ALT key presses. Either on own or in combination with other keys?

谢谢,

劳尔

推荐答案

您可以参考以下文档:

You can refer to following document:

http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh868246 (v = win.10).aspx

Alt键由 VirtualKey.Menu 值表示,但目前不支持此值使用C ++,C#或Visual Basic的Metro风格应用程序。

The Alt key is represented by the VirtualKey.Menu value, but this value is not currently supported by Metro style apps using C++, C#, or Visual Basic.

最好的问候,

Han Xia


这篇关于如何检测ALT键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆