System.Windows.Forms.Keys枚举器中的AltGr

时间:2021-09-16 21:10:13

Should be an easy one. What is the value of the AltGr key in the System.Windows.Forms.Keys enumerator?

应该是一个简单的。 System.Windows.Forms.Keys枚举器中AltGr键的值是多少?

I've looked through it and can't see anything obvious ('AltrGr' no, 'RAlt' no, 'GrAlt' no).

我仔细研究过,看不到任何明显的东西('AltrGr'不','RAlt'不,'GrAlt'没有)。

Thanks Simon

Updated - Answered:

更新 - 已回答:

if (ModifierKeys == ( Keys.Control | Keys.Alt ) )
{
    // AltGr is held down

3 个解决方案

#1


From my minimal research on Google, in Windows you can substitue Ctrl + Alt to get the equivalent of the AltGr key. I don't think new keyboards have that key anymore.

根据我对谷歌的最小研究,在Windows中你可以用Ctrl + Alt代替AltGr键。我认为新的键盘不再具有该键。

Chris

#2


Most keyboards do still include this key.

大多数键盘仍然包含此键。

You're looking for RMenu.

你在找RMenu。

MSDN description:

The right ALT key.

正确的ALT键。

#3


Virtual key codes

虚拟密钥代码

VK_LMENU 0xA4 Left ALT

VK_LMENU 0xA4左ALT

VK_RMENU 0xA5 Right ALT

VK_RMENU 0xA5右ALT

#1


From my minimal research on Google, in Windows you can substitue Ctrl + Alt to get the equivalent of the AltGr key. I don't think new keyboards have that key anymore.

根据我对谷歌的最小研究,在Windows中你可以用Ctrl + Alt代替AltGr键。我认为新的键盘不再具有该键。

Chris

#2


Most keyboards do still include this key.

大多数键盘仍然包含此键。

You're looking for RMenu.

你在找RMenu。

MSDN description:

The right ALT key.

正确的ALT键。

#3


Virtual key codes

虚拟密钥代码

VK_LMENU 0xA4 Left ALT

VK_LMENU 0xA4左ALT

VK_RMENU 0xA5 Right ALT

VK_RMENU 0xA5右ALT