2004-04-19 02:05:53

by Ameer Armaly

[permalink] [raw]
Subject: [patch] config option to make at keyboards beep when too many keys are pressed

Hi all.
Here are two patches, that should be applied in
/usr/src/linux/drivers/input. These make a config option, that if
selected, allows atd keyboards to beep rather than cluttering the screen
with messages about too many keys pressed. This has been patched
against the latest kernel tree from bitkeeper.


Attachments:
atkbd.patch (460.00 B)
Kconfig.patch (446.00 B)
Download all attachments

2004-04-19 04:44:05

by Willy Tarreau

[permalink] [raw]
Subject: Re: [patch] config option to make at keyboards beep when too many keys are pressed

On Sun, Apr 18, 2004 at 09:49:53PM -0400, ameer armaly wrote:

> +#else
> +printk(KERN_ALERT, "\007");
> +#endif goto out;

Not speaking about poor indentation, this is not the right solution. You
will pollute system logs with \007, and you might even send the beep far
away from the keyboard, if the console is on a serial terminal. A better
solution would be to call a function which activates the local speaker,
typically the one used to output "\007" on a vt.

> +config BEEP_TOMANEY_KEYS
> +bool "Beep when too many keys are pressed on at keyboards"
> +depends on KEYBOARD_ATKBD

please respect indentation here too, just as it is below :

> config KEYBOARD_SUNKBD
> tristate "Sun Type 4 and Type 5 keyboard support"
> depends on INPUT && INPUT_KEYBOARD

Regards,
Willy