c# - Synaptics Touchpad Signature -


i want use synaptics sdk use touchpad capture signature. trying capture absolute x , y positions of touch can track people lifting finger , putting down somewhere else. know i'm able access touchpad because can disable , access dimensions of touchpad.

the next step absolute x , y coordinates. according synaptics ps/2 touchpad interfacing guide (page 22) there "absolute mode" can information. far can't seem access it. don't know how set mode.

i'm developing in visual studio express 2012 using c#.

also, can't seem activate of events whatsoever. i'm trying register events this:

using syncomlib; using synctrllib;  synctrllib.synapictrl synapictrl1 = new synapictrl(); synctrllib.syndevicectrl syndevicectrl1 = new syndevicectrl(); synctrllib.syndisplayctrl syndisplayctrl1 = new syndisplayctrl();  synapictrl1.onnotify += synapictrl1_onnotify; syndevicectrl1.onpacket += syndevicectrl1_onpacket; syndisplayctrl1.onmessage += syndisplayctrl1_onmessage; 

i have functions log function name console:

private void syndisplayctrl1_onmessage(syndisplaymessage emessage) {     console.writeline("syndisplayctrl1_onmessage"); }  private void synapictrl1_onnotify(synnotificationreason ereason) {     console.writeline("synapictrl1_onnotify"); }  private void syndevicectrl1_onpacket() {     console.writeline("syndevicectrl1_onpacket"); } 

none of these functions ever called (or @ least nothing ever gets logged in console). i'm new visual studio , c#, solution may simple fix.

thanks in advance!

edit: here's link synaptics sdk in case want it.

i followed info on this site , converted following c#.

at top of code:

using syncomlib; using synctrllib; 

outside of functions they're global

synapictrl syntp_api = new synapictrl(); syndevicectrl syntp_dev = new syndevicectrl(); synpacketctrl syntp_pack = new synpacketctrl(); int devicehandle; 

inside constructor

syntp_api.initialize(); syntp_api.activate(); devicehandle = syntp_api.finddevice(new synconnectiontype(), new syndevicetype(), 0); syntp_dev.select(devicehandle); syntp_dev.activate();   syntp_dev.onpacket += syntp_dev_onpacket; 

finally, function handle event

private void syntp_dev_onpacket() {     if (syntp_dev.loadpacket(syntp_pack) == 1)     {         console.writeline(syntp_pack.fingerstate);         console.writeline(syntp_pack.x);         console.writeline(syntp_pack.y);     } } 

i'm going change variable names make them bit more intuitive, code works fine.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -