---
name: "xte"
section: "1"
platform: "linux"
package: "xautomation"
version: "1.09-6"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xte"
---

# xte(1)

Generates fake input using the XTest extension

## NAME

xte - Generates fake input using the XTest extension

## SYNOPSIS

**xte** *\[options\] commands...*

## DESCRIPTION

**xte** is a program that generates fake input using the XTest extension, more reliable than xse.

## OPTIONS

A summary of options is included below.

- **-i id**

  XInput 2.x device to use. List devices with 'xinput list'.

- **-x display**

  Send commands to remote X server. Note that some commands may not work correctly unless the display is on the console, e.g. the display is currently controlled by the keyboard and mouse and not in the background. This seems to be a limitation of the XTest extension.

- **--help, -h**

  Show summary of options.

## COMMANDS

- **key** *k*

  Press and release key k

- **keydown k**

  Press key k down

- **keyup** *k*

  Release key k

- **str** *string*

  Do a bunch of key X events for each char in string

- **mouseclick** *i*

  Click mouse button i

- **mousemove** *x y*

  Move mouse to screen position x, y

- **mousermove** *x y*

  Move mouse relative from current location by x, y

- **mousedown** *i*

  Press mouse button i down

- **mouseup** *i*

  Release mouse button i

- **sleep** *x*

  Sleep x seconds

- **usleep** *x*

  Usleep x microseconds

## SOME USEFUL KEYS

These keys are case sensitive.

Home\
 Left\
 Up\
 Right\
 Down\
 Page\_Up\
 Page\_Down\
 End\
 Return\
 BackSpace\
 Tab\
 Escape\
 Delete\
 Shift\_L\
 Shift\_R\
 Control\_L\
 Control\_R\
 Meta\_L\
 Meta\_R\
 Alt\_L\
 Alt\_R\
 Multi\_key\
 Super\_L\
 Super\_R

Depending on your keyboard layout, the "Windows" key may be one of the Super\_ keys or the Meta\_ keys.

## SEE ALSO

[**pat2ppm**(1)](/pat2ppm/1.md), [**patextract**(1)](/patextract/1.md), [**png2pat**(1)](/png2pat/1.md), [**rgb2pat**(1)](/rgb2pat/1.md), [**visgrep**(1)](/visgrep/1.md).

## AUTHOR

**xte** was written by Steve Slaven \<bpk@hoopajoo.net\>.

## LIMITATIONS

The **str** command doesn't support Unicode characters with more than two bytes. Further, character composing sequences to generate special charactes are limited to Multi\_key plus two characters. The set of supported characters depends on the current keyboard layout.
