| BUCKLE-LIBINPUT(1) | User Commands | BUCKLE-LIBINPUT(1) |
NAME¶
buckle-libinput - Nostalgia bucklespring keyboard sound, libinput flavour
SYNOPSIS¶
buckle-libinput [options]
DESCRIPTION¶
Buckle emulates the sound of an old IBM Model-M space saver bucklespring keyboard while typing.
It runs as a background process and plays back the sound of each key pressed and released on the keyboard, just as if using an IBM Model-M. The sound of each key has carefully been sampled, and is played back while simulating the proper distance and direction for a realistic 3D sound palette of pure nostalgic bliss.
This flavour reads key events straight from the raw input devices in /dev/input through libinput, rather than from X11, so that it also works under a Wayland compositor and on the console. Those devices are not readable for ordinary users out of the box, and running it as root is no answer, as it then no longer reaches the sound daemon of the user session. The udev rule installed with this flavour, 70-bucklespring-libinput.rules, grants that access to the user at the local seat, and is inert until armed; read the comments in it for how, and for what it costs you.
Armed, that rule hands the access to the active session on the local seat, and this flavour holds itself to the same bargain: it asks logind which session it belongs to, reads the input devices of that session's seat, and does so only while the session is active, closing them again and dropping what it had buffered when the seat goes to someone else. A udev grant is looked at when a device is opened and not after, so a program already holding them open would otherwise go on reading them.
A seated session is what it looks for, that being where the input devices are. Started by a systemd user instance there is no session of its own to find, and a session on no seat, an ssh login for one, has nothing to read; in both cases it falls back to the graphical session of the user running it, and stops if there is none.
libinput discards the key repeat the kernel generates for a held key and leaves repeating to its caller, so this flavour keeps its own clock. Nothing can tell it when a repeat has actually happened: a Wayland compositor sends no event per repeat, it tells each client the delay and the rate once and every client then runs a timer of its own, so the repeats that put characters on the screen exist only inside whichever window has the focus. What can be had is the delay and the rate themselves, and buckle asks in turn the compositor, which is authoritative under Wayland, then the input device, which is authoritative on the console, falling back on the kernel default of 250 ms and then one click every 33 ms. Should it still disagree with what you see on the screen, set it with --repeat-delay and --repeat-rate. Modifier keys never repeat. Use -r for the older behaviour, a single click however long the key is held.
The mouse clicks too: the buttons, and the scroll wheel, one click per detent. Two fingers scrolling on a touchpad make no sound, having no detents to make one for. Use --no-click to silence it, or to silence only some of it. Reading the mouse needs access to the pointer devices as well as the keyboard ones, which the shipped udev rule grants together.
The X11 flavour is buckle-x11(1).
Where it was built with the system tray, and there is a tray to put it in, an icon appears there. Its menu holds the two things worth one click, pausing and quitting, and an entry that opens the preferences window; rolling the wheel over the icon changes the volume without opening the menu at all. --no-tray leaves the icon out. It is a StatusNotifierItem, which KDE Plasma shows as it is and GNOME Shell shows through an extension; where nothing is listening there is simply no icon and nothing else changes.
Everything else -- the volume, the clip set, the audio device, the fallback sound, the headphone filter -- is in that window, and not in the menu: a menu on a tray icon travels over dbusmenu, which carries labels and check marks rather than widgets, so a volume there can only be a ladder of radio items and a device list has to be rebuilt as a submenu whenever it changes. It also means a desktop with nowhere to put the icon still has all of it. The running buckle-libinput puts the window up when it is asked: --preferences asks over the session bus and exits; that second invocation plays nothing and holds no sound device of its own. The desktop file carries the same thing as an action, named Bucklespring preferences, and SIGUSR1 does it too, for a keyboard shortcut with no dbus tooling in it. Closing the window leaves the clicks running.
Each key is played at a position of its own, left to right as it sits on the board, which --stereo-width scales. On headphones --hrtf runs that through OpenAL's head related transfer functions, which is the difference between a key sounding placed somewhere around you and merely panned between your ears. OpenAL left to itself does this only when it believes it is talking to headphones, and --hrtf=auto is that default; the preferences window offers the same three choices while running.
The samples live one set to a directory under /usr/share/bucklespring/clips, the Model M recordings the program began with being the set called bucklespring. --list-clips says which are installed and --clips picks one; the preferences window lists them too and switches between them as it runs, dropping the samples of the old set so that the new ones load as you type. -p still names a directory of wav files directly, for a set kept somewhere of its own. A set need not cover the whole keyboard, and -f then borrows a clip for the rest, nearest first: the set's own generic click, so that it still sounds like the set that was chosen; failing that the same key from the set shipped with the program, the right key on the wrong keyboard; failing that the shipped set's generic click. Without -f a key the set does not cover stays silent. The preferences window carries the same switch, and the systemd unit shipped with this program passes -f when it starts.
A set may hold more than one recording of the same key, named XX-Y-Z with Z counting from zero, and one is chosen at random for each press, which keeps a held or repeated key from sounding like a loop of a single click. A set with one recording per key names it XX-Y as before.
Clips are read with libsndfile(3), so a set may be flac, wav, ogg or opus, the first of those found for a key winning in that order. The set shipped with the program is flac, lossless and a little under half the size of the same samples as wav; ogg and opus are smaller again at the cost of being lossy. Anything with more than one channel is mixed down to mono, OpenAL positioning only single channel buffers.
OPTIONS¶
- --clips=NAME
- play the clip set NAME; --list-clips says which are installed
- -d, --device=DEVICE
- use OpenAL audio device DEVICE
- -f, --fallback-sound
- use a fallback sound for unknown keys
- -g, --gain=GAIN
- set playback gain [0..100]
- --hrtf[=WHEN]
- filter for headphones, so that keys sound placed around you rather than panned: on, off, or auto to leave it to OpenAL
- -m, --mute-keycode=CODE
- use CODE as mute key (default 0x46 for scroll lock)
- -M, --mute
- start the program muted
- -c, --no-click[=LIST]
- don't play a sound on mouse click; LIST narrows it to some of left, middle, right, side, extra, wheel, hwheel, all, none
- -h, --help
- show help
- --list-clips
- list the clip sets that are installed
- -l, --list-devices
- list available OpenAL audio devices
- --preferences
- open the preferences window of the running bucklespring
- -p, --audio-path=PATH
- load clips from the directory PATH
- -r, --no-repeat
- stay silent while a held key auto repeats
- --repeat-delay=MS
- wait MS before the first repeat, overriding what the compositor or the kernel says
- --repeat-rate=HZ
- make HZ repeats per second, likewise
- -s, --stereo-width=WIDTH
- set stereo width [0..100]
- --no-tray
- do not put an icon in the system tray
- -v, --verbose
- increase verbosity / debugging
- -V, --version
- show version and exit
AUTHOR¶
Written by Ico Doornekamp.
COPYRIGHT¶
Copyright © 2016-2025 Ico Doornekamp License GPLv2+: GNU
GPL version 2 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
This manual page is generated from the output of buckle-libinput --help and --version by help2man(1), around wording written by Dominik George for the Debian project.
SEE ALSO¶
buckle-libinput.service(8), buckle-x11(1), update-alternatives(1)
| October 2026 | Bucklespring keyboard sound |