Advertisement
Guest User

Untitled

a guest
Aug 12th, 2013
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 18.63 KB | None | 0 0
  1. using System;
  2. using System.Diagnostics;
  3. using System.Windows.Forms;
  4. using System.Runtime.InteropServices;
  5.  
  6. class InterceptKeys {
  7.     private const int WH_KEYBOARD_LL = 13;
  8.     private const int WH_MOUSE_LL = 14;
  9.     private static LowLevelProc _procKB = KBHookCallback;
  10.     private static LowLevelProc _procMS = MSHookCallback;
  11.     private static IntPtr _hookIDKB = IntPtr.Zero;
  12.     private static IntPtr _hookIDMS = IntPtr.Zero;
  13.     private const int HWND_TOPMOST = -1;
  14.     private const int SWP_NOMOVE = 0x0002;
  15.     private const int SWP_NOSIZE = 0x0001;
  16.  
  17.     [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  18.     private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelProc lpfn, IntPtr hMod, uint dwThreadId);
  19.  
  20.     [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  21.     [return: MarshalAs(UnmanagedType.Bool)]
  22.     private static extern bool UnhookWindowsHookEx(IntPtr hhk);
  23.  
  24.     [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  25.     private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);
  26.  
  27.     [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  28.     private static extern IntPtr GetModuleHandle(string lpModuleName);
  29.  
  30.     [DllImport("user32.dll", SetLastError = true)]
  31.     [return: MarshalAs(UnmanagedType.Bool)]
  32.     private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int uFlags);
  33.  
  34.  
  35.     public static void Main() {
  36.         _hookIDKB = SetKeyboardHook(_procKB);
  37.         _hookIDMS = SetMouseHook(_procMS);
  38.  
  39.         IntPtr hWnd = Process.GetCurrentProcess().MainWindowHandle;
  40.         SetWindowPos(hWnd, new IntPtr(HWND_TOPMOST), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
  41.  
  42.         Application.Run();
  43.  
  44.         UnhookWindowsHookEx(_hookIDKB);
  45.         UnhookWindowsHookEx(_hookIDMS);
  46.     }
  47.  
  48.     private static IntPtr SetKeyboardHook(LowLevelProc proc) {
  49.         using (Process curProcess = Process.GetCurrentProcess())
  50.         using (ProcessModule curModule = curProcess.MainModule) {
  51.             return SetWindowsHookEx(WH_KEYBOARD_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
  52.         }
  53.     }
  54.  
  55.     private static IntPtr SetMouseHook(LowLevelProc proc) {
  56.         using (Process curProcess = Process.GetCurrentProcess())
  57.         using (ProcessModule curModule = curProcess.MainModule) {
  58.             return SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
  59.         }
  60.     }
  61.  
  62.     private delegate IntPtr LowLevelProc(int nCode, IntPtr wParam, IntPtr lParam);
  63.  
  64.     private static IntPtr MSHookCallback(int nCode, IntPtr wParam, IntPtr lParam) {
  65.         if (nCode >= 0 && wParam.ToInt32() != 0x0200) {
  66.             MSLLHOOKSTRUCT hookStruct = (MSLLHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(MSLLHOOKSTRUCT));
  67.             Console.WriteLine(DateTime.Now.Ticks.ToString() + " " + (MouseMessages)wParam + " @ [" + hookStruct.pt.x + ", " + hookStruct.pt.y + "]");
  68.         }
  69.         return CallNextHookEx(_hookIDKB, nCode, wParam, lParam);
  70.     }
  71.  
  72.     private static IntPtr KBHookCallback(int nCode, IntPtr wParam, IntPtr lParam) {
  73.         if (nCode >= 0) {
  74.             int vkCode = Marshal.ReadInt32(lParam);
  75.             Console.WriteLine(DateTime.Now.Ticks.ToString() + ' ' + (VirtualKeys)vkCode + " (0x" + vkCode.ToString("X").PadLeft(2, '0') + ") - " + (KeyboardMessages)wParam);
  76.         }
  77.         return CallNextHookEx(_hookIDKB, nCode, wParam, lParam);
  78.     }
  79.  
  80.     private enum KeyboardMessages {
  81.         WM_KEYDOWN = 0x0100,
  82.         WM_KEYUP = 0x0101,
  83.         WM_SYSKEYDOWN = 0x0104,
  84.         WM_SYSKEYUP = 0x0105
  85.     }
  86.  
  87.     private enum MouseMessages {
  88.         WM_MOUSEMOVE = 0x0200,
  89.         WM_LBUTTONDOWN = 0x0201,
  90.         WM_LBUTTONUP = 0x0202,
  91.         WM_LBUTTONDBLCLK = 0x0203,
  92.         WM_RBUTTONDOWN = 0x0204,
  93.         WM_RBUTTONUP = 0x0205,
  94.         WM_RBUTTONDBLCLK = 0x0206,
  95.         WM_MBUTTONDOWN = 0x0207,
  96.         WM_MBUTTONUP = 0x0208,
  97.         WM_MOUSEWHEEL = 0x020A,
  98.         WM_XBUTTONDOWN = 0x020B,
  99.         WM_XBUTTONUP = 0x020C,
  100.         WM_XBUTTONDBLCLK = 0x020D,
  101.         WM_MOUSEHWHEEL = 0x020E,
  102.     }
  103.  
  104.     [StructLayout(LayoutKind.Sequential)]
  105.     private struct POINT {
  106.         public int x;
  107.         public int y;
  108.     }
  109.  
  110.     [StructLayout(LayoutKind.Sequential)]
  111.     private struct MSLLHOOKSTRUCT {
  112.         public POINT pt;
  113.         public uint mouseData;
  114.         public uint flags;
  115.         public uint time;
  116.         public IntPtr dwExtraInfo;
  117.     }
  118.  
  119.     public enum VirtualKeys {
  120.  
  121.         // // UNASSIGNED // = &HFFFF0000    ' // [Modifiers] = -65536
  122.         // // UNASSIGNED // = &H0    ' // [None] = 000
  123.  
  124.         VK_LBUTTON = 0x1,
  125.         // // [LButton] = 001
  126.         VK_RBUTTON = 0x2,
  127.         // // [RButton] = 002
  128.         VK_CANCEL = 0x3,
  129.         // // [Cancel] = 003
  130.         VK_MBUTTON = 0x4,
  131.         // // [MButton] = 004    ' NOT contiguous with L & RBUTTON
  132.         VK_XBUTTON1 = 0x5,
  133.         // // [XButton1] = 005   ' NOT contiguous with L & RBUTTON
  134.         VK_XBUTTON2 = 0x6,
  135.         // // [XButton2] = 006   ' NOT contiguous with L & RBUTTON
  136.         // // UNASSIGNED // = &H7    ' // ''UNASSIGNED = 007
  137.  
  138.         VK_BACK = 0x8,
  139.         // // [Back] = 008
  140.         VK_TAB = 0x9,
  141.         // // [Tab] = 009
  142.         // // RESERVED // = &HA        ' // [LineFeed] = 010
  143.         // // RESERVED // = &HB        ' // ''UNASSIGNED = 011
  144.         VK_CLEAR = 0xc,
  145.         // // [Clear] = 012
  146.         VK_RETURN = 0xd,
  147.         // // [Return] = 013
  148.         // // UNDEFINED //       ' // [Enter] = 013
  149.         VK_SHIFT = 0x10,
  150.         // // [ShiftKey] = 016
  151.         VK_CONTROL = 0x11,
  152.         // // [ControlKey] = 017
  153.         VK_MENU = 0x12,
  154.         // // [Menu] = 018
  155.         VK_PAUSE = 0x13,
  156.         // // [Pause] = 019
  157.         VK_CAPITAL = 0x14,
  158.         // // [Capital] = 020
  159.         // // UNDEFINED //       ' // [CapsLock] = 020
  160.  
  161.         VK_HANGUL = 0x15,
  162.         // // [HangulMode] = 021
  163.         VK_HANGEUL = 0x15,
  164.         // // [HanguelMode] = 021 ' old name (compatibility)
  165.         VK_KANA = 0x15,
  166.         // // [KanaMode] = 021
  167.         VK_JUNJA = 0x17,
  168.         // // [JunjaMode] = 023
  169.         VK_FINAL = 0x18,
  170.         // // [FinalMode] = 024
  171.         VK_KANJI = 0x19,
  172.         // // [KanjiMode] = 025
  173.         VK_HANJA = 0x19,
  174.         // // [HanjaMode] = 025
  175.  
  176.         VK_ESCAPE = 0x1b,
  177.         // // [Escape] = 027
  178.  
  179.         VK_CONVERT = 0x1c,
  180.         // // [IMEConvert] = 028
  181.         VK_NONCONVERT = 0x1d,
  182.         // // [IMENonconvert] = 029
  183.         VK_ACCEPT = 0x1e,
  184.         // // [IMEAccept] = 030
  185.         VK_MODECHANGE = 0x1f,
  186.         // // [IMEModeChange] = 031
  187.  
  188.         VK_SPACE = 0x20,
  189.         // // [Space] = 032
  190.         VK_PRIOR = 0x21,
  191.         // // [Prior] = 033
  192.         // // UNDEFINED //       ' // [PageUp] = 033
  193.         VK_NEXT = 0x22,
  194.         // // [Next] = 034
  195.         // // UNDEFINED //       ' // [PageDown] = 034
  196.         VK_END = 0x23,
  197.         // // [End] = 035
  198.         VK_HOME = 0x24,
  199.         // // [Home] = 036
  200.  
  201.         VK_LEFT = 0x25,
  202.         // // [Left] = 037
  203.         VK_UP = 0x26,
  204.         // // [Up] = 038
  205.         VK_RIGHT = 0x27,
  206.         // // [Right] = 039
  207.         VK_DOWN = 0x28,
  208.         // // [Down] = 040
  209.  
  210.         VK_SELECT = 0x29,
  211.         // // [Select] = 041
  212.         VK_PRINT = 0x2a,
  213.         // // [Print] = 042
  214.         VK_EXECUTE = 0x2b,
  215.         // // [Execute] = 043
  216.         VK_SNAPSHOT = 0x2c,
  217.         // // [Snapshot] = 044
  218.         // // UNDEFINED //       ' // [PrintScreen] = 044
  219.         VK_INSERT = 0x2d,
  220.         // // [Insert] = 045
  221.         VK_DELETE = 0x2e,
  222.         // // [Delete] = 046
  223.         VK_HELP = 0x2f,
  224.         // // [Help] = 047
  225.  
  226.         VK_0 = 0x30,
  227.         // // [D0] = 048
  228.         VK_1 = 0x31,
  229.         // // [D1] = 049
  230.         VK_2 = 0x32,
  231.         // // [D2] = 050
  232.         VK_3 = 0x33,
  233.         // // [D3] = 051
  234.         VK_4 = 0x34,
  235.         // // [D4] = 052
  236.         VK_5 = 0x35,
  237.         // // [D5] = 053
  238.         VK_6 = 0x36,
  239.         // // [D6] = 054
  240.         VK_7 = 0x37,
  241.         // // [D7] = 055
  242.         VK_8 = 0x38,
  243.         // // [D8] = 056
  244.         VK_9 = 0x39,
  245.         // // [D9] = 057
  246.  
  247.         // // UNASSIGNED // = &H40 to &H4F (058 to 064)
  248.  
  249.         VK_A = 0x41,
  250.         // // [A] = 065
  251.         VK_B = 0x42,
  252.         // // [B] = 066
  253.         VK_C = 0x43,
  254.         // // [C] = 067
  255.         VK_D = 0x44,
  256.         // // [D] = 068
  257.         VK_E = 0x45,
  258.         // // [E] = 069
  259.         VK_F = 0x46,
  260.         // // [F] = 070
  261.         VK_G = 0x47,
  262.         // // [G] = 071
  263.         VK_H = 0x48,
  264.         // // [H] = 072
  265.         VK_I = 0x49,
  266.         // // [I] = 073
  267.         VK_J = 0x4a,
  268.         // // [J] = 074
  269.         VK_K = 0x4b,
  270.         // // [K] = 075
  271.         VK_L = 0x4c,
  272.         // // [L] = 076
  273.         VK_M = 0x4d,
  274.         // // [M] = 077
  275.         VK_N = 0x4e,
  276.         // // [N] = 078
  277.         VK_O = 0x4f,
  278.         // // [O] = 079
  279.         VK_P = 0x50,
  280.         // // [P] = 080
  281.         VK_Q = 0x51,
  282.         // // [Q] = 081
  283.         VK_R = 0x52,
  284.         // // [R] = 082
  285.         VK_S = 0x53,
  286.         // // [S] = 083
  287.         VK_T = 0x54,
  288.         // // [T] = 084
  289.         VK_U = 0x55,
  290.         // // [U] = 085
  291.         VK_V = 0x56,
  292.         // // [V] = 086
  293.         VK_W = 0x57,
  294.         // // [W] = 087
  295.         VK_X = 0x58,
  296.         // // [X] = 088
  297.         VK_Y = 0x59,
  298.         // // [Y] = 089
  299.         VK_Z = 0x5a,
  300.         // // [Z] = 090
  301.  
  302.         VK_LWIN = 0x5b,
  303.         // // [LWin] = 091
  304.         VK_RWIN = 0x5c,
  305.         // // [RWin] = 092
  306.         VK_APPS = 0x5d,
  307.         // // [Apps] = 093
  308.         // // RESERVED // = &H5E        ' // ''UNASSIGNED = 094
  309.         VK_SLEEP = 0x5f,
  310.         // // [Sleep] = 095
  311.  
  312.         VK_NUMPAD0 = 0x60,
  313.         // // [NumPad0] = 096
  314.         VK_NUMPAD1 = 0x61,
  315.         // // [NumPad1] = 097
  316.         VK_NUMPAD2 = 0x62,
  317.         // // [NumPad2] = 098
  318.         VK_NUMPAD3 = 0x63,
  319.         // // [NumPad3] = 099
  320.         VK_NUMPAD4 = 0x64,
  321.         // // [NumPad4] = 100
  322.         VK_NUMPAD5 = 0x65,
  323.         // // [NumPad5] = 101
  324.         VK_NUMPAD6 = 0x66,
  325.         // // [NumPad6] = 102
  326.         VK_NUMPAD7 = 0x67,
  327.         // // [NumPad7] = 103
  328.         VK_NUMPAD8 = 0x68,
  329.         // // [NumPad8] = 104
  330.         VK_NUMPAD9 = 0x69,
  331.         // // [NumPad9] = 105
  332.  
  333.         VK_MULTIPLY = 0x6a,
  334.         // // [Multiply] = 106
  335.         VK_ADD = 0x6b,
  336.         // // [Add] = 107
  337.         VK_SEPARATOR = 0x6c,
  338.         // // [Separator] = 108
  339.         VK_SUBTRACT = 0x6d,
  340.         // // [Subtract] = 109
  341.         VK_DECIMAL = 0x6e,
  342.         // // [Decimal] = 110
  343.         VK_DIVIDE = 0x6f,
  344.         // // [Divide] = 111
  345.  
  346.         VK_F1 = 0x70,
  347.         // // [F1] = 112
  348.         VK_F2 = 0x71,
  349.         // // [F2] = 113
  350.         VK_F3 = 0x72,
  351.         // // [F3] = 114
  352.         VK_F4 = 0x73,
  353.         // // [F4] = 115
  354.         VK_F5 = 0x74,
  355.         // // [F5] = 116
  356.         VK_F6 = 0x75,
  357.         // // [F6] = 117
  358.         VK_F7 = 0x76,
  359.         // // [F7] = 118
  360.         VK_F8 = 0x77,
  361.         // // [F8] = 119
  362.         VK_F9 = 0x78,
  363.         // // [F9] = 120
  364.         VK_F10 = 0x79,
  365.         // // [F10] = 121
  366.         VK_F11 = 0x7a,
  367.         // // [F11] = 122
  368.         VK_F12 = 0x7b,
  369.         // // [F12] = 123
  370.  
  371.         VK_F13 = 0x7c,
  372.         // // [F13] = 124
  373.         VK_F14 = 0x7d,
  374.         // // [F14] = 125
  375.         VK_F15 = 0x7e,
  376.         // // [F15] = 126
  377.         VK_F16 = 0x7f,
  378.         // // [F16] = 127
  379.         VK_F17 = 0x80,
  380.         // // [F17] = 128
  381.         VK_F18 = 0x81,
  382.         // // [F18] = 129
  383.         VK_F19 = 0x82,
  384.         // // [F19] = 130
  385.         VK_F20 = 0x83,
  386.         // // [F20] = 131
  387.         VK_F21 = 0x84,
  388.         // // [F21] = 132
  389.         VK_F22 = 0x85,
  390.         // // [F22] = 133
  391.         VK_F23 = 0x86,
  392.         // // [F23] = 134
  393.         VK_F24 = 0x87,
  394.         // // [F24] = 135
  395.  
  396.         // // UNASSIGNED // = &H88 to &H8F (136 to 143)
  397.  
  398.         VK_NUMLOCK = 0x90,
  399.         // // [NumLock] = 144
  400.         VK_SCROLL = 0x91,
  401.         // // [Scroll] = 145
  402.  
  403.         VK_OEM_NEC_EQUAL = 0x92,
  404.         // // [NEC_Equal] = 146    ' NEC PC-9800 kbd definitions "=" key on numpad
  405.         VK_OEM_FJ_JISHO = 0x92,
  406.         // // [Fujitsu_Masshou] = 146    ' Fujitsu/OASYS kbd definitions "Dictionary" key
  407.         VK_OEM_FJ_MASSHOU = 0x93,
  408.         // // [Fujitsu_Masshou] = 147    ' Fujitsu/OASYS kbd definitions "Unregister word" key
  409.         VK_OEM_FJ_TOUROKU = 0x94,
  410.         // // [Fujitsu_Touroku] = 148    ' Fujitsu/OASYS kbd definitions "Register word" key  
  411.         VK_OEM_FJ_LOYA = 0x95,
  412.         // // [Fujitsu_Loya] = 149    ' Fujitsu/OASYS kbd definitions "Left OYAYUBI" key
  413.         VK_OEM_FJ_ROYA = 0x96,
  414.         // // [Fujitsu_Roya] = 150    ' Fujitsu/OASYS kbd definitions "Right OYAYUBI" key
  415.  
  416.         // // UNASSIGNED // = &H97 to &H9F (151 to 159)
  417.  
  418.         // NOTE :: &HA0 to &HA5 (160 to 165) = left and right Alt, Ctrl and Shift virtual keys.
  419.         // NOTE :: Used only as parameters to GetAsyncKeyState() and GetKeyState().
  420.         // NOTE :: No other API or message will distinguish left and right keys in this way.
  421.         VK_LSHIFT = 0xa0,
  422.         // // [LShiftKey] = 160
  423.         VK_RSHIFT = 0xa1,
  424.         // // [RShiftKey] = 161
  425.         VK_LCONTROL = 0xa2,
  426.         // // [LControlKey] = 162
  427.         VK_RCONTROL = 0xa3,
  428.         // // [RControlKey] = 163
  429.         VK_LMENU = 0xa4,
  430.         // // [LMenu] = 164
  431.         VK_RMENU = 0xa5,
  432.         // // [RMenu] = 165
  433.  
  434.         VK_BROWSER_BACK = 0xa6,
  435.         // // [BrowserBack] = 166
  436.         VK_BROWSER_FORWARD = 0xa7,
  437.         // // [BrowserForward] = 167
  438.         VK_BROWSER_REFRESH = 0xa8,
  439.         // // [BrowserRefresh] = 168
  440.         VK_BROWSER_STOP = 0xa9,
  441.         // // [BrowserStop] = 169
  442.         VK_BROWSER_SEARCH = 0xaa,
  443.         // // [BrowserSearch] = 170
  444.         VK_BROWSER_FAVORITES = 0xab,
  445.         // // [BrowserFavorites] = 171
  446.         VK_BROWSER_HOME = 0xac,
  447.         // // [BrowserHome] = 172
  448.  
  449.         VK_VOLUME_MUTE = 0xad,
  450.         // // [VolumeMute] = 173
  451.         VK_VOLUME_DOWN = 0xae,
  452.         // // [VolumeDown] = 174
  453.         VK_VOLUME_UP = 0xaf,
  454.         // // [VolumeUp] = 175
  455.  
  456.         VK_MEDIA_NEXT_TRACK = 0xb0,
  457.         // // [MediaNextTrack] = 176
  458.         VK_MEDIA_PREV_TRACK = 0xb1,
  459.         // // [MediaPreviousTrack] = 177
  460.         VK_MEDIA_STOP = 0xb2,
  461.         // // [MediaStop] = 178
  462.         VK_MEDIA_PLAY_PAUSE = 0xb3,
  463.         // // [MediaPlayPause] = 179
  464.  
  465.         VK_LAUNCH_MAIL = 0xb4,
  466.         // // [LaunchMail] = 180
  467.         VK_LAUNCH_MEDIA_SELECT = 0xb5,
  468.         // // [SelectMedia] = 181
  469.         VK_LAUNCH_APP1 = 0xb6,
  470.         // // [LaunchApplication1] = 182
  471.         VK_LAUNCH_APP2 = 0xb7,
  472.         // // [LaunchApplication2] = 183
  473.         // // UNASSIGNED // = &HB8   ' // ''UNASSIGNED = 184
  474.         // // UNASSIGNED // = &HB9   ' // ''UNASSIGNED = 185
  475.  
  476.         VK_OEM_1 = 0xba,
  477.         // // [Oem1] = 186           ' ";:" for USA
  478.         // // UNDEFINED //       ' // [OemSemicolon] = 186       ' ";:" for USA
  479.         VK_OEM_PLUS = 0xbb,
  480.         // // [Oemplus] = 187        ' "+" any country
  481.         VK_OEM_COMMA = 0xbc,
  482.         // // [Oemcomma] = 188       ' "," any country
  483.         VK_OEM_MINUS = 0xbd,
  484.         // // [OemMinus] = 189       ' "-" any country
  485.         VK_OEM_PERIOD = 0xbe,
  486.         // // [OemPeriod] = 190      ' "." any country
  487.         VK_OEM_2 = 0xbf,
  488.         // // [Oem2] = 191           ' "/?" for USA
  489.         // // UNDEFINED //       ' // [OemQuestion] = 191    ' "/?" for USA
  490.         // // UNDEFINED //       ' // [Oemtilde] = 192       ' "'~" for USA
  491.         VK_OEM_3 = 0xc0,
  492.         // // [Oem3] = 192           ' "'~" for USA
  493.  
  494.         // // RESERVED // = &HC1 to &HD7 (193 to 215)
  495.         // // UNASSIGNED // = &HD8 to &HDA (216 to 218)
  496.  
  497.         VK_OEM_4 = 0xdb,
  498.         // // [Oem4] = 219           ' "[{" for USA
  499.         // // UNDEFINED //       ' // [OemOpenBrackets] = 219    ' "[{" for USA
  500.         // // UNDEFINED //       ' // [OemPipe] = 220        ' "\|" for USA
  501.         VK_OEM_5 = 0xdc,
  502.         // // [Oem5] = 220           ' "\|" for USA
  503.         VK_OEM_6 = 0xdd,
  504.         // // [Oem6] = 221           ' "]}" for USA
  505.         // // UNDEFINED //       ' // [OemCloseBrackets] = 221   ' "]}" for USA
  506.         // // UNDEFINED //       ' // [OemQuotes] = 222      ' "'"" for USA
  507.         VK_OEM_7 = 0xde,
  508.         // // [Oem7] = 222           ' "'"" for USA
  509.         VK_OEM_8 = 0xdf,
  510.         // // [Oem8] = 223
  511.  
  512.         // // RESERVED // = &HE0        ' // ''UNASSIGNED = 224
  513.         VK_OEM_AX = 0xe1,
  514.         // // [OEMAX] = 225          ' "AX" key on Japanese AX kbd
  515.         // // UNDEFINED //       ' // [OemBackslash] = 226       ' "<>" or "\|" on RT 102-key kbd
  516.         VK_OEM_102 = 0xe2,
  517.         // // [Oem102] = 226         ' "<>" or "\|" on RT 102-key kbd
  518.         VK_ICO_HELP = 0xe3,
  519.         // // [ICOHelp] = 227        ' Help key on ICO
  520.         VK_ICO_00 = 0xe4,
  521.         // // [ICO00] = 228          ' 00 key on ICO
  522.  
  523.         VK_PROCESSKEY = 0xe5,
  524.         // // [ProcessKey] = 229
  525.         VK_ICO_CLEAR = 0xe6,
  526.         // // [ICOClear] = 230
  527.         VK_PACKET = 0xe7,
  528.         // // [Packet] = 231
  529.         // // UNASSIGNED // = &HE8   ' // ''UNASSIGNED = 232
  530.  
  531.         // NOTE :: Nokia/Ericsson definitions
  532.         VK_OEM_RESET = 0xe9,
  533.         // // [OEMReset] = 233
  534.         VK_OEM_JUMP = 0xea,
  535.         // // [OEMJump] = 234
  536.         VK_OEM_PA1 = 0xeb,
  537.         // // [OEMPA1] = 235
  538.         VK_OEM_PA2 = 0xec,
  539.         // // [OEMPA2] = 236
  540.         VK_OEM_PA3 = 0xed,
  541.         // // [OEMPA3] = 237
  542.         VK_OEM_WSCTRL = 0xee,
  543.         // // [OEMWSCtrl] = 238
  544.         VK_OEM_CUSEL = 0xef,
  545.         // // [OEMCUSel] = 239
  546.         VK_OEM_ATTN = 0xf0,
  547.         // // [OEMATTN] = 240
  548.         VK_OEM_FINISH = 0xf1,
  549.         // // [OEMFinish] = 241
  550.         VK_OEM_COPY = 0xf2,
  551.         // // [OEMCopy] = 242
  552.         VK_OEM_AUTO = 0xf3,
  553.         // // [OEMAuto] = 243
  554.         VK_OEM_ENLW = 0xf4,
  555.         // // [OEMENLW] = 244
  556.         VK_OEM_BACKTAB = 0xf5,
  557.         // // [OEMBackTab] = 245
  558.  
  559.         VK_ATTN = 0xf6,
  560.         // // [Attn] = 246
  561.         VK_CRSEL = 0xf7,
  562.         // // [Crsel] = 247
  563.         VK_EXSEL = 0xf8,
  564.         // // [Exsel] = 248
  565.         VK_EREOF = 0xf9,
  566.         // // [EraseEof] = 249
  567.         VK_PLAY = 0xfa,
  568.         // // [Play] = 250
  569.         VK_ZOOM = 0xfb,
  570.         // // [Zoom] = 251
  571.         VK_NONAME = 0xfc,
  572.         // // [NoName] = 252
  573.         VK_PA1 = 0xfd,
  574.         // // [Pa1] = 253
  575.         VK_OEM_CLEAR = 0xfe
  576.         // // [OemClear] = 254
  577.  
  578.         // // UNASSIGNED // = &HFFFF    ' // [KeyCode] = 65535
  579.         // // UNASSIGNED // = &H10000    ' // [Shift] = 65536
  580.         // // UNASSIGNED // = &H20000    ' // [Control] = 131072
  581.         // // UNASSIGNED // = &H40000    ' // [Alt] = 262144
  582.  
  583.     }
  584. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement