* [patch] config option to make at keyboards beep when too many keys are pressed
@ 2004-04-19 1:49 ameer armaly
2004-04-19 4:42 ` Willy Tarreau
0 siblings, 1 reply; 2+ messages in thread
From: ameer armaly @ 2004-04-19 1:49 UTC (permalink / raw)
To: linux-kernel; +Cc: linus
[-- Attachment #1: Type: TEXT/PLAIN, Size: 310 bytes --]
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.
[-- Attachment #2: Type: TEXT/PLAIN, Size: 460 bytes --]
--- atkbd.orig 2004-04-18 21:31:22.000000000 -0400
+++ atkbd.c 2004-04-18 21:40:59.000000000 -0400
@@ -284,8 +284,12 @@
atkbd_report_key(&atkbd->dev, regs, KEY_HANJA, 3);
goto out;
case ATKBD_RET_ERR:
+#ifndef CONFIG_BEEP_TOMANY_KEYS
printk(KERN_WARNING "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys);
- goto out;
+
+#else
+printk(KERN_ALERT, "\007");
+#endif goto out;
}
if (atkbd->set != 3)
[-- Attachment #3: Type: TEXT/PLAIN, Size: 446 bytes --]
--- Kconfig 2004-04-18 21:34:52.000000000 -0400
+++ kconfig 2004-04-18 21:37:44.000000000 -0400
@@ -29,6 +29,9 @@
To compile this driver as a module, choose M here: the
module will be called atkbd.
+config BEEP_TOMANEY_KEYS
+bool "Beep when too many keys are pressed on at keyboards"
+depends on KEYBOARD_ATKBD
config KEYBOARD_SUNKBD
tristate "Sun Type 4 and Type 5 keyboard support"
depends on INPUT && INPUT_KEYBOARD
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] config option to make at keyboards beep when too many keys are pressed
2004-04-19 1:49 [patch] config option to make at keyboards beep when too many keys are pressed ameer armaly
@ 2004-04-19 4:42 ` Willy Tarreau
0 siblings, 0 replies; 2+ messages in thread
From: Willy Tarreau @ 2004-04-19 4:42 UTC (permalink / raw)
To: ameer armaly; +Cc: linux-kernel, linus
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-19 4:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-19 1:49 [patch] config option to make at keyboards beep when too many keys are pressed ameer armaly
2004-04-19 4:42 ` Willy Tarreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox