krel Posted March 8, 2016 Posted March 8, 2016 I'm trying to use a button press to send a small amount of scrollwheel change, as follows: int scrollup() { VirtualOutput(OUT_TYPE_MOUSE, OUT_ID_AXIS+2, 5); } int scrolldn() { VirtualOutput(OUT_TYPE_MOUSE, OUT_ID_AXIS+2, -5); } MapKey(&W1, H2U, EXEC("scrollup();")); MapKey(&W1, H2D, EXEC("scrolldn();")); This works well, except that every time I click the button, it moves the mouse to the center of my screen. I suspect it's a problem with the definitions, but I can't find where those are set, where OUT_ID_AXIS is defined. Any suggestions?
krel Posted March 9, 2016 Author Posted March 9, 2016 To answer my own question (in case anyone finds this particular question via google some day in the future) I had to make a copy of target.tmh and change if(cfg & CREATE_MOUSE) PlugMouse(1); to if(cfg & CREATE_MOUSE) PlugMouse(0); which if I understand it correctly, is absolute vs relative positioning.
Recommended Posts