Windows – Win7 shortcut to position mouse in center of primary screen

keyboard shortcutsmacrosmousewindows 7

I have a three monitor set up on Windows 7 and I sometimes lose track of where my cursor is. Is there any Windows shortcut to reset the mouse position? I'm guessing there is not, but might there be a way to set up a simple macro I could bind to a key combination to set my cursor to a default location, such as the center of the primary display?

Best Answer

Combining a few of the above ideas, I came up with this script. It's tested and working.

CentreCursor.ps1

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | out-null
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | out-null
$bounds = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$center = $bounds.Location
$center.X += $bounds.Width / 2
$center.Y += $bounds.Height / 2
[System.Windows.Forms.Cursor]::Position = $center

Save this script in a convenient folder, and create a shortcut in your All Programs menu:

Target: %systemroot%\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -File "C:\Path To Script\CentreCursor.ps1"

Shortcut key: Ctrl + Alt + Shift + C

Run: Minimized

Now whenever you press Ctrl+Alt+Shift+C, your cursor will return home.

Edit: While it doesn't seem to be a requirement on my computer, I've added Patrick's suggestion to the shortcut.

Related Question