Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kenny-evitt/6f6571e38295f2b65f54 to your computer and use it in GitHub Desktop.
Save kenny-evitt/6f6571e38295f2b65f54 to your computer and use it in GitHub Desktop.
Create an AutoHotkey hotkey to move the mouse cursor to the top-left of the "main display"
; Alt-Shift-m
!+m::
CoordMode, Mouse, Screen
; The following moves the cursor to the center of the "main" display:
;MouseMove, A_ScreenWidth/2, A_ScreenHeight/2, 0
; The following moves the cursor to the top-left of the "main" display:
MouseMove, 1, 1, 0
return
@kenny-evitt
Copy link
Author

This is handy for moving the cursor out of the way of menus or other controls when I want to use a program (e.g. Visual Studio) with its keyboard shortcuts alone. Otherwise, the position of the cursor can interfere with the selection of items in lists or menus and prevent panes in windows from auto-hiding.

@kenny-evitt
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment