O'Reilly logo

.NET Windows Forms in a Nutshell by Matthew Adams, Ian Griffiths

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Keys

Synopsis

This enumeration lists all the raw key values. The enumeration sports the FlagsAttribute, and you can therefore combine the key codes in a bitwise manner to indicate multiple keys pressed simultaneously. In particular, this supports modifier keys such as CTRL, SHIFT, and ALT.


public enum Keys {

   None = 0x00000000,

   LButton = 0x00000001,

   RButton = 0x00000002,

   Cancel = 0x00000003,

   MButton = 0x00000004,

   XButton1 = 0x00000005,

   XButton2 = 0x00000006,

   Back = 0x00000008,

   Tab = 0x00000009,

   LineFeed = 0x0000000A,

   Clear = 0x0000000C,

   Return = 0x0000000D,

   Enter = 0x0000000D,

   ShiftKey = 0x00000010,

   ControlKey = 0x00000011,

   Menu = 0x00000012,

   Pause = 0x00000013,

   CapsLock = 0x00000014,

   Capital = 0x00000014,

   KanaMode = 0x00000015,

   HanguelMode = 0x00000015,

   HangulMode = 0x00000015,

   JunjaMode = 0x00000017,

   FinalMode = 0x00000018,

   KanjiMode = 0x00000019,

   HanjaMode = 0x00000019,

   Escape = 0x0000001B,

   IMEConvert = 0x0000001C,

   IMENonconvert = 0x0000001D,

   IMEAceept = 0x0000001E,

   IMEModeChange = 0x0000001F,

   Space = 0x00000020,

   PageUp = 0x00000021,

   Prior = 0x00000021,

   PageDown = 0x00000022,

   Next = 0x00000022,

   End = 0x00000023,

   Home = 0x00000024,

   Left = 0x00000025,

   Up = 0x00000026,

   Right = 0x00000027,

   Down = 0x00000028,

   Select = 0x00000029,

   Print = 0x0000002A,

   Execute = 0x0000002B,

   PrintScreen = 0x0000002C,

   Snapshot = 0x0000002C,

   Insert = 0x0000002D,

   Delete = 0x0000002E,

   Help = 0x0000002F,

   D0 = 0x00000030,

   D1 = 0x00000031,

   D2 = 0x00000032,

   D3 = 0x00000033,

   D4 = 0x00000034,

   D5 = 0x00000035 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required