LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

evtest

Input device event monitor and query tool

TLDR

List all detected input devices
$ sudo evtest
copy
Display events from a specific device
$ sudo evtest /dev/input/event[number]
copy
Grab device exclusively (prevent other apps from receiving events)
$ sudo evtest --grab /dev/input/event[number]
copy
Query state of a specific key or button
$ sudo evtest --query /dev/input/event[number] EV_KEY [KEY_A]
copy

SYNOPSIS

evtest [--grab] /dev/input/eventXevtest --query /dev/input/eventX eventtype eventcode

DESCRIPTION

evtest displays information from input device drivers using the Linux input subsystem. In capture mode, it shows all events supported by the device and then monitors it to display all generated events like key presses, mouse movements, and touch events.In query mode, it performs a one-shot query of the state of a specific key, switch, sound, or LED value.

PARAMETERS

--grab

Grab device exclusively using EVIOCGRAB, preventing other processes from receiving events.
--query device type code
Query state of a specific key/button/switch. Type can be EVKEY, EVSW, EVSND, EVLED or a numeric value. Returns exit code 0 if unset, 10 if set.

INSTALL

sudo apt install evtest
copy
sudo dnf install evtest
copy
sudo pacman -S evtest
copy
sudo apk add evtest
copy
sudo zypper install evtest
copy
nix profile install nixpkgs#evtest
copy

CAVEATS

Requires root privileges to read from /dev/input/ devices. Grabbing a device prevents other applications from receiving events until evtest quits.

SEE ALSO

xinput(1), libinput(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid