Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AltGr in System.Windows.Forms.Keys enumerator

Tags:

c#

.net

winforms

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

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

Updated - Answered:

if (ModifierKeys == ( Keys.Control | Keys.Alt ) )
{
    // AltGr is held down
}
like image 383
Simon Hutton Avatar asked Nov 20 '25 00:11

Simon Hutton


2 Answers

Most keyboards do still include this key.

You're looking for RMenu.

MSDN description:

The right ALT key.

like image 72
Taran Avatar answered Nov 22 '25 16:11

Taran


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.

Chris

like image 34
Chris Dunaway Avatar answered Nov 22 '25 16:11

Chris Dunaway