Forrest logo
tool overview
On this page you find all important commands for the CLI tool xdotool. If the command you are looking for is missing please ask our AI.

xdotool

xdotool is a versatile command-line tool used for simulating keyboard input and mouse activity in Linux. It allows automation of various tasks by emulating human interactions with the graphical user interface. With xdotool, users can send keystrokes or mouse clicks to specific windows or application fields programmatically. It also supports advanced features like sending keyboard shortcuts, mouse movements, scrolling, and even managing windows. Xdotool can be used to create complex automation scripts for repetitive tasks, such as filling out forms, automating GUI workflows, or controlling multiple applications simultaneously. Additionally, it provides options to delay or repeat actions, making it highly customizable and extremely useful for automation and scripting purposes. Xdotool is a powerful tool that has a wide range of applications, including software testing, accessibility enhancements, and creating hotkeys or macros for personal productivity.

List of commands for xdotool:

  • xdotool:tldr:0e430 xdotool: Get the ID of the currently active window.
    $ xdotool getactivewindow
    try on your machine
    explain this command
  • xdotool:tldr:34ced xdotool: Retrieve the X-Windows window ID of the running Firefox window(s).
    $ xdotool search --onlyvisible --name ${firefox}
    try on your machine
    explain this command
  • xdotool:tldr:90453 xdotool: Click the right mouse button.
    $ xdotool click ${3}
    try on your machine
    explain this command
  • xdotool:tldr:9d877 xdotool: Focus on the window with ID of 12345.
    $ xdotool windowfocus --sync ${12345}
    try on your machine
    explain this command
  • xdotool:tldr:b4540 xdotool: Type a message, with a 500ms delay for each letter.
    $ xdotool type --delay ${500} "Hello world"
    try on your machine
    explain this command
  • xdotool:tldr:bc2f3 xdotool: Press the enter key.
    $ xdotool key ${KP_Enter}
    try on your machine
    explain this command
tool overview