From owner-freebsd-questions@FreeBSD.ORG Sun Dec 27 07:12:05 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F9FD106566B; Sun, 27 Dec 2009 07:12:05 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 960E68FC17; Sun, 27 Dec 2009 07:12:04 +0000 (UTC) Received: by ewy26 with SMTP id 26so6489060ewy.3 for ; Sat, 26 Dec 2009 23:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=tUci5fhk0m9cblrv/agV+LDV5hEL3e+p4aDfRGYvmdo=; b=Ru6dULBwjKrCsma018oIYyckHCXSObEUN0r8sjNODGJWugriMBsLvNnScmmc5j6UdO 0d79a7QnMvBHtGeZXtGdfIlEqodoIZU6vvj4fUeBcUoXCLl3I8H6MxPJ+T1T/xE+Ss2/ 1JVvJuMZiaANKYfh8FD+ZBx+QAx9I6L3NuzHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=LgsLDZNeyx80coXsAm1ka/VKv/cclvD/1dkMLVoZKsVdLaaAxgOYOgYczIi0dKxxpD mY+YfrM1fr9cMv6Vbu6Dsv0u2hDHUP+LqU/wcfzfIWrx8UFb0HzWzHKeG+PkHnenyzK5 iF0uhfYbRCFAE9fmTT7jPfmAzQEi3w/yL8oPw= MIME-Version: 1.0 Received: by 10.216.87.81 with SMTP id x59mr4898010wee.147.1261897915266; Sat, 26 Dec 2009 23:11:55 -0800 (PST) Date: Sun, 27 Dec 2009 02:11:55 -0500 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: ed@FreeBSD.org Subject: Re: clicky driver X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Dec 2009 07:12:05 -0000 > 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.