From: Vojtech Pavlik <vojtech@suse.cz>
To: Sau Dan Lee <danlee@informatik.uni-freiburg.de>
Cc: Andries Brouwer <aebr@win.tue.nl>, linux-kernel@vger.kernel.org
Subject: Re: BUG FIX: atkbd.c keyboard driver bug [Was: keyboard problem with 2.6.6]
Date: Tue, 1 Jun 2004 11:55:18 +0200 [thread overview]
Message-ID: <20040601095518.GA1527@ucw.cz> (raw)
In-Reply-To: <xb7iseb7gtv.fsf@savona.informatik.uni-freiburg.de>
On Tue, Jun 01, 2004 at 11:44:44AM +0200, Sau Dan Lee wrote:
> >>>>> "bugme-daemon" == bugme-daemon <bugme-daemon@osdl.org> writes:
>
> bugme-daemon> http://bugme.osdl.org/show_bug.cgi?id=2808
> bugme-daemon> vojtech@suse.cz changed:
>
> bugme-daemon> What |Removed |Added
> bugme-daemon> ----------------------------------------------------
> bugme-daemon> Status|NEW |REJECTED
> bugme-daemon> Resolution| |INVALID
>
> Vojtech> I'm sorry you can't use the fn+printscreen function on
> Vojtech> your LifeBook, but such is life.
>
> Disappointed.
>
> Vojtech> Is using Alt+printscreen such a big difference?
>
> That means I need to press FOUR keys to use sysrq, because PrintScreen
> is only available via [Fn]. That becomes [Fn]+Alt+PrintScreen+X,
> where "X" is the sysrq function. :(
>
>
> Vojtech> On USB keyboards (and many others, too), there is no
> Vojtech> specific SysRq keycode, and thus the kernel magic-sysrq
> Vojtech> handler uses the alt-printscreen combination, to make it
> Vojtech> work on ALL keyboards. This is intentional.
>
> Isn't the keyboard driver supposed to iron out such differences?
The atkbd.c driver does exactly that. It hides the fact that there is a
special scancode for the PrintScreen key, if you press it together with
some other keys.
There is no special scancode on any other keyboard type for it,
including PS/2 keyboards in their native Set3 mode.
It's a hack by IBM engineers, the PC/XT keyboard had a SysRq key, the
PC/AT keyboard did not, yet some old DOS programs needed it, so they
made the AT keyboard generate the keycode for alt-sysrq when running in
XT compatibility mode.
Unfortunately, the XT compatibility mode stuck, and that's what we're
using now.
> Isn't it your philosophy that the drivers should know the devices
> well, and present a consistent interface to the upper layers? Then,
> the correct way to do it is:
>
> USB keyboard driver: generate a "sysrq" event in reaction to
> Alt-PrintScreen
> AT/PS2 keyboard driver: generate a "sysrq" when receiving a
> 0x54 keycode
>
> The kernel keyboard handler shouldn't see or bother about the
> difference. It is insane that the handler has to care about the
> status of the Alt keys.
The kernel works with real keys. There is no real sysrq key. My
definition of sanity is to base your thinking on reality where possible.
> Vojtech> Further, keycode 99 is KEY_SYSRQ, as defined in input.h,
>
> Then, why use it for PrintScreen? With the 'evbug' facility, I see a
> keyboard event with code KEY_SYSRQ when I press PrintScreen. Just
> PrintScreen, not Alt-PrintScreen. So, this is a feature and not a
> bug?
Ok, it's probably a bad name for it, it should have been named
KEY_PRTSCR, but it wasn't, and it'd only cause breakage now to change
it.
> Vojtech> and is used for the PrtScr/SysRq key.
>
> So, why not have seperate keycodes for the two?
Because there is only one key.
--
Vojtech Pavlik
SuSE Labs, SuSE CR
next prev parent reply other threads:[~2004-06-01 9:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 20:55 [PATCH] SERIO_USERDEV: direct userspace access to mouse/keyboard psaux serial ports Tuukka Toivonen
2004-05-08 2:35 ` Andrew Morton
2004-05-25 20:16 ` keyboard problem with 2.6.6 Chris Osicki
2004-05-26 7:54 ` Sau Dan Lee
2004-05-28 13:33 ` Giuseppe Bilotta
2004-05-28 17:37 ` Sau Dan Lee
2004-05-29 13:12 ` Vojtech Pavlik
2004-05-30 9:45 ` Sau Dan Lee
2004-05-30 10:19 ` Vojtech Pavlik
2004-05-30 11:25 ` Sau Dan Lee
2004-05-30 11:40 ` Brad Campbell
2004-05-30 12:01 ` Oliver Neukum
2004-05-30 12:22 ` Sau Dan Lee
2004-05-30 12:32 ` Oliver Neukum
2004-05-30 12:16 ` Vojtech Pavlik
2004-05-30 12:40 ` Sau Dan Lee
2004-05-30 12:52 ` Vojtech Pavlik
2004-05-30 16:09 ` Stefan Seyfried
2004-05-30 17:26 ` Dmitry Torokhov
2004-06-04 13:58 ` Pavel Machek
2004-06-04 18:17 ` Horst von Brand
2004-06-04 18:37 ` Valdis.Kletnieks
2004-06-04 19:33 ` Denis Vlasenko
2004-06-04 19:50 ` Valdis.Kletnieks
2004-06-04 20:48 ` Denis Vlasenko
2004-06-04 18:39 ` Pavel Machek
2004-06-04 18:46 ` Sau Dan Lee
2004-06-04 19:09 ` Pavel Machek
2004-06-06 9:01 ` Sau Dan Lee
2004-06-06 16:40 ` Pavel Machek
2004-05-28 19:39 ` 2.6.* useland replacements of the atkbd and psmouse modules Sau Dan Lee
2004-05-28 19:57 ` keyboard problem with 2.6.6 Andries Brouwer
2004-06-01 8:21 ` BUG: atkbd.c keyboard driver bug [Was: keyboard problem with 2.6.6] Sau Dan Lee
2004-06-01 9:13 ` BUG FIX: " Sau Dan Lee
[not found] ` <200406010904.i5194pSo010367@fire-2.osdl.org>
2004-06-01 9:44 ` Sau Dan Lee
2004-06-01 9:55 ` Vojtech Pavlik [this message]
2004-06-01 10:03 ` Sau Dan Lee
2004-06-01 12:42 ` Giuseppe Bilotta
2004-05-28 19:41 ` keyboard problem with 2.6.6 Andries Brouwer
2004-05-28 20:10 ` Andries Brouwer
[not found] ` <20040528214620.GA2352@gucio>
2004-05-29 13:23 ` Andries Brouwer
2004-05-29 13:46 ` Vojtech Pavlik
2004-05-29 14:30 ` Andries Brouwer
2004-05-29 14:41 ` Vojtech Pavlik
2004-05-29 15:12 ` Giuseppe Bilotta
[not found] <MPG.1b2111558bc2d299896a2@news.gmane.org.suse.lists.linux.kernel>
[not found] ` <20040525201616.GE6512@gucio.suse.lists.linux.kernel>
[not found] ` <xb7hdu3fwsj.fsf@savona.informatik.uni-freiburg.de.suse.lists.linux.kernel>
[not found] ` <xb7aczscv0q.fsf@savona.informatik.uni-freiburg.de.suse.lists.linux.kernel>
[not found] ` <20040529131233.GA6185@ucw.cz.suse.lists.linux.kernel>
[not found] ` <xb7y8nab65d.fsf@savona.informatik.uni-freiburg.de.suse.lists.linux.kernel>
[not found] ` <20040530101914.GA1226@ucw.cz.suse.lists.linux.kernel>
[not found] ` <xb765aeb1i3.fsf@savona.informatik.uni-freiburg.de.suse.lists.linux.kernel>
[not found] ` <20040530121606.GA1496@ucw.cz.suse.lists.linux.kernel>
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=20040601095518.GA1527@ucw.cz \
--to=vojtech@suse.cz \
--cc=aebr@win.tue.nl \
--cc=danlee@informatik.uni-freiburg.de \
--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