~proycon/clickclack

A vibration/audio feedback tool to be used with virtual keyboards
Make vibrator event device node customizable
Exit when -h usage() arg is issued
Make usage() take program executable name as arg and print it

clone

read-only
https://git.sr.ht/~proycon/clickclack
read/write
git@git.sr.ht:~proycon/clickclack

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

#Clickclack

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).

#Installation

$ make
$ make install

#Usage

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:

#Notes

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).

#Repository

https://git.sr.ht/~proycon/clickclack