Set the mouse pointer to the center of the focused window whenever focus changes.
Additionally, if focused window moves when no mouse buttons are pressed, set the mouse pointer to the new center. This is intended to work with other utilities which warp the focused window.
Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/MouseFollowsFocus.spoon.zip
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 line 24 |
Signature | MouseFollowsFocus:configure(configuration) |
---|---|
Type | Method |
Description | Configures the spoon. |
Parameters |
|
Returns | |
Source | Source/MouseFollowsFocus.spoon/init.lua line 29 |
Signature | MouseFollowsFocus:start() |
---|---|
Type | Method |
Description | Starts updating the mouse position when window focus changes |
Parameters |
|
Returns | |
Source | Source/MouseFollowsFocus.spoon/init.lua line 44 |
Signature | MouseFollowsFocus:stop() |
---|---|
Type | Method |
Description | Stops updating the mouse position when window focus changes |
Parameters |
|
Returns | |
Source | Source/MouseFollowsFocus.spoon/init.lua line 73 |
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 |
|
Returns | |
Source | Source/MouseFollowsFocus.spoon/init.lua line 84 |