clicky driver

b. f. bf1783 at googlemail.com
Sun Dec 27 07:12:05 UTC 2009


>        Anybody know how I can redirect the beep to my speakers?  I miss
>       the confirmation that vi/vim puts out.

Outside of X, our kbdcontrol(1) offers pitch and duration (but not
volume) control for the console bell via the -b flag.  The volume is
often dependent upon the hardware and/or the bios, and in some cases
cannot be easily changed.

Unfortunately, our keyboard-handling code does not seem to allow the
remapping of individual keys to strings -- I think that can be done in
Linux -- so we can't add a bel to every keypress by defining an
alternative keymap via kbdcontrol, without hacking the code (but since
ed@ is working on a new console driver, this might be a good time to
request features...).  However, at a slightly higher level, many
shells and editors will allow you to rebind keys.  And some will allow
you to redefine the action taken when the bell is sounded:  for
instance, out csh(1) has the nifty "beepcmd".  You could customize
this to play a sound file of your own choice through your sound card,
where you presumably have more control over the sound, and then try to
use bindkey to issue bels with keypresses.  Of course, this will only
take effect while you're in that shell or editor, but
you could use the idea to hack the syscons(4) driver to redefine
sc_bell() if a certain sysctl is set...


b.


More information about the freebsd-questions mailing list