8

Is there any way to get the location that touch pad is touched? also I need capture module that is able to return such 2D points array map that reports states of touchpad points (state means: is point touched/not touched) by request. No matter on what technology/language it is written

josh3736
  • 139,160
  • 33
  • 216
  • 263
Afnan Bashir
  • 7,319
  • 20
  • 76
  • 138
  • 1
    For clarity, I assume you're talking about a [Touchpad](http://en.wikipedia.org/wiki/Touchpad) pointing device, not the [HP TouchPad](http://en.wikipedia.org/wiki/HP_TouchPad) tablet. – josh3736 Dec 04 '11 at 17:24
  • 1
    simple touch pad that every laptop has......Yes you are correct – Afnan Bashir Dec 04 '11 at 17:36
  • 1
    This will probably vary depending on device, driver, and operating system. Not all touch pads are multitouch. I would search google for something similar to "synaptic] multitouch gesture source code" to get a basic idea of what your getting into. – Joe McGrath Dec 04 '11 at 17:44

2 Answers2

8

I know this isn't what you want to hear, but there is no all-inclusive way to do what you want.

Individual makes and models have their own way of exposing it. For example, I've done some work with Synaptic touchpads (fairly common) which expose a COM interface on Windows. That code won't work on any other touchpads.

You could find a few common ones and run different code based on which ones the system supports.

Brigand
  • 84,529
  • 20
  • 165
  • 173
  • Yes, touchpads only deal with relative coordinates, unless specified otherwise by the driver. Since that would be a custom driver, your would have to create a custom solution for each supported device. – Andreas Reiff Nov 12 '12 at 12:14
2

If its a windows app, handle the WM_MOUSEMOVE message , the hiword and loword of the lparam is the x and y coordinates respectively , in reference to client area coordinates.

johnathan
  • 2,315
  • 13
  • 20