I am aware that mouse keys allows you to control the pointer with your keyboard. When using multiple monitors, however, this is painfully slow. Getting across 48 inches with mouse keys isn't fun.

Are there keyboard shortcuts (or a third-party program) that allow you to "snap" or "jump" the pointer to various places on the screen? Something that, e.g., would snap the pointer to the center of the current window, or snap it to pre-defined "snap-areas".

1 Answer 1



Karabiner comes with everything you need—a way to define a shortcut, and a way to move the mouse. The warp-mouse-cursor-position utility lives in /Applications/Karabiner.app/Contents/Library/utilities/bin/.

It has a default setting to warp the mouse to the center of the current window by tapping fn or holding ' or /, but for a customized version, add this to your ~/Library/Application Support/Karabiner/private.xml: (After you’re done, go into Karabiner’s preferences and check the box inside Mouse Warping.)

    <name>Mouse Warping</name>
      <url type="shell">
          /Applications/Karabiner.app/Contents/Library/utilities/bin/warp-mouse-cursor-position front_window middle 0 center 0
        <name>F14 to move the mouse to the center of the current window</name>

With Karabiner's utility, you can use the screen option like this:

warp-mouse-cursor-position screen NUM VERTICAL X_OFFSET HORIZONTAL Y_OFFSET

VERTICAL can be top, middle, or bottom, and HORIZONTAL can be left, center, or right.

X_OFFSET and Y_OFFSET can be numerical values, like +10 or -10. Just be careful to put the arguments in the right order—they seem oddly switched.

(For the front window, just use front_window instead of screen.)


Probably the most popular way, but in order to use it for moving to the middle of a window, you’d need an AppleScript to get the bounds of the current window, then calculate the center, etc.

  • Perfect, and I already use Karabiner!
    – Dennis
    Commented Oct 15, 2014 at 20:40
  • I combined your XML with seil to remap CAPSLOCK to F14, works like a dream.
    – Dennis
    Commented Oct 15, 2014 at 20:52
  • For anyone that sees this, be aware that as of this date, it does not full support OS X SIERRA, yet. Commented Jan 27, 2017 at 14:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .