fix typo in README
Make vibrator event device node customizable
Exit when -h usage() arg is issued
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.
-f- A wave file to load and play, note that only the first milliseconds as specified by
-dare 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-eventor value of
SXMO_VIBRATE_DEVenvironment 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).