title: how to distinguish touch vs mouse event from SetWindowsHookEx in c#
body: <p>I have found a way to listen to the mouse event, but what I really want is the touch event not mouse. They seem to share the same code. Is there any way to tell if the event was touch and not mouse? Thanks </p>
  
  <pre><code>    [DllImport("user32.dll")]
      static extern IntPtr SetWindowsHookEx(int idHook, LowLevelMouseProc callback, IntPtr hInstance, uint threadId);
  
      [DllImport("kernel32.dll")]
      static extern IntPtr LoadLibrary(string lpFileName);
  
      private delegate IntPtr LowLevelMouseProc (int nCode, IntPtr wParam, IntPtr lParam);
  
      const int WH_MOUSE_LL = 14;
      const int WM_KEYDOWN = 0x100;
  
      private LowLevelMouseProc _proc = hookProc;
  
      private static IntPtr hhook = IntPtr.Zero;
  
      public void SetHook()
      {
          IntPtr hInstance = LoadLibrary("User32");
          hhook = SetWindowsHookEx(WH_MOUSE_LL, _proc, hInstance, 0);
      }
  
      public static IntPtr hookProc(int code, IntPtr wParam, IntPtr lParam)
      {
  
          System.Diagnostics.Debug.Print("Param: " + wParam + ", CODE: " + code + "\n");
      }
  
      private void Form1_Load(object sender, RoutedEventArgs e)
      {
          SetHook();
      }
  </code></pre>