public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Schniedermeyer <ms@citd.de>
To: Loye Young <loyeyoung@iycc.net>
Cc: linux-kernel@vger.kernel.org, "James, <jsimmons@infradead.org>,
	loye.young@iycc.net, Simmons"@iycc.net
Subject: Re: The Input Layer and the Serial Port
Date: Thu, 28 Dec 2006 14:51:20 +0100	[thread overview]
Message-ID: <4593CBD8.3020508@citd.de> (raw)
In-Reply-To: <20061227235400.358E43FC065@hamlet.sw.biz.rr.com>

Loye Young wrote:
>>Take for example the AT keyboard which is
>>one of the most common keyboards in the world. I have seen and
>>used it attached to a PC via parport, serial port and the standard
>>PS/2 port. So to handle cases like this the input layer created a
>>serio interface. 
> 
> 
> If plain ASCII text is coming in the serial port, would the kernel know or even care what device was generating the characters? Could I just use whatever interface you did?

A problem at this point may be that a AT-keyboard doesn't spit out ASCII
but Scan-Codes, so a serial device spitting out ASCII would have to be
put into the loop AFTER the stage that makes conversions, or you would
have to convert ASCII back to Scan-Codes before.

Btw. I'm not normaly into barcode-scanning, but for something at work i
tried a USB-scanner (From Symbol AFAIR) to see what is stored in the
barcodes that are on the prints that i have to generate. The scanner
just registered as a plain HID-device, which resulted in the data
comming as key-presses. It was just "Plug & Play", i didn't need any
software or anything else. I just plugged the device in, opened a
text-editor to catch the data, then i scanned the bar-codes and was
happy. :-)

So if you aren't nailed to a serial scanner, you just may try a USB-scanner.

>>I recommend you take a look at sermouse.c 
>>in the drivers/input.mouse directory
>>for a guide.
> 
> 
> I looked, but the source code I have (2.6.17, Debian) doesn't have anything called sermouse.c in the /drivers/input directory.

# find /usr/src/linux-2.6.19 -name "*sermouse*"
/usr/src/linux-2.6.19/drivers/input/mouse/sermouse.c





Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.


  reply	other threads:[~2006-12-28 13:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-27 23:54 The Input Layer and the Serial Port Loye Young
2006-12-28 13:51 ` Matthias Schniedermeyer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-06-06 11:19 Lars K.W. Gohlke
2006-12-27 19:54 Loye Young
2006-12-27 21:10 ` James Simmons
2006-12-28 16:13 ` Richard Purdie
2006-12-30 15:05 ` Petr Stetiar
2007-01-02 11:38 ` David Greaves

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=4593CBD8.3020508@citd.de \
    --to=ms@citd.de \
    --cc="James, <jsimmons@infradead.org>, loye.young@iycc.net, Simmons"@iycc.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loyeyoung@iycc.net \
    /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