Garry's Mod Wiki

input.GetCursorPos

  number, number input.GetCursorPos()

Description

Returns the cursor's position on the screen.

On macOS, the cursor isn't locked on the middle of the screen which causes a significant offset of the positions returned by this function.

Issue Tracker: 4964

Returns

1 number
The cursors position on the X axis.
2 number
The cursors position on the Y axis.