Win Daemon


Virtual Key Codes

Windows defines special constants for each keyboard key that can be pressed. The following table shows the symbolic constant names, hexadecimal values, decimal values, and mouse or keyboard equivalents for the virtual-key codes used by Windows and WinDaemon (which restarts an application if it crashes). The codes are listed in numeric order.

  Virtual Key     Hex     Decimal     Comment  
 VK_LBUTTON  0x01    1  Left mouse button
 VK_RBUTTON  0x02    2  Right mouse button
 VK_CANCEL  0x03    3  Control-break
 VK_MBUTTON  0x04    4  Middle mouse button. NOT contiguous with L & R BUTTON 
 VK_XBUTTON1  0x05    5  Windows 2000 and later: X1 mouse button. NOT contiguous with L & R BUTTON 
 VK_XBUTTON2  0x06    6  Windows 2000 and later: X2 mouse button. NOT contiguous with L & R BUTTON
 VK_BACK  0x08    8  BACKSPACE key
 VK_TAB  0x09    9  TAB key
 VK_CLEAR  0x0C  12  CLEAR key
 VK_RETURN  0x0D  13  ENTER KEY
 VK_SHIFT  0x10  16  SHIFT key
 VK_CONTROL  0x11  17  CONTROL (Ctrl) Key
 VK_MENU  0x12  18  ALT key
 VK_PAUSE  0x13  19  PAUSE key
 VK_CAPITAL  0x14  20  CAPS LOCK key
 VK_KANA  0x15  21  Input Method Editor (IME) Kana mode
 VK_HANGEUL  0x15  21  Old name - only here for compatibility (see VK_HANGUL) 
 VK_HANGUL  0x15  21  IME Hangul mode
 VK_JUNJA  0x17  23  IME Junja mode
 VK_FINAL  0x18  24  IME final mode
 VK_HANJA  0x19  25  IME Hanja mode
 VK_KANJI  0x19  25  IME Kanji mode
 VK_ESCAPE  0x1B  27  ESC key
 VK_CONVERT  0x1C  28  IME convert
 VK_NONCONVERT  0x1D  29  IME nonconvert
 VK_ACCEPT  0x1E  30  IME accept
 VK_MODECHANGE  0x1F  31  IME mode change request
 VK_SPACE  0x20  32  SPACEBAR key
 VK_PRIOR  0x21  33  PAGE UP key
 VK_NEXT  0x22  34  PAGE DOWN key
 VK_END  0x23  35  END key
 VK_HOME  0x24  36  HOME key
 VK_LEFT  0x25  37  LEFT ARROW key
 VK_UP  0x26  38  UP ARROW key
 VK_RIGHT  0x27  39  RIGHT ARROW key
 VK_DOWN  0x28  40  DOWN ARROW key
 VK_SELECT  0x29  41  SELECT key
 VK_PRINT  0x2A  42  PRINT key
 VK_EXECUTE  0x2B  43  EXECUTE key
 VK_SNAPSHOT  0x2C  44  PRINT SCREEN key
 VK_INSERT  0x2D  45  INSERT (INS) key
 VK_DELETE  0x2E  46  DELETE (DEL) key
 VK_HELP  0x2F  47  HELP key
   0x30 through 0x39  48 through 57  Numbers from 0 through 9
   0x41 through 0x5A  65 through 90  Letters from A through Z
 VK_LWIN  0x5B  91  Left Windows key
 VK_RWIN  0x5C  92  Right Windows key
 VK_APPS  0x5D  93  Applications key
 VK_SLEEP  0x5F  95  Computer Sleep key
 VK_NUMPAD0  0x60  96  Numeric keypad 0 key
 VK_NUMPAD1  0x61  97  
 VK_NUMPAD2  0x62  98  
 VK_NUMPAD3  0x63  99  
 VK_NUMPAD4  0x64  100  
 VK_NUMPAD5  0x65  101  
 VK_NUMPAD6  0x66  102  
 VK_NUMPAD7  0x67  103  
 VK_NUMPAD8  0x68  104  
 VK_NUMPAD9  0x69  105  
 VK_MULTIPLY  0x6A  106  Multiply (*) key
 VK_ADD  0x6B  107  Add (+) key
 VK_SEPARATOR  0x6C  108  Numpad ENTER(?)
 VK_SUBTRACT  0x6D  109  Subtract (-) key
 VK_DECIMAL  0x6E  110  Decimal (.) key
 VK_DIVIDE  0x6F  111  Divide (/) key
 VK_F1  0x70  112  
 VK_F2  0x71  113  
 VK_F3  0x72  114  
 VK_F4  0x73  115  
 VK_F5  0x74  116  
 VK_F6  0x75  117  
 VK_F7  0x76  118  
 VK_F8  0x77  119  
 VK_F9  0x78  120  
 VK_F10  0x79  121  
 VK_F11  0x7A  122  
 VK_F12  0x7B  123  
 VK_F13  0x7C  124  
 VK_F14  0x7D  125  
 VK_F15  0x7E  126  
 VK_F16  0x7F  127  
 VK_F17  0x80  128  
 VK_F18  0x81  129  
 VK_F19  0x82  130  
 VK_F20  0x83  131  
 VK_F21  0x84  132  
 VK_F22  0x85  133  
 VK_F23  0x86  134  
 VK_F24  0x87  135  
 VK_NUMLOCK  0x90  144  NUM LOCK key
 VK_SCROLL  0x91  145  SCROLL LOCK key
 VK_OEM_NEC_EQUAL   0x92   146  '=' key on numpad 
 VK_LSHIFT  0xA0  160  Left SHIFT key
 VK_RSHIFT   0xA1   161  Right SHIFT key 
 VK_LCONTROL   0xA2   162  Left CONTROL key 
 VK_RCONTROL   0xA3   163  Right CONTROL key 
 VK_LMENU   0xA4   164  Left MENU key
 VK_RMENU   0xA5   165  Right MENU key
 VK_BROWSER_BACK   0xA6   166  Windows 2000 and later: Browser Back key
 VK_BROWSER_FORWARD   0xA7   167  Windows 2000 and later: Browser Forward key
 VK_BROWSER_REFRESH   0xA8   168  Windows 2000 and later: Browser Refresh key
 VK_BROWSER_STOP   0xA9   169  Windows 2000 and later: Browser Stop key
 VK_BROWSER_SEARCH   0xAA   170  Windows 2000 and later: Browser Search key
 VK_BROWSER_FAVORITES   0xAB   171  Windows 2000 and later: Browser Favorites key
 VK_BROWSER_HOME   0xAC   172  Windows 2000 and later: Browser Start and Home key
 VK_VOLUME_MUTE   0xAD   173  Windows 2000 and later: Volume Mute key
 VK_VOLUME_DOWN   0xAE   174  Windows 2000 and later: Volume Down key
 VK_VOLUME_UP   0xAF   175  Windows 2000 and later: Volume Up key
 VK_MEDIA_NEXT_TRACK   0xB0   176  Windows 2000 and later: Next Track key
 VK_MEDIA_PREV_TRACK   0xB1   177  Windows 2000 and later: Previous Track key
 VK_MEDIA_STOP   0xB2   178  Windows 2000 and later: Stop Media key
 VK_MEDIA_PLAY_PAUSE   0xB3   179  Windows 2000 and later: Play/Pause Media key
 VK_LAUNCH_MAIL   0xB4   180  Windows 2000 and later: Open Mail program key
 VK_LAUNCH_MEDIA_SELECT   0xB5   181  Windows 2000 and later: Select Media key
 VK_LAUNCH_APP1   0xB6   182  Windows 2000 and later: Start Application 1 key
 VK_LAUNCH_APP2    0xB7   183  Windows 2000 and later: Start Application 2 key
 VK_OEM_1   0xBA   186  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 or later: For the US standard keyboard, the ';:' key
 VK_OEM_PLUS   0xBB   187  + (plus key)
 VK_OEM_COMMA   0xBC   188  , (comma)
 VK_OEM_MINUS   0xBD   189  - (minus)
 VK_OEM_PERIOD   0xBE   190  . (period)
 VK_OEM_2   0xBF   191  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 and later: For the US standard keyboard, the '/?' key
 VK_OEM_3   0xC0   192  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 and later: For the US standard keyboard, the '`~' key
 VK_OEM_4   0xDB   219  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 and later: For the US standard keyboard, the '[{' key
 VK_OEM_5   0xDC   220  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 and later: For the US standard keyboard, the '\|' key
 VK_OEM_6   0xDD   221  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 and later: For the US standard keyboard, the ']}' key
 VK_OEM_7   0xDE   222  Used for miscellaneous characters; it can vary by keyboard.
 Windows 2000 and later: For the US standard keyboard, the 'single-quote/double-quote' key
 VK_OEM_8   0xDF   223  Used for miscellaneous characters; it can vary by keyboard.
 VK_OEM_AX   0xE1   227  Varies by keyboard.
 AX key on Japanese AX keyboard
 VK_OEM_102   0xE2   226  Windows 2000 and later: Either the angle bracket key '<>' or the backslash key '\|' on the RT 102-key keyboard
    0xE3-E4   227-228  Varies by keyboard.
 VK_PROCESSKEY   0xE5   229  IME PROCESS key
    0xE6   230  Varies by keyboard.
 VK_PACKET   0xE7   231  Windows 2000 and later: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. Not supported in WinDaemon.
    0xE9-F5   233-245  Varies by keyboard.
 VK_ATTN   0xF6   246  Attn key
 VK_CRSEL   0xF7   247  CrSel key
 VK_EXSEL   0xF8   248  ExSel key
 VK_EREOF   0xF9   249  Erase EOF key
 VK_PLAY   0xFA   250  Play key
 VK_ZOOM   0xFB   251  Zoom key
 VK_NONAME   0xFC   252  Reserved for future use
 VK_PA1   0xFD   253  PA1 key
 VK_OEM_CLEAR   0xFE   254  Clear key
 
       Home | FAQ | Changes | Help | License | Privacy Policy | Contact Us

     Copyright 2004-2008 BC&P. All rights reserved.