3

Is there any way (using autohotkey or not) to create a shortcut (two, actually) for modifying the mouse/touchpad pointer speed ?

I have two mices, and one touchpad, which I use alternatively ... and every one of them somehow differently sets its pointer speed. In any case, very annoying. I also, sometimes would like to have touchpad at a greater speed, depending on what I'm doing at the moment.

So, does anyone know how that could be accomplished ? All ideas on the subject welcomed.

Rook
  • 24,289

3 Answers3

4

The registry key is loated in HKEY_CURRENT_USER\Control Panel\Mouse\MouseSensitivity but modifying this through AutoHotkey alone usually doesn't work. The best way is to use a DLL call:

^+u::DllCall("SystemParametersInfo", Int,113, Int,0, UInt,20, Int,2) ;high sensitivity
^+d::DllCall("SystemParametersInfo", Int,113, Int,0, UInt,5, Int,2) ;low sensitivity
^+n::DllCall("SystemParametersInfo", Int,113, Int,0, UInt,10, Int,2) ;normal sensisivity

Ctrl + Shift + u sets sensitivity to high, Ctrl + Shift + d sets it low, and Ctrl + Shift + n sets it back to default. Edit this script to your hearts content.

But, what you could use the registry for is querying the current value, so you can increment the speed by 1 like so:

^+u::
RegRead, MyVar, HKEY_CURRENT_USER, Control Panel\Mouse,MouseSensitivity
if (MyVar == 20)
{
    MsgBox Value is already at max
    Exit, 0
}
DllCall("SystemParametersInfo", Int,113, Int,0, UInt,%MyVar%+1, Int,2)
return
2

See if this AutoHotKey forum thread helps you: Adjusting Mouse Sensitivity via hotkey

nik
  • 57,042
0

For me Eithermouse works the best.

It automatically switches settings when using a specific device. This way the speed settings get automatically adjusted.

You also get a tray icon in the bottom of the screen where you can fine-tune the speed of the device currently in use.

http://www.eithermouse.com/

From their website

Multiple mice, individual settings!

Instantly changes settings when any mouse is used:
    swap buttons
    mirror cursor
    adjust speeds
    and more...

Leave multiple mice on a pc and automatically swap buttons on each mouse  
Have a left-handed and a right-handed mouse always connected and ready to use  
Great for multi-user/public workstations to accomodate both left and right handed users.  
Possibly helps with RSI/injury issues by allowing switching between left and right hand.  
Easily swap mouse buttons from system tray if only one mouse is used  
Tray icon points to active mouse  
Freeware! no ads, no nags, free software, suggestions appreciated!   

Also see my answer here: https://superuser.com/a/738986/313841

Milan
  • 151
  • 1
  • 3