public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Andries Brouwer <aebr@win.tue.nl>
Cc: Roman Zippel <zippel@linux-m68k.org>, linux-kernel@vger.kernel.org
Subject: Re: Possible bug in keyboard.c (2.6.10)
Date: Sat, 29 Jan 2005 12:12:33 +0100	[thread overview]
Message-ID: <20050129111233.GA2268@ucw.cz> (raw)
In-Reply-To: <20050128215939.GF6010@pclin040.win.tue.nl>

On Fri, Jan 28, 2005 at 10:59:39PM +0100, Andries Brouwer wrote:
> On Fri, Jan 28, 2005 at 12:10:05PM +0100, Vojtech Pavlik wrote:
> 
> > And, btw, raw mode in 2.6 is not badly broken. It works as it is
> > intended to. If you want the 2.4 behavior on x86, you just need to
> > specify "atkbd.softraw=0" on the kernel command line.
> 
> Thanks for pointing that out - I should have read patch-2.6.9 more
> carefully. I'll add that to the setkeycodes.8 man page.
> 
> Nevertheless I disagree a bit. "raw mode" is by definition the mode
> where scan codes are passed unmodified to user space.
> So before 2.6.9 this was just broken, and since 2.6.9 it is broken
> by default but there is a boot option to make it work.

The problem is that users wouldn't be happy if I passed USB usage codes
when they enable raw mode with an USB keyboard.

The expectation is that 'it will work'.

Because of that, the 'softraw=0' option _only_ works for AT and PS/2
keyboards, with any other keyboard type it has no effect.

> What is the reason that you do not make this the default?

To have all keyboard types behave the same, instead of having a single
exception, although I admit that the exception would be for the most
common case.

> The current default is really messy and confusing, especially
> when people have to map keys using setkeycodes.

The emulated rawmode is there mainly for X. If it weren't for X, I
wouldn't bother generating rawmode for keyboards other than PS/2, and
for PS/2 I'd have kept the true raw data there.

However, on 2.6, where you can have more than one keyboard, it'd be
better to use the EVIOCSKEYCODE ioctl on the event device instead of the
KDSKEYCODE ioctl on the console, as the later only changes the first
found keyboard.

Also, if setkeycodes used the event device, it'd get the raw scancodes
easily, as they're embedded in the event stream together with the
keycodes.

I'd hoped someone of the lineak/.../... multimedia key people will make
such an utility, but now I see that what one doesn't do himself, doesn't
happen. I will write it, possibly as a patch to setkeycodes.

> BTW, now that I read the corresponding code:
> 
>         if (atkbd_softrepeat)
>                 atkbd_softraw = 1;
> 
>         if (!atkbd_softrepeat) {
>                 atkbd->dev.rep[REP_DELAY] = 250;
>                 atkbd->dev.rep[REP_PERIOD] = 33;
>         } else atkbd_softraw = 1;
> 
> The "else" part is superfluous.

It indeed is. It's been removed, too.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  reply	other threads:[~2005-01-29 19:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27  3:16 Possible bug in keyboard.c (2.6.10) Sasa Stevanovic
2005-01-27  4:50 ` Dmitry Torokhov
2005-01-27 10:16   ` Sasa Stevanovic
2005-01-27 12:56 ` Andries Brouwer
2005-01-28  0:39   ` Roman Zippel
2005-01-28 10:59     ` Vojtech Pavlik
2005-01-29  4:50       ` Al Viro
2005-01-29 11:25         ` Vojtech Pavlik
2005-01-29 23:35           ` Dmitry Torokhov
2005-01-31  9:01             ` Vojtech Pavlik
2005-01-30  8:41           ` Al Viro
2005-01-30 23:21             ` Dmitry Torokhov
2005-01-30 23:29               ` Dmitry Torokhov
2005-02-03  6:54               ` Dmitry Torokhov
2005-01-29 12:11       ` Roman Zippel
2005-01-29 14:04         ` Vojtech Pavlik
2005-01-30 20:13           ` Roman Zippel
2005-01-28 11:10     ` Vojtech Pavlik
2005-01-28 21:59       ` Andries Brouwer
2005-01-29 11:12         ` Vojtech Pavlik [this message]
2005-01-29 23:30           ` Dmitry Torokhov
2005-01-30 23:16     ` Pavel Machek

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=20050129111233.GA2268@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.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