From: Geoff Jacobsen <geoffj@paradise.net.nz>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] kernel-2.4.21-final drivers/char/keyboard.c - key release bug
Date: 15 Jun 2003 15:18:06 +1200 [thread overview]
Message-ID: <1055647086.1066.32.camel@choc.casquet> (raw)
-- I am not on the list; please reply to geoffj@casquet.inet.net.nz --
In the kernel-2.4.21-final drivers/char/keyboard.c file there was a
workaround applied from the AC patches "for hardware which sometimes
send the key release event twice".
Unfortunately this fix causes a bug. If you hold down the left_ctrl and
press the right_ctrl then the left_ctrl release is missed (same story
with the two alt keys).
In X this means that until the left_ctrl is pressed again every key
typed will be as if the left_ctrl is still held down.
Removing the workaround fixes the problem.
Here is the patch to remove the offending code:
--- linux-2.4.21/drivers/char/keyboard.c 2003-06-15
15:00:38.000000000 +1200
+++ linux/drivers/char/keyboard.c 2003-06-15 15:03:00.000000000
+1200
@@ -72,7 +72,7 @@
/*
* global state includes the following, and various static variables
- * in this module: prev_scancode, shift_state, diacr, npadch,
dead_key_next.
+ * in this module: shift_state, diacr, npadch, dead_key_next.
* (last_console is now a global variable)
*/
@@ -95,7 +95,6 @@
static struct tty_struct **ttytab;
static struct kbd_struct * kbd = kbd_table;
static struct tty_struct * tty;
-static unsigned char prev_scancode;
void compute_shiftstate(void);
@@ -215,17 +214,7 @@
}
kbd = kbd_table + fg_console;
if ((raw_mode = (kbd->kbdmode == VC_RAW))) {
- /*
- * The following is a workaround for hardware
- * which sometimes send the key release event twice
- */
- unsigned char next_scancode = scancode|up_flag;
- if (up_flag && next_scancode==prev_scancode) {
- /* unexpected 2nd release event */
- } else {
- prev_scancode=next_scancode;
- put_queue(next_scancode);
- }
+ put_queue(scancode | up_flag);
/* we do not return yet, because we want to maintain
the key_down array, so that we have the correct
values when finishing RAW mode or when changing VT's
*/
--
Geoff Jacobsen <geoffj@casquet.inet.net.nz>
reply other threads:[~2003-06-15 3:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1055647086.1066.32.camel@choc.casquet \
--to=geoffj@paradise.net.nz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®