as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

Simulate Device Input with inputd-cli

The inputd-cli is a command-line tool that enables you to programmatically interact with Fire TV devices through simulated user input and system controls. This tool is essential for automated testing, device debugging, and development workflows where you need to control device behavior without physical interaction.

Key capabilities

  • Input simulation - Sends button presses, touch events, swipes, and mouse interactions
  • Text input - Injects text strings directly into the device
  • Screen interaction - Retrieves screen dimensions and performs gesture-based navigation
  • Automation support - Provides console mode for scripting and batch operations

Prerequisites

  1. Establish VDA connection through USB or TCP/IP.

    See instructions in Enable VDA Over TCP/IP page.

  2. Obtain appropriate security permissions for your access level.

    Different security contexts provide varying levels of access to inputd-cli functionality. Check your current permissions to understand which commands are available in your environment.

    Security context Get information Input automation
    app_user Yes No
    Dev mode shell Yes Yes
  3. Enable developer mode on Fire TV device (recommended).

    See instructions in Configure Developer Mode page.

Access through VDA shell

The tool comes built into the Fire TV device system and requires no separate installation. You can access inputd-cli through the VDA shell environment:

Copied to clipboard.

vda shell inputd-cli --help

Example:

vda shell inputd-cli -h                                                                                                                   

inputd cli
    Usage:
      inputd-cli start
      inputd-cli button_press <key> ([short|long|superLong|repeat]|--holdDuration <duration>)
      inputd-cli touch <x> <y> [<x2>] [<y2>] [<x3>] [<y3>] [<x4>] [<y4>]
      inputd-cli swipe <x_start> <y_start> <x_end> <y_end> [<x_start2>] [<y_start2>] [<x_end2>] [<y_end2>] [<x_start3>] [<y_start3>] [<x_end3>] [<y_end3>] [<x_start4>] [<y_start4>] [<x_end4>] [<y_end4>] [--interval <time-interval>] [--delay-release]
      inputd-cli gesture_swipe_down <x> <y> [--distance <px-distance>]
      inputd-cli gesture_swipe_up <x> <y> [--distance <px-distance>]
      inputd-cli gesture_swipe_left <x> <y> [--distance <px-distance>]
      inputd-cli gesture_swipe_right <x> <y> [--distance <px-distance>]
      inputd-cli mouse_move <x> <y>
      inputd-cli mouse_click <x> <y> [<button>]
      inputd-cli mouse_button_press [<button>]
      inputd-cli get_camera_cover_state [--deprecated]
      inputd-cli get_camera_cover_open_close
      inputd-cli get_mic_state
      inputd-cli get_client_list
      inputd-cli send_text <text> [--interval <time-interval>]
      inputd-cli get_screen_size
    Options:
      -h --help                     Show usage
      --version                     Show version
      --interval <time-interval>    Time interval between each movement, in unit microsecond [default: 20000 for swipe, 100 for send_text]
      --delay-release               Delay release of the swipe gesture for predictable scroll distance
      --distance <px-distance>      The distance to travel for the movement, in pixels [default: 130]
      --holdDuration <duration>     The duration between button down and up, in milliseconds
      <button>                      The mouse button to press [default: "BTN_LEFT"]

Key code reference

You can find the list of key codes at linux-event-codes.h.

To send a back key press:

Copied to clipboard.

vda shell inputd-cli button_press KEY_BACK

Common navigation keys: KEY_DOWN, KEY_UP, KEY_ENTER, KEY_LEFT, KEY_RIGHT.

To send text input:

Copied to clipboard.

vda shell inputd-cli send_text 'hello\ world\!'

Change privacy state

To control camera and microphone privacy settings on your Fire TV device at a software level, use:

Copied to clipboard.

vda shell inputd-cli set_mic_state disabled

Use console mode

To establish a persistent connection for multiple commands without reconnecting each time, use:

vda shell inputd-cli start
// Output
Welcome to the Inputd command line!
Type 'h' or any valid command to continue.
inputd-cli >

Example usage:

inputd-cli > h
inputd cli
    Usage:
      button_press <key> ([short|long|superLong|repeat]|holdDuration <duration>)
      button_hold <key>
      button_release <key>

      touch <x> <y>
      touch_hold <x> <y>
      touch_release

      swipe <x1> <y1> <x2> <y2> [interval <time-interval>]
      gesture_swipe_down <x> <y> [distance <px-distance>]
      gesture_swipe_up <x> <y> [distance <px-distance>]
      gesture_swipe_left <x> <y> [distance <px-distance>]
      gesture_swipe_right <x> <y> [distance <px-distance>]
      mouse_move <x> <y>
      mouse_click <x> <y> [<button>]
      mouse_button_press [<button>]
      mouse_button_hold [<button>]
      mouse_button_release [<button>]

      get_camera_cover_state
      get_mic_state

      set_priority <value>
      set_permission_level <value>

      get_client_list

      send_text <text>

      get_screen_size

    Options:
      h, help       prints usage information
      v, version    prints version information
      x, exit       an alternative to Ctrl + C
      interval <time-interval>    Time interval between each movement, in unit microsecond [default: 20000]
      distance <px-distance>      The distance to travel for the movement, in pixels [default: 130]
      holdDuration <duration>     The duration between button down and up, in milliseconds
      <button>                    The mouse button to press [default: "BTN_LEFT"]

Automate input with scripts

To avoid creating multiple client connections, chain commands together. For example, to hold and repeat button presses, use:

Copied to clipboard.

vda shell "{ echo -e "button_hold KEY_LEFT"; sleep 0.5; for i in {1..30}; do echo -e "button_press KEY_DOWN"; sleep 0.5; done; echo -e "button_release KEY_LEFT"; echo exit; } | inputd-cli start" 

This example holds the Left button, presses the Down button 30 times every 0.5 seconds (15 seconds total), then releases the Left button and exits.

Press multiple buttons simultaneously

To simulate pressing multiple buttons at the same time, hold them, wait, then release. For example:

Copied to clipboard.

vda shell "{ echo -e "button_hold KEY_BACK"; echo -e "button_hold KEY_MENU"; sleep 3; echo -e "button_release KEY_BACK"; echo -e "button_release KEY_MENU"; echo exit; } | inputd-cli start"

This holds the Back and Menu buttons for 3 seconds, then releases both buttons and exits.


Last updated: Sep 30, 2025