Browse the docs

mouseY

Returns the pointer's vertical position in screen points.

Keyboard Maestro: MOUSEY

Details #

mouseY() takes no arguments and returns a number: how far the pointer is below the top edge of the main display, rounded to a whole number. Y grows downward, as in Keyboard Maestro, and the origin is the top left of the main display.

Parameters #

Takes 0 arguments. {{ mouseY() }}

Examples #

mouseY()
→ 0
mouseY() > 100
→ false

Gotchas #

  • Calling it with an argument is an error: mouseY() takes 0 arguments, got 1.

  • Y counts down from the top, not up from the bottom. A screen above the main display gives negative numbers.

  • With nothing real to read, the answer is 0.