dekuNukem / duckyPad

Do-It-All Mechanical Macropad
MIT License
1.22k stars 168 forks source link

Reading and setting absolute Mouse positions? #155

Open BabyFnord opened 6 months ago

BabyFnord commented 6 months ago

Hello @dekuNukem,

duckyPad would be a major timesaver in applications, where there are no shortcuts available to certain functions. Would duckyPad be able to run a script like

… and what would such a script look like? Thanks for your attention!

dekuNukem commented 6 months ago

Hi there! duckyPad acts like a regular USB keyboard to the computer, so there is no way for it to know the current mouse position natively.

However, you can move the mouse cursor relative to the current position, or use it to invoke a script on the computer itself such as autohotkey, which can do a lot more: https://www.autohotkey.com/docs/v1/lib/MouseMove.htm

BabyFnord commented 6 months ago

Thanks for clarification. I understand that this possibly goes beyond of what duckyPad was originally designed for. AHK is Windows only and possibly needs admin rights to be installed in the first place, which can't always be assumed, for example when working in a lab at various workstations.

Tho there seems to be a way for implementing duckPads native relative Mouse positioning, if the Mouse pointer action would always be invoked while the pointer is in a sort of HOME position. Would it be possible to press a Mouse button and move it, while keeping that Mouse button pressed until duckyPad is being told to let go of the Mouse button?