title: What Keys Are Represented by the &H Hex Codes?
body: <p><b>EDIT:</b> I found an article that lists exactly what I needed: <a href="http://msdn.microsoft.com/en-us/library/ms646309(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms646309(v=vs.85).aspx</a></p>
  
  <p>Thanks for your help!</p>
  
  <p><i>Original:</i></p>
  
  <p>I'm wondering what keyboard keys are represented by the <code>&amp;H</code> hex codes?</p>
  
  <p>For example, I've found that <code>&amp;H1</code> is the ALT key, <code>&amp;H2</code> is the CONTROL key, and <code>&amp;H3</code> is both the ALT and CONTROL keys together. <code>&amp;H10</code> is the Shift key, it appears. I'm asking because I need to find out for a program I'm designing that needs to register a hotkey. The user has the option to hide it, and I want to make sure that they can show it again by pressing a hotkey, but I need to figure out what the hex keys are to use the code that I found.</p>
  
  <p>Here's part of the code I found:</p>
  
  <pre><code>Public Const MOD_ALT As Integer = &amp;H1 'Alt key
  Public Const WM_HOTKEY As Integer = &amp;H312
  
  &lt;DllImport("User32.dll")&gt; _
  Public Shared Function RegisterHotKey(ByVal hwnd As IntPtr, _
                      ByVal id As Integer, ByVal fsModifiers As Integer, _
                      ByVal vk As Integer) As Integer
  End Function
  
  &lt;DllImport("User32.dll")&gt; _
  Public Shared Function UnregisterHotKey(ByVal hwnd As IntPtr, _
                      ByVal id As Integer) As Integer
  End Function
  
  Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
      If m.Msg = WM_HOTKEY Then
          Dim id As IntPtr = m.WParam
          Select Case (id.ToString)
              Case "100"
                  MessageBox.Show("You pressed ALT+D key combination")
              Case "200"
                  MessageBox.Show("You pressed ALT+C key combination")
          End Select
      End If
      MyBase.WndProc(m)
  End Sub
  </code></pre>
  
  <p>And this registers the hotkeys when the form loads:</p>
  
  <pre><code>RegisterHotKey(Me.Handle, 100, &amp;H3, Keys.D)
  RegisterHotKey(Me.Handle, 200, Keys.Alt, Keys.C)
  </code></pre>
  
  <p><a href="http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c1a24688-d844-4adc-9d85-416a7158c6ba/" rel="nofollow">This</a> is the thread I was looking at on the MSDN forums -- I copied the code from the featured answer.</p>
  
  <p>I've done a thorough Google search and I've searched here on StackOverflow, and I can't find anything.</p>
  
  <p>Is there maybe a list of the hex codes somewhere, or instructions or something?</p>
  
  <p>Thanks!</p>