A vibration/audio feedback tool to be used with virtual keyboards
Makefile: declare .POSIX target
clickclack.c: adjust comments at start of file
clickclack.c: use perror to write error messages



You can also use your local clone with git send-email.


Clickclack is a simple haptic feedback and audio feedback tool. It does nothing more than emulate the clickclack sound and vibration when pressing keys.

This tools reads from standard input and emits a vibration and/or a sound whenever it receives a character. It is intented to be used in combination with a virtual keyboard like svkbd (X11) or wvkbd (wayland).


$ make
$ make install


You will want to use clickclack in combination with another tool, most likely a virtual keyboard.

Clickclack Options:

  • -f - A wave file to load and play, note that only the first milliseconds as specified by -d are actually played.
  • -V - Enable vibration (requires a vibration motor)
  • -t (integer) - Audio file duration in milliseconds (defaults to 95 milliseconds), the rest will be clipped!
  • -d (integer) - Vibration duration in milliseconds (defaults to 95 milliseconds)
  • -D - Debug mode
  • -e - Echo input to output (allows further chaining of tools)
  • -o - Vibrate/play sound only on the first character of the line. To be used in combination with the wvkbd -O option.
  • -E - Vibrator device event file to use, defaults to /dev/input/by-path/platform-vibrator-event or value of SXMO_VIBRATE_DEV environment variable if it's defined.

Virtual keyboards svkbd and wvkbd have an extra output mode where all keypresses are printed to standard output. This allows us to use clickclack with it as follows:

$ svkbd-mobile-intl -o | clickclack -V -f keytap.wav

The following audio clips well with clicklack:


When running standalone and interactively in a terminal, the terminal's buffering will interfere so you won't get the expected functionality of hearing a sound after every keypress (but only after you submit a line).