---
name: "SetCaret"
section: "3"
platform: "macos"
package: "tcl"
version: "152"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/SetCaret"
---

# SetCaret(3)

set the display caret location

## NAME

Tk\_SetCaretPos - set the display caret location

## SYNOPSIS

```
#include <tk.h>

int
Tk_SetCaretPos(tkwin, x, y, height)
```

## ARGUMENTS

Token for window. Window-relative x coordinate. Window-relative y coordinate. Height of the caret in the window.

## DESCRIPTION

**Tk\_SetCaretPos** sets the caret location for the display of the specified Tk\_Window *tkwin*.  The caret is the per-display cursor location used for indicating global focus (e.g. to comply with Microsoft Accessibility guidelines), as well as for location of the over-the-spot XIM (X Input Methods) or Windows IME windows.

## KEYWORDS

caret, cursor
