Page 2 of 2

Re: POC: RawInput mouse via C# CLR

Posted: 20 Jul 2017, 12:22
by Galvatron
Okay, made it to work. These values seem to be fine and more precise than with mousedelta:
MoveEvent(x, y, mouseId){
x := round(x / 2)
y := round(y / 2)
Global mdw
if (mdw.SelectedMouse == 0 || mdw.SelectedMouse == mouseId){
DllCall("mouse_event",uint,1,int, x ,int, y,uint,0,int,0)
}
}
But using "x / 3" or lower doesn't seem to work properly.

Re: POC: RawInput mouse via C# CLR

Posted: 30 Jul 2018, 23:34
by Avc001
Bro please help me... Can you do this for me???

Mouse move left = left arrow key , when stop moving = arrow key left up
Mouse move right = right arrow key , when stop moving = arrow key right up

put a deadzone on the x-axis as well is possible

and make sure the the mouse is infinite like its doesnt hit the edge and stops. Its lke in a real fps game you know. Please help

email me asap when you got it:
[email protected]


I want to use delta rawinput api of mouse on this code here:::
----------------------------------------------------------
CoordMode, Mouse, Screen

deadzone := 6
deadzoneX := Floor(deadzone*1.2)

cnt:=!!cnt
settimer, watchMouse, 10
return

watchMouse:
cnt++, pCnt:=cnt-1
mouseGetPos, mx%cnt%
send % ( mx%cnt%>mx%pCnt%+deadzoneX ? "{right}" : mx%cnt%<mx%pCnt%-deadzoneX ? "{left}" : "" )
return

esc::exitApp ; <-- press esc to exit
----------------------------------------------------------------------

Re: POC: RawInput mouse via C# CLR

Posted: 21 Mar 2019, 08:48
by Trej
Hi @evilC,

Is there anyway to modify this to receive messages from the surface dial?

I have no idea where to start in implementing this in AHK.

Re: POC: RawInput mouse via C# CLR

Posted: 21 Mar 2019, 09:03
by evilC
I don't know much about the Surface Dial, but the short answer is No - this will not *natively* support the dial.
What I mean by this is that the dial will likely be a HID device natively, sending dial-specific signals to the PC.
In order to support it natively, you could possibly use AHKHID.

However, it seems that in some modes, the dial sends normal mouse or keyboard signals, which this library *could* read, however that is not likely to be of much use, because...
If the dial sends, for example, wheel up or wheel down, RawInput *could* see it, but could *not* remap it (Make it do something else).

In that instance, you could use AHI (See link in signature) to subscribe to the wheel signals coming from the dial (And only the dial, it would not respond to your normal mouse wheel) and allow you to remap them