#keyboard #cli #x11

app query-keyboard

Simple CLI tool to check which keys are pressed

2 stable releases

1.1.0 Aug 6, 2022
1.0.0 Aug 3, 2022

#1815 in Command line utilities




Simple script to query which keys are hold on the keyboard.

Returns 0 if all keys specified on the command line are hold and 1 otherwise.

Requires libx11-dev on Linux.

The --hold-for parameter can be used to specify a time in seconds for which the keys need to be held. If a key is released before this time has expired, then the script will return 1.


query-keyboard LShift A

query-keyboard --hold-for 0.2 Enter


~60K SLoC