Input simulator for Windows and Linux.
  • Rust 92.5%
  • Python 7.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-23 22:56:03 +02:00
docs/licenses Initial commit 2026-08-18 17:15:59 +02:00
src Allow hexadecimal keycode input 2026-08-23 19:43:26 +02:00
.gitignore Initial commit 2026-08-18 17:15:59 +02:00
Cargo.lock Initial commit 2026-08-18 17:15:59 +02:00
Cargo.toml Initial commit 2026-08-18 17:15:59 +02:00
minisiminput Include minisiminput 2026-08-19 02:09:04 +02:00
README.md Mention Win32 extended keycodes in README 2026-08-23 22:56:03 +02:00

siminput

Input simulator for Windows and Linux.

siminput allows testing how programs behave when they are provided with non-typical inputs, like keys that don't appear on standard keyboards.

Setup

Download a build for your platform from Releases. Place the siminput executable on your PATH, or in a convenient place to execute it directly.

Basic usage

siminput operates based on commands. The following commands are available:

  • press input ...

    Presses (and holds) an input.

  • release input ...

    Releases an input.

  • scroll axis value

    Scrolls the scrollwheel in axis by value units.

  • sleep ms

    Waits ms milliseconds.

input is a platform-specific decimal or hexadecimal, if prefixed by 0x, keycode. On Windows, extended keycodes are 2 byte (16 bit) with the least significant byte set to 0xe0.

On Windows, where mouse input is separate from keyboard input, input can also be mouse <button>.

<button> is either:

  • left, for left button
  • right, for right button
  • middle, for middle button (scrollwheel)
  • x <xbutton>, for an X (extra) button. <xbutton> is a number greater than 0 (the only X buttons supported by Windows are 1 and 2, but you can attempt higher values if you wish).

If started with no arguments, siminput will read and execute line-delimited commands from stdin. Otherwise, it will execute each argument as a command.

Examples

Press the A key for 500ms, then press the B key for 500ms.

siminput 'sleep 2000' 'press 30' 'sleep 500' 'release 30' 'sleep 1000' 'press 31' 'sleep 500' 'release 31' 'sleep 1000'

minisiminput

minisiminput is an older, simpler ("miniature") version of siminput that only supports Linux, in form of a Python script.

It's made available together with siminput, because it's sometimes preferred to copy over a short script over a binary or code that needs to be compiled.

There is one dependency, the evdev library, installable either from PyPi or from your distro's repository (python3-evdev in Debian and Ubuntu).

Copyright © 2026 Grzesiek11

This work is licensed under any of the following licenses, at your opinion: CC0 1.0 (CC0-1.0), Zero-Clause BSD (0BSD), BSD+Patent (BSD-2-Clause-Patent). You should have received copies of those licenses with this work, located in the docs/licenses directory.