mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Sau Dan Lee <danlee@informatik.uni-freiburg.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: keyboard problem with 2.6.6
Date: Sun, 30 May 2004 14:43:53 +0200	[thread overview]
Message-ID: <20040530124353.GB1496@ucw.cz> (raw)
In-Reply-To: <xb71xl2b0to.fsf@savona.informatik.uni-freiburg.de>

On Sun, May 30, 2004 at 01:40:03PM +0200, Sau Dan Lee wrote:
> >>>>> "Vojtech" == Vojtech Pavlik <vojtech@suse.cz> writes:
> 
>     Vojtech> Q2: What application should be looking at the raw data
>     Vojtech> outside the kernel and why?
>     >>  What application should be looking at the raw data from an
>     >> RS232 port outside the kernel and why?
> 
>     Vojtech> Terminal. Terminals use the data directly.
> 
> Now, what prevents people from  connecting terminals to a computer via
> the PS/2 mouse port?

Their sanity.

Anyway, I don't oppose having the raw data available.

> There are  mice which can be attached  to both the RS232  port AND the
> PS/2 mouse port, needing only  an adaptor.  It should also be possible
> to use  a similar technique  to connect a  terminal to the  PS/2 mouse
> port.  This would be useful when you run out of RS232 ports.

Go ahead and try it. You'll fry your KBD port.

> Your  approach   in  the  input  system  completely   rules  out  this
> possibility.

Not such a big loss.

>     Vojtech> Anyway, the RS232 port is a multi purpose port, where you
>     Vojtech> can attach many different devices to it. For the keyboard
>     Vojtech> port, there is only one option, the keyboard. 
> 
> What a big assumption.  Yes, I admit that I don't know of any hardware
> implementations  that use  the PS/2  (or AT)  keyboard port  for other
> purposes.  Maybe there are POS systems like that?

No. The KBD interface is asymetric, only works on short distances, is
slow, cannot pass arbitrary data through, as it's by default translated
by the keyboard contoller, already assuming it's sending keyboard data,
all in all, it's completely unsuitable for anything else than a
keyboard.

You even cannot connect a mouse over it in the default mode of the port.

>     Vojtech> Of course, unless you create a device that can use it,
>     Vojtech> but in that case you can easily write a kernel driver for
>     Vojtech> it.
> 
> How about  the PS/2 mouse  port?  It's not  just for mice.   There ARE
> implementations using it for other things: touchpad, touchscreen, etc.

All simulate a mouse. Some have somewhat extended protocols, but those
protocols are still bound by mouse packet constraints, because the
controllers tend to do nasty things to the data passing through, like
merging input from multiple devices together into one stream by summing
the packets, etc.

> Your input  driver places that  stupid assumption that there  can't be
> other devices  outside your support list  that may use  the PS/2 mouse
> port, and  you make the  stupid assumption on  HOW the port  should be
> used.  That's within your  imaginations.  You're limiting other people
> to  your own  imaginations.   Worse still,  there  are ALREADY  things
> beyond your imaginations.

No. I'm just saying - if you want something that's not in the kernel
drivers, just write a driver for it. But the driver must be able to
coexist with the other drivers.

Your psaux/userspace serio driver is fine, except it cannot coexist with
the other drivers.

> Not everyone using  Linux is patient enough to  explore the Wonderland
> of kernel hacking.  Many immigrants from 2.4 are highly disappointed
> by the new but incompatible mouse/keyboard behaviours.  Some of them
> returned to their 2.4 homeland because of this.

Life's a change.

Anyway, at least 99% setups just keep working in 2.6.

> Not every new immigrant are that devoted to make the new country good.
> Many simply hop  back to the original country, or  hop to another that
> _may_ suit them better.

That's their freedom to do.

>     >> Raw keyboard data, for instance, can be captured for analyzing
>     >> how people use the keyboard and coming up with a more efficient
>     >> keyboard layout (c.f. Dvorak).  That's already beyond your
>     >> imaginations.
> 
>     Vojtech> The raw data not what you want to use there. You want the
>     Vojtech> keystroke data,
> 
> No.   I want  the  raw bytes.   (That's  also useful  for debugging  a
> hardware,  in  case  people  are  making  or  experimenting  with  new
> hardware.)

Sure. For debugging purposes, yes. But for analyzing the typing
behavior, the abstract data is better.

>     Vojtech>  and for that you can use the /dev/input/event interface,
> 
> But that's polluted  with some (0,0,0) events.  In  some situations, I
> NEED the raw, uninterpreted bytes,  much like people liking to watch a
> film or read  a book in the *original* language  version, not a dubbed
> or translated version.

Polluted. ;) Sorry, they're intentional. They're EV_SYN, SYN_REPORT
events, as you can find in input.h. They inform you that this is the end
of the whole report, which is useful for example for mice, where you
have more than one event (REL_X, REL_Y) per a report. 

The application reading the device is supposed to queue all events up to
the SYN_REPORT event, and then process them, so that a mouse pointer
will move diagonally instead of following the sides of a rectangle,
which would be very annoying.

> 
>     Vojtech> where you get them in a sane format (as opposed to the
>     Vojtech> PS/2 rawmode, which can send up ot 8 bytes for a single
>     Vojtech> keystroke).
> 
> Sane != helpful or more useful.
> 
> I could study the  I-Ching in English, but I would prefer  to do it in
> Chinese.  Now, your  approach is forcing me to do  it in English.  And
> you believe that's a good idea.

In your example, you wanted to study the frequency of keypresses, and
their relations. For that, it's best to ask the kernel to report
keypresses to you.

Should you want to analyze the keyboard protocol, the raw data is the
way to go. But that's been done many times before anyway.

>     Vojtech> Then your statistic analyser will work just fine even on
>     Vojtech> a Sun, Mac, or with an USB keyboard.
> 
> But it will not be able  to handle the specifics.  (That's the problem
> with  generic tools  in  general.  But  you  shouldn't be  restricting
> people to only those tools.  Some people have specific needs, and they
> should not be ignored.)

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  parent reply	other threads:[~2004-05-30 12:43 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-30 10:39 Sau Dan Lee
2004-05-30 11:18 ` Vojtech Pavlik
2004-05-30 11:40   ` Sau Dan Lee
2004-05-30 11:53     ` Russell King
2004-05-30 12:43     ` Vojtech Pavlik [this message]
2004-05-30 13:25       ` Sau Dan Lee
2004-05-30 13:42         ` SERIO_USERDEV patch for 2.6 Vojtech Pavlik
2004-05-30 15:09           ` Dmitry Torokhov
2004-05-30 15:58             ` Vojtech Pavlik
2004-05-30 16:10               ` Giuseppe Bilotta
2004-05-30 21:00                 ` Vojtech Pavlik
2004-05-31 12:43                   ` Giuseppe Bilotta
2004-05-30 16:16               ` Dmitry Torokhov
2004-05-30 20:51                 ` Vojtech Pavlik
2004-05-30 23:50                   ` Dmitry Torokhov
2004-05-31  6:30                     ` Vojtech Pavlik
2004-06-01  8:18           ` Tuukka Toivonen
2004-06-03 10:21             ` [PATCH] " Tuukka Toivonen
2004-06-03 12:21               ` Sau Dan Lee
2004-06-03 13:46               ` Luciano Moreira - igLnx
2004-06-03 21:23               ` Vojtech Pavlik
2004-06-01 16:50           ` Sau Dan Lee
2004-06-01 18:18             ` Dmitry Torokhov
2004-06-01 22:23               ` Giuseppe Bilotta
2004-06-01 23:50                 ` Dmitry Torokhov
2004-06-02 15:08                   ` Giuseppe Bilotta
2004-06-01 21:01         ` keyboard problem with 2.6.6 jsimmons
2004-06-01 21:12           ` Valdis.Kletnieks
2004-05-30 13:54       ` Eduard Bloch
2004-05-30 14:03         ` Vojtech Pavlik
2004-06-01 21:03           ` jsimmons
2004-06-04 14:11     ` Pavel Machek
     [not found] <xb7oenxyqly.fsf@savona.informatik.uni-freiburg.de>
     [not found] ` <200406071551.i57Fpl89023562@turing-police.cc.vt.edu>
     [not found]   ` <xb7zn7fwdia.fsf@savona.informatik.uni-freiburg.de>
     [not found]     ` <200406071636.i57Gafh7024942@turing-police.cc.vt.edu>
     [not found]       ` <xb7r7sqwncc.fsf@savona.informatik.uni-freiburg.de>
     [not found]         ` <200406081502.i58F2gF3013622@turing-police.cc.vt.edu>
2004-06-09  8:17           ` Sau Dan Lee
2004-06-09 16:56             ` Valdis.Kletnieks
2004-06-09 17:12               ` Sau Dan Lee
2004-06-09 17:29                 ` Valdis.Kletnieks
  -- strict thread matches above, loose matches on Subject: below --
2004-06-06  9:43 Sau Dan Lee
2004-06-06  9:37 Sau Dan Lee
2004-06-06 11:29 ` Martin Schlemmer
2004-06-06 12:07 ` Vojtech Pavlik
2004-06-06 15:09 ` Dmitry Torokhov
2004-06-06 16:13   ` Sau Dan Lee
     [not found]   ` <200406061929.45169.vda@port.imtp.ilyichevsk.odessa.ua>
     [not found]     ` <200406061140.35929.dtor_core@ameritech.net>
2004-06-06 16:51       ` Sau Dan Lee
     [not found] <xb7ekp2b34y.fsf@savona.informatik.uni-freiburg.de>
     [not found] ` <20040530112138.GC1377@ucw.cz>
2004-05-30 11:43   ` Sau Dan Lee
2004-05-30 12:45     ` Vojtech Pavlik
2004-05-30 13:25       ` Sau Dan Lee
2004-05-30 10:57 Sau Dan Lee
2004-06-01 11:31 ` Pavel Machek
2004-06-01 14:06   ` John Bradford
2004-05-30 10:45 Sau Dan Lee
2004-05-30 11:20 ` Vojtech Pavlik
2004-05-28 13:59 Tuukka Toivonen
2004-05-29 13:14 ` Vojtech Pavlik
2004-06-04 14:54   ` Tuukka Toivonen
2004-06-04 16:06     ` Vojtech Pavlik
2004-05-25 20:16 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:57   ` Andries Brouwer
2004-05-28 19:41 ` 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=20040530124353.GB1496@ucw.cz \
    --to=vojtech@suse.cz \
    --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

all inboxes | Powered by JetHome®