docs » MouseFollowsFocus

Set the mouse pointer to the center of the focused window whenever focus changes.

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/MouseFollowsFocus.spoon.zip

API Overview

API Documentation

Variables

logger
Signature MouseFollowsFocus.logger
Type Variable
Description

Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.

Source Source/MouseFollowsFocus.spoon/init.lua

Methods

configure
Signature MouseFollowsFocus:configure(configuration)
Type Method
Description

Configures the spoon. There is currently nothing to configure.

Parameters:

  • configuration - :
Source Source/MouseFollowsFocus.spoon/init.lua
start
Signature MouseFollowsFocus:start()
Type Method
Description

Starts updating the mouse position when window focus changes

Parameters:

  • None
Source Source/MouseFollowsFocus.spoon/init.lua
stop
Signature MouseFollowsFocus:stop()
Type Method
Description

Stops updating the mouse position when window focus changes

Parameters:

  • None
Source Source/MouseFollowsFocus.spoon/init.lua
updateMouse
Signature MouseFollowsFocus:updateMouse(window)
Type Method
Description

Moves the mouse to the center of the given window unless it's already inside the window

Parameters:

  • None
Source Source/MouseFollowsFocus.spoon/init.lua