Share this page

# TE_get_cursor_pos

Cursor Functions

Returns the current location of the cursor in the terminal screen.

    int TE_get_cursor_pos( int *col, int *row );

## Outputs

col, row | The column and row coordinates of the cursor on the screen.

Note that for either output parameter, you can specify NULL if you do not need the value.

TE_get_cursor_pos returns the coordinates of the current cursor position on the terminal emulator screen.

## Return Values

This function returns 0 if it succeeds, and a negative error code if it fails. It also sets the global variable TE_errno.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

The following example returns only the column position of the cursor.

Copy code

        int col;
        TE_get_cursor_pos (&col, NULL);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: