Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

TRACKPAD HOMEBREWED for AHK


  • Please log in to reply
5 replies to this topic
revMARKbrown
  • Members
  • 6 posts
  • Last active: Oct 27 2015 01:15 AM
  • Joined: 23 Oct 2015

TRYING TO CODE A TRACKPAD WITH AHK.  It was the last request of my handicap students; passed awayt his month.  I will try to put one toether for the class.. THE FOLLOWING IS HIS CONCEPTUAL MODEL: http://postimg.org/image/saq4866a3/...

 

Never done one before.. But see drawing/link.. it has four colums and four rows..  It has 16 buttons (can be either resistive or capacitive). 

I guess it needs to measure distance and speed and who knows what else. An elementary model is my aim at first. Then I will look into creating gestures.

 

CALLING ON ALL AHK NINJAS.. help keep my learning projects moving forward for special children and at.risk students.

 

 



revMARKbrown
  • Members
  • 6 posts
  • Last active: Oct 27 2015 01:15 AM
  • Joined: 23 Oct 2015

Here is an example of a homebrewed touchpad using a resistive screen... 



revMARKbrown
  • Members
  • 6 posts
  • Last active: Oct 27 2015 01:15 AM
  • Joined: 23 Oct 2015

WHERE DO I START? I'm just guessing, but the way the underlying electronics works is almost certainly by sampling the (x, y) location of the touch many times per second. Subtracting these from the previous position gives you a (dx, dy) pair. Acceleration can then be achieved by e.g. squaring these differences before using them to update the mouse pointer location on screen. 



space
  • Members
  • 520 posts
  • Last active:
  • Joined: 12 Aug 2014

Perhaps you can study this script as a starting point http://autohotkey.co...pad-as-a-mouse/

If it is a second keyboard you may wish to look into hidmacros or luamacros http://www.hidmacros...=10&t=241#p794 to be able to distinguish the second keyboard so it doesn't interfere a regular they keyboard/numpad.



revMARKbrown
  • Members
  • 6 posts
  • Last active: Oct 27 2015 01:15 AM
  • Joined: 23 Oct 2015

Thanks space



floodindahood
  • Members
  • 383 posts
  • Last active: Apr 20 2018 01:45 PM
  • Joined: 21 Oct 2011

TheGood has written an HID lib for ahk, http://autohotkey.co...-hid-functions/, incase that'd be comfier.