alt键的关键代码是什么 [英] what is the key code of alt key

查看:48
本文介绍了alt键的关键代码是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道alt键的ascii值

解决方案

ALT键没有ASCII值:它是修饰键而不是不影响ASCII值。



如果你想知道是否按下了ALT键,请在Winforms中使用Control.Keys:



  if ((Control.ModifierKeys& Keys.Alt)!=  0 
{
MessageBox.Show( AltDown);
}

在网络中,你根本无法分辨 - 它不会离开浏览器(终端设备甚至可能没有ALT键)。


alt键没有ASCII表示。它是一个虚拟密钥代码,它们实际上并不对应任何字符。阅读 [ ^ ]文章了解更多信息。


检查这个。





http://msdn.microsoft.com/en-us/library/system.windows.forms。 keyeventargs.alt.aspx [ ^ ]


i would like to know the ascii value of alt key

解决方案

The ALT key does not have an ASCII value: it is a modifier key and doesn't not affect ASCII values.

If you want to know if the ALT key is pressed, use Control.Keys in Winforms:

if ((Control.ModifierKeys & Keys.Alt) != 0)
    {
    MessageBox.Show("AltDown");
    }

In web, you can't tell at all - it does not leave the browser (and the end equipment may not even have an ALT key).


The alt key doesn't have an ASCII representation. It's a virtual key code, and they don't actually correspond to any characters. Have a read of this[^] article for more information.


Check this.


http://msdn.microsoft.com/en-us/library/system.windows.forms.keyeventargs.alt.aspx[^]


这篇关于alt键的关键代码是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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