In Every keyboard is a mechanical keyboard with Klicky, Muneer Alam describes porting Sauhard Gupta's macOS keyboard-sound utility to Linux and finding an audible delay downstream of a fast input handler. The project plays a prepared sound when a key is pressed, which makes the timing easy to notice even during ordinary typing.
What the dispatch timer measures
Klicky prepares a sound pack before playback. It decodes the pack's recording and keeps the individual key sounds in memory. When an input event arrives, the program can hand the relevant slice to a mixer that is already running. This also lets clicks overlap during a burst of typing.
Alam reports a mean of 0.241 milliseconds across 55 keypresses in one Linux run. That timer starts at the input callback and ends when the sound is handed to the mixer. The benchmark notes define the endpoints and identify the PipeWire output route. A timing comparison should carry those endpoints with the number. There is still a path from the mixer to the speaker after the timer stops.
When the buffer is longer than the handler
The earlier output configuration negotiated 1,102 frames at 44.1 kHz. Dividing frames by sample rate gives about 25 milliseconds of audio per buffer. After a move to Rodio 0.22 and a smaller buffer request, the tested route negotiated 256 frames, or about 5.8 milliseconds. Alam reports an audible improvement on that setup. The numbers describe buffer duration, while the listening observation describes the experience on that hardware.
Klicky tries larger buffers and eventually lets the device choose if the first request fails. Alam also describes hearing a delay through AirPods on Windows that was less apparent through laptop speakers. For a desktop utility with this kind of audible feedback, what measurements would help distinguish a slow application callback from delay introduced by a particular output route?