()
return (d.root_x, d.root_y)
Get the current mouse position.

    Returns:
        Tuple of the x and y coordinates of the mouse cursor.
Get the current mouse position.
Get the current mouse position .
def cursor_position():
    """Get the current mouse position.

    Returns:
        Tuple of the x and y coordinates of the mouse cursor.
    """
    d = Display().screen().root.query_pointer()
    return (d.root_x, d.root_y)
def cursor_position ( ) : d = Display ( ) . screen ( ) . root . query_pointer ( ) return ( d . root_x , d . root_y )