Jump to content
  • Advertisement
Sign in to follow this  
mind in a box

Accessing my touchpad?

This topic is 3014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

I was just wondering if it is somehow possible to access the touchpad of my laptop, so that it gives me the finger position rather than the mouse movement.
Would be a great feature for a shooter game [grin]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by mind in a box
Hi!

I was just wondering if it is somehow possible to access the touchpad of my laptop, so that it gives me the finger position rather than the mouse movement.
Would be a great feature for a shooter game [grin]


What do you mean by "finger position"?


When you move the finger a position it shows up as a mouse move. Touches appear as jumps in mouse positions and/or as click events. So you already know where the fingers are at.

Share this post


Link to post
Share on other sites
it will be really really hard to figure out the position of the actual finger. Most touchpads work on some sort of delta, AKA you touch in the middle and you move left, it will move the mouse left based on the delta of your finger movement.


Say 0,0 = middle, and you move to -10, 0. Your touchpad would send the difference to the OS, and the OS would do something based on your set mouse speed. If you wanted the position I'd think you'd have to write a driver for it, or it may not even be possible if its hard wired in as a mouse controller to send the data like that.

Share this post


Link to post
Share on other sites
Quote:
Original post by JonConley
it will be really really hard to figure out the position of the actual finger. Most touchpads work on some sort of delta, AKA you touch in the middle and you move left, it will move the mouse left based on the delta of your finger movement.
If you have a relatively recent MacBook/MacBook pro, however, the trackpad has full support for multi-touch, and you can access it using some of Apple's private APIs (see here for an example).

Share this post


Link to post
Share on other sites
Quote:
Original post by JonConley
Most touchpads work on some sort of delta, AKA you touch in the middle and you move left, it will move the mouse left based on the delta of your finger movement.
Nah, that's what they report to the OS as mouse motion, but what they measure is absolute position. I know that the Linux driver for Synaptics touchpads (the most common brand) has absolute-position support, but I've never played with it. I doubt you could do it under Windows.

Share this post


Link to post
Share on other sites
Current versions of Windows also have support.

Server 2008 and Windows 7 both support the WM_TOUCH message, among others. It allows you to have touch information, including multi-touch details.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!