Background and instructions for typekey, etc.

Registered by Loye Young

Correspondence between the maintainer and author of typekeys, a program supplied by serial-text.

Blueprint information

Status:
Not started
Approver:
Loye Young
Priority:
Undefined
Drafter:
Loye Young
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td align=right>
<font size=-1><b>
Loye Young
&lt;loye.young [at some email domain] like iycc.net&gt;
</b></td>
</tr>
</table>
<hr>
<font size=+2>
<b>Re: serial barcode reader in linux</b></font><br>
<font size=-1>8 messages</font>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Jiri Bohac
&lt;jbohac [at some email domain] like suse &gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Mon, Jun 4, 2007 at 12:42 PM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
loye.young [at some email domain] like iycc.net
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1>Hi,<br />
<br />
&gt; This is a very interesting and apparently elegant approach. I<br />
&gt; apologize for my technical ignorance, however. I don't<br />
&gt; understand how to make typekeys work.<br />
&gt;<br />
&gt; 1. &nbsp;How is this program to be compiled? As a kernel module? A<br />
&gt; device driver?<br />
<br />
It is a standard userspace program. Modern 2.6 kernels allow<br />
userspace programs to inject iput events into the kernel using<br />
the uinput device (/dev/input/uinput)<br />
<br />
You just compile it with<br />
<br />
gcc -o typekeys typekeys.c<br />
<br />
This produces a typekeys executable.<br />
<br />
&gt; 2. &nbsp;You say:<br />
&gt;<br />
&gt; &nbsp;* Translates data from stdin to uinput key press / key release<br />
&gt; &nbsp;* sequences and feeds them to /dev/input/uinput<br />
&gt;<br />
&gt; How does the data get to stdin in the first place? What's<br />
&gt; reading the serial port?<br />
&gt;<br />
&gt; 3. &nbsp;What is the ttySA device and how does it get created?<br />
&gt; There's not one on my (Debian/Ubuntu) systems. Is it the SUSE<br />
&gt; name for ttyS0?<br />
<br />
oops, that was a typo. It was meant to be ttyS0.<br />
I've seen in one of your posts (don't remember where), that wwhen<br />
you do &quot;cat /dev/ttyS0&quot;, you can see the data coming from the<br />
barcode reader.<br />
<br />
So this program can read the data the same way cat does.<br />
You can redirect the stdin, or cat the data into it.<br />
<br />
cat /dev/ttyS0 | typekeys typekeys.conf<br />
or<br />
typekeys typekeys.conf &lt; /dev/ttyS0<br />
<br />
You need to have the serial port set up properly (using stty).<br />
But once you can get the correct data using cat, typekeys should<br />
work.<br />
<br />
<br />
&gt; 4. &nbsp;Do I need to put it in the rcS script so that it will<br />
&gt; invoke on bootup?<br />
<br />
yes, you need to somehow ensure this program will run. My<br />
suggestion would be putting it in /etc/inittab<br />
But as you probably (?) can not redirect IO in inittab, I would<br />
first make a script (e.g. /usr/local/bin/barcode)<br />
with something like:<br />
#!/bin/bash<br />
stty /dev/ttyS0 whatever parameters you need<br />
/usr/local/bin/typekeys &lt; /dev/ttyS0<br />
<br />
And then run this from the inittab (e.g. below the stty lines):<br />
tk:2345:respawn:/usr/local/<wbr />bin/barcode<br />
<br />
Or put it somewhere in rcS, you just need to make sure it does<br />
not get killed when the parent process terminates (you may use<br />
something like nohup for that)<br />
<br />
&gt; 5. &nbsp;Once typekeys is invoked, does the barcode data show up in<br />
&gt; all applications, including applications running under X, just<br />
&gt; like the keyboard?<br />
<br />
exactly.<br />
<font color=#888888><br />
j.<br />
</font></font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Loye Young
&lt;loye.young [at some email domain] like iycc.net&gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Mon, Jun 4, 2007 at 4:19 PM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
Jiri Bohac &lt;jbohac [at some email domain] like suse &gt;, Vojtech Pavlik &lt;vpavlik [at some email domain] like suse &gt;
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1>Biggest issue I see is how to make sure the device gets handled correctly by udev, because ttyS0 might change from reboot to reboot. <br><br>Vojtech Pavlik (<a href="mailto:vpavlik [at some email domain] like suse " target="_blank">vpavlik [at some email domain] like suse </a>) has written very similar drivers for serial keyboards and they are incorporated in the kernel now. (See the kernel keyboard input source tree, ./linux/drivers/input/<WBR>keyboards, especially
xtkbd.c, sunkbd.c, lkkdbd.c, hilkbd.c, and atkbd.c.) Your code looks like a simplified version of those. The uinput solution in this case seems like a circumvention of the udev approach to device management. It seems to me that a driver in the input/keyboards branch of the kernel tree would be the right solution.
<br><br>I note that you both have [at some email domain]<a href="http://suse.cz" target="_blank">suse.cz</a> email addresses, so perhaps you are acquainted with Mr. Pavlik. He single-handedly wrote the input device drivers in the kernel, so he&#39;s been down this road before. Does he have any insight on this?
<br><br>Loye Young<br><br><br>-- <br>Loye Young<br>Isaac &amp; Young Computer Company<br>Laredo, Texas<br>(956) 857-1172<br><a href="mailto:loye.young [at some email domain] like iycc.net" target="_blank">loye.young [at some email domain] like iycc.net</a><div style='padding:5 0'><font size=1 color=#888888>[Quoted text hidden]</font></div><b><i>Jiri Bohac &lt;<a href="mailto:jbohac [at some email domain] like suse " target="_blank">
jbohac [at some email domain] like suse </a>&gt;</i></b> wrote:<blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px">
Hi, <br><br>I saw your posts in many places, trying to find a way to connect<br>your serial barcode reader to linux and make it transparently<br>available to applications as a keyboard.<br><br>Don&#39;t know if you found a solution yet. I will need the same
<br>thing sooner or later, so I made a small program called<br>&quot;typekeys&quot; that you might find useful.<br><br>You can get it here <a href="http://www.jikos.cz/~jbohac/goodies/" target="_blank">http://www.jikos.cz/~jbohac/<WBR>goodies/
</a><br><br>You can then use like this:<br><br>typekeys typekeys.conf <br><br>You need to have uinput working (modprobe uinput).<br><br><br>Hope you can use it. Good luck.<br><br><br>-- <br>Jiri Bohac <br>SUSE Labs, SUSE CZ
<br><br></blockquote><br>
</font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Mail Delivery System
&lt;MAILER-DAEMON [at some email domain] like suse &gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Mon, Jun 4, 2007 at 4:20 PM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
loye.young [at some email domain] like iycc.net
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1>This is the Postfix program at host <a href="http://spicebloom.suse.cz" target="_blank">spicebloom.suse.cz</a>.<br />
<br />
I'm sorry to have to inform you that your message could not be<br />
be delivered to one or more recipients. It's attached below.<br />
<br />
For further assistance, please send mail to &lt;postmaster&gt;<br />
<br />
If you do so, please include this problem report. You can<br />
delete your own text from the attached returned message.<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The Postfix program<br />
<br />
&lt;<a href="mailto:vpavlik [at some email domain] like suse ">vpavlik [at some email domain] like suse </a>&gt;: host<br />
&nbsp; &nbsp;/data/cyrus/lib/imap/socket/<wbr />lmtp[/data/cyrus/lib/imap/<wbr />socket/lmtp] said:<br />
&nbsp; &nbsp;550-Mailbox unknown. &nbsp;Either there is no mailbox associated with this<br />
&nbsp; &nbsp;550-name or you do not have authorization to see it. 550 5.1.1 User unknown<br />
&nbsp; &nbsp;(in reply to RCPT TO command)<br />
<br>Final-Recipient: rfc822; <a href="mailto:vpavlik [at some email domain] like suse ">vpavlik [at some email domain] like suse </a><br />
Action: failed<br />
Status: 5.0.0<br />
Diagnostic-Code: X-Postfix; host<br />
&nbsp; &nbsp;/data/cyrus/lib/imap/socket/<wbr />lmtp[/data/cyrus/lib/imap/<wbr />socket/lmtp] said:<br />
&nbsp; &nbsp;550-Mailbox unknown. &nbsp;Either there is no mailbox associated with this<br />
&nbsp; &nbsp;550-name or you do not have authorization to see it. 550 5.1.1 User unknown<br />
&nbsp; &nbsp;(in reply to RCPT TO command)<br />
<br><br>---------- Forwarded message ----------<br>From:&nbsp;&quot;Loye Young&quot; &lt;loye.young [at some email domain] like iycc.net&gt;<br>To:&nbsp;&quot;Jiri Bohac&quot; &lt;jbohac [at some email domain] like suse &gt;, &quot;Vojtech Pavlik&quot; &lt;vpavlik [at some email domain] like suse &gt;<br>Date:&nbsp;Mon, 4 Jun 2007 16:19:53 -0500<br>Subject:&nbsp;Re: serial barcode reader in linux<br>Biggest issue I see is how to make sure the device gets handled correctly by udev, because ttyS0 might change from reboot to reboot. <br><br>Vojtech Pavlik (<a href="mailto:vpavlik [at some email domain] like suse " target="_blank">vpavlik [at some email domain] like suse </a>) has written very similar drivers for serial keyboards and they are incorporated in the kernel now. (See the kernel keyboard input source tree, ./linux/drivers/input/<WBR>keyboards, especially
xtkbd.c, sunkbd.c, lkkdbd.c, hilkbd.c, and atkbd.c.) Your code looks like a simplified version of those. The uinput solution in this case seems like a circumvention of the udev approach to device management. It seems to me that a driver in the input/keyboards branch of the kernel tree would be the right solution.
<br><br>I note that you both have [at some email domain]<a href="http://suse.cz" target="_blank">suse.cz</a> email addresses, so perhaps you are acquainted with Mr. Pavlik. He single-handedly wrote the input device drivers in the kernel, so he&#39;s been down this road before. Does he have any insight on this?
<br><br>Loye Young<br><br><br>-- <br>Loye Young<br>Isaac &amp; Young Computer Company<br>Laredo, Texas<br>(956) 857-1172<br><a href="mailto:loye.young [at some email domain] like iycc.net" target="_blank">loye.young [at some email domain] like iycc.net</a><br>
<br><br><div><span class="gmail_quote">On 6/4/07, <b class="gmail_sendername">Jiri Bohac</b> &lt;<a href="mailto:jbohac [at some email domain] like suse " target="_blank">jbohac [at some email domain] like suse </a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hi,<br><br>&gt; This is a very interesting and apparently elegant approach. I<br>&gt; apologize for my technical ignorance, however. I don&#39;t<br>&gt; understand how to make typekeys work.<br>&gt;<br>&gt; 1.  How is this program to be compiled? As a kernel module? A
<br>&gt; device driver?<br><br>It is a standard userspace program. Modern 2.6 kernels allow<br>userspace programs to inject iput events into the kernel using<br>the uinput device (/dev/input/uinput)<br><br>You just compile it with
<br><br>gcc -o typekeys typekeys.c<br><br>This produces a typekeys executable.<br><br>&gt; 2.  You say:<br>&gt;<br>&gt;  * Translates data from stdin to uinput key press / key release<br>&gt;  * sequences and feeds them to /dev/input/uinput
<br>&gt;<br>&gt; How does the data get to stdin in the first place? What&#39;s<br>&gt; reading the serial port?<br>&gt;<br>&gt; 3.  What is the ttySA device and how does it get created?<br>&gt; There&#39;s not one on my (Debian/Ubuntu) systems. Is it the SUSE
<br>&gt; name for ttyS0?<br><br>oops, that was a typo. It was meant to be ttyS0.<br>I&#39;ve seen in one of your posts (don&#39;t remember where), that wwhen<br>you do &quot;cat /dev/ttyS0&quot;, you can see the data coming from the
<br>barcode reader.<br><br>So this program can read the data the same way cat does.<br>You can redirect the stdin, or cat the data into it.<br><br>cat /dev/ttyS0 | typekeys typekeys.conf<br>or<br>typekeys typekeys.conf &lt; /dev/ttyS0
<br><br>You need to have the serial port set up properly (using stty).<br>But once you can get the correct data using cat, typekeys should<br>work.<br><br><br>&gt; 4.  Do I need to put it in the rcS script so that it will
<br>&gt; invoke on bootup?<br><br>yes, you need to somehow ensure this program will run. My<br>suggestion would be putting it in /etc/inittab<br>But as you probably (?) can not redirect IO in inittab, I would<br>first make a script (
e.g. /usr/local/bin/barcode)<br>with something like:<br>#!/bin/bash<br>stty /dev/ttyS0 whatever parameters you need<br>/usr/local/bin/typekeys &lt; /dev/ttyS0<br><br>And then run this from the inittab (e.g. below the stty lines):
<br>tk:2345:respawn:/usr/local/<WBR>bin/barcode<br><br>Or put it somewhere in rcS, you just need to make sure it does<br>not get killed when the parent process terminates (you may use<br>something like nohup for that)<br><br>&gt; 5.  Once typekeys is invoked, does the barcode data show up in
<br>&gt; all applications, including applications running under X, just<br>&gt; like the keyboard?<br><br>exactly.<br><br>j.<br></blockquote></div><br><br clear="all"><br><br><b><i>Jiri Bohac &lt;<a href="mailto:jbohac [at some email domain] like suse " target="_blank">
jbohac [at some email domain] like suse </a>&gt;</i></b> wrote:<blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px">
Hi, <br><br>I saw your posts in many places, trying to find a way to connect<br>your serial barcode reader to linux and make it transparently<br>available to applications as a keyboard.<br><br>Don&#39;t know if you found a solution yet. I will need the same
<br>thing sooner or later, so I made a small program called<br>&quot;typekeys&quot; that you might find useful.<br><br>You can get it here <a href="http://www.jikos.cz/~jbohac/goodies/" target="_blank">http://www.jikos.cz/~jbohac/<WBR>goodies/
</a><br><br>You can then use like this:<br><br>typekeys typekeys.conf <br><br>You need to have uinput working (modprobe uinput).<br><br><br>Hope you can use it. Good luck.<br><br><br>-- <br>Jiri Bohac <br>SUSE Labs, SUSE CZ
<br><br></blockquote><br>
<br></font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Loye Young
&lt;loye.young [at some email domain] like iycc.net&gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Mon, Jun 4, 2007 at 4:22 PM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
Vojtech Pavlik &lt;vojtech [at some email domain] like suse &gt;
</div>
<div>
Cc:
Jiri Bohac &lt;jbohac [at some email domain] like suse &gt;
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><div style='padding:5 0'><font size=1 color=#888888>[Quoted text hidden]</font></div></font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Jiri Bohac
&lt;jbohac [at some email domain] like suse &gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Mon, Jun 4, 2007 at 5:06 PM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
Loye Young &lt;loye.young [at some email domain] like iycc.net&gt;
</div>
<div>
Cc:
Jiri Bohac &lt;jbohac [at some email domain] like suse &gt;, Vojtech Pavlik &lt;vpavlik [at some email domain] like suse &gt;
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1>Hi,<br />
<font color=#550055><br />
&gt; Biggest issue I see is how to make sure the device gets handled correctly by<br />
&gt; udev, because ttyS0 might change from reboot to reboot.<br />
<br />
</font>Probably not for standard machines with a single serial<br />
contoller. This might be an issue with e.g. multiple PCI serial<br />
controllers, but on standard setups, ttyS0 should stay ttyS0<br />
AFAIK.<br />
<font color=#550055><br />
&gt; Vojtech Pavlik (<a href="mailto:vpavlik [at some email domain] like suse ">vpavlik [at some email domain] like suse </a>) has written very similar drivers for serial<br />
&gt; keyboards and they are incorporated in the kernel now. (See the kernel<br />
&gt; keyboard input source tree, ./linux/drivers/input/<wbr />keyboards, especially<br />
&gt; xtkbd.c, sunkbd.c, lkkdbd.c, hilkbd.c, and atkbd.c.) Your code looks like a<br />
&gt; simplified version of those. The uinput solution in this case seems like a<br />
&gt; circumvention of the udev approach to device management.<br />
<br />
</font>Well, yes, the code is a quick hack and could be useful right<br />
now. I don't think it circumvents anything. It just takes the easy<br />
approach and uses the uinput interface which is already present<br />
in the kernel.<br />
<br />
Personally, I don't see real benefints of having simple drivers<br />
like this in the kernel - it just works in userspace, it's easier<br />
to tweak and improve. It can be rewritten/extended in any<br />
language (perl?).<br />
<br />
I'll talk to people at work who work on input drivers whether<br />
they would like something like this as a kernel driver.<br />
<font color=#550055><br />
j.<br />
<br />
--<br />
Jiri Bohac &lt;<a href="mailto:jbohac [at some email domain] like suse ">jbohac [at some email domain] like suse </a>&gt;<br />
</font>SUSE Labs, SUSE CZ<br />
<br />
</font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Loye Young
&lt;loye.young [at some email domain] like iycc.net&gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Mon, Jun 4, 2007 at 7:41 PM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
Jiri Bohac &lt;jbohac [at some email domain] like suse &gt;
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><font color=#550055>&quot; the code is a quick hack and could be useful right now.&quot;<br></font>Good point. As the King of the Penguins has said, &quot;The perfect is often the enemy of the good.&quot; <br><font color=#550055><br>&quot;uses the uinput interface which is already present in the kernel.&quot;
<br>&quot;Personally, I don&#39;t see real benefints of having simple drivers<br>like this in the kernel - it just works in userspace, it&#39;s easier<br>to tweak and improve. It can be rewritten/extended in any<br>language (perl?).&quot;
<br><br></font>I need to do some reading up on uinput and its interrelation to udev. If I&#39;m not mistaken, Greg K-H and your colleagues [at some email domain]<a href="http://suse.cz" target="_blank">suse.cz</a> rewrote the current input system around udev to do what you suggest: pull drivers out of the kernel and put them into userspace. Although I understand the concept, I don&#39;t understand the code enough to know exactly how they work.
<br><font color=#550055><br>&quot;I&#39;ll talk to people at work who work on input drivers whether<br>they would like something like this as a kernel driver.&quot;<br></font>Whatever the solution, it should be distributed as part of the stock GNU/Linux stack, IMHO. I have gotten lots of email from folks who have the same problem, but so far no one has come up with a solution that &quot;just works&quot;. Yours is the closest by far. The concept of plugging into what&#39;s already written is implicit in uinput, evdev, and udev. Your solution is the only one that tries to play by the rules.
<br><br>Let me know what you and the input guys come up with. I&#39;ve got a running list of folks who are wanting to know how to make this work. I&#39;ve been searching for a solution for well over two years now.<br><br>
(Oh, and pardon my Texas syntax. The Bushes aren&#39;t the only Texans who mangle English.)<br><font color=#888888><br>Loye Young</font><div style='padding:5 0'><font size=1 color=#888888>[Quoted text hidden]</font></div><div style='padding:5 0'><font size=1 color=#888888>[Quoted text hidden]</font></div></font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Jiri Bohac
&lt;jbohac [at some email domain] like suse &gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Tue, Jun 5, 2007 at 4:01 AM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
Loye Young &lt;loye.young [at some email domain] like iycc.net&gt;
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1>Hi,<br />
<font color=#550055>&gt; &quot;uses the uinput interface which is already present in the kernel.&quot;<br />
&gt; &quot;Personally, I don't see real benefints of having simple drivers<br />
&gt; like this in the kernel - it just works in userspace, it's easier<br />
&gt; to tweak and improve. It can be rewritten/extended in any<br />
&gt; language (perl?).&quot;<br />
&gt;<br />
&gt; I need to do some reading up on uinput and its interrelation to udev. If I'm<br />
&gt; not mistaken, Greg K-H and your colleagues [at some email domain]<a href="http://suse.cz" target="_blank">suse.cz</a> rewrote the current<br />
&gt; input system around udev to do what you suggest: pull drivers out of the<br />
&gt; kernel and put them into userspace. Although I understand the concept, I<br />
&gt; don't understand the code enough to know exactly how they work.<br />
<br />
</font>I don't think you don't quite understand what udev does.<br />
Besically, udev is there to populate /dev with device files.<br />
That's its primary purpose and that's what it does form 90% of<br />
devices: it merely creates the device files in /dev on<br />
boot/hotplug. It gets /dev very close to the state it was<br />
before, when all the device files were created there statically<br />
by the distribution.<br />
<br />
In some cases, it does a little magic. Like ensuring persistent<br />
network device names, so no matter what network cards you take<br />
out or add into your computer, the ones that stay will keep their<br />
names. Similar thing can be done for disks. Need for this emerged<br />
as the kernel started to probe devices asynchronously, so that<br />
the order in which they are discovered and drivers loaded may<br />
change from boot to boot. Udev is there to handle the result as<br />
consistently as possible.<br />
<br />
But udev is by no means a device driver for anything. Really it<br />
just creates appropriate device files in /dev and assigns network<br />
interface names. Not much else. So don't be afraid of it.<br />
<font color=#550055><br />
&gt; &quot;I'll talk to people at work who work on input drivers whether<br />
&gt; they would like something like this as a kernel driver.&quot;<br />
<br />
</font>I just talked to our new input expert (Vojtech is not doing that<br />
so much anymore), and said he would have done it exactly the way<br />
I have. I.e. a userspace program feeding the keypresses into<br />
/dev/input/uinput. There are many different serial devices and it<br />
is much easier adapting a userspace program for a particular<br />
device than having to adapt it in the kernel and having to<br />
recompile it just because of that.<br />
<br />
The reason some serial keyboard drivers are in the kernel already<br />
is that the drivers existed before uinput existed, so it was the<br />
only way to do that. They could easily be taken out of the kernel<br />
and replaced by a userspace program, but it would just make life<br />
mor difficult for people who set their keyboards up already using<br />
the kernel driver.<br />
<font color=#550055><br />
&gt; Whatever the solution, it should be distributed as part of the stock<br />
&gt; GNU/Linux stack, IMHO.<br />
<br />
</font>Well, that's just a matter of packaging it for whatever<br />
distribution you use and pushing it into the distribution.<br />
I might do that for SUSE one day, but hey, it's so trivial it<br />
might not be even worth doing it ;-)<br />
It's good enough for barcode/rfid readers, but maybe not for a<br />
all serial keyboards out there. It would probably be needed to<br />
allow some conditional statements in the config file or something<br />
like that. Not all devices have context-less output - one byte of<br />
output may mean different things depending on the bytes following<br />
or preceeding. My program can not handle that. So maybe one day<br />
someone will write something more generic and more usefult, worth<br />
pushing to all the distributions out there.<br />
<font color=#550055><br />
&gt; (Oh, and pardon my Texas syntax. The Bushes aren't the only Texans who<br />
&gt; mangle English.)<br />
<br />
</font>Hmm, not only do the Bushes mangle English, but they also cause<br />
havoc Prague's traffic ;-) We happen to have G. W. B. visiting<br />
_today_ and half of the city is closed because of that ;-)))<br />
<font color=#888888><br />
<br />
<br />
--<br />
</font><div style='padding:5 0'><font size=1 color=#888888>[Quoted text hidden]</font></div></font>
</table>
</table>
<hr>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<font size=-1><b>
Jiri Bohac
&lt;jbohac [at some email domain] like suse &gt;
</b></font>
</td>
<td align=right>
<font size=-1><b>
Wed, Aug 8, 2007 at 9:12 AM
</b></font>
<tr>
<td colspan=2>
<font size=-1>
<div>
To:
Loye Young &lt;loye.young [at some email domain] like iycc.net&gt;
</div>
</font>
<tr>
<td colspan=2>
<table width=100% cellpadding=12 cellspacing=0 border=0>
<tr>
<td>
<font size=-1>Hi Loye,<br />
<br />
&gt; Although I am no longer in need of the scanner, it seems that there is a lot<br />
&gt; of interest in the subject. In order to hand over the reins, I have<br />
&gt; registered a project in Launchpad (<a href="http://launchpad.net" target="_blank">http://launchpad.net</a>)<br />
&gt; called &quot;serial-text&quot;. Please sign up at Launchpad and contribute.<br />
&gt;<br />
&gt; With your permission, I would like to post the correspondence between you and<br />
&gt; I, along with your code. Please advise what license you would like the<br />
&gt; package to have. If you would like to take over maintenance of the project, I<br />
&gt; would be toe-tapping happy about that, because I am not the right person for<br />
&gt; the job. However, if you are unable to take over, I will oversee the project<br />
&gt; until it gets on its feet independently.<br />
<br />
Sure, you can do anything with the code and you can post the<br />
correspondence anywhere.<br />
<br />
The code (and the config file are available from:<br />
<a href="http://www.jikos.cz/~jbohac/goodies/typekeys.c" target="_blank">http://www.jikos.cz/~jbohac/<wbr />goodies/typekeys.c</a><br />
and<br />
<a href="http://www.jikos.cz/~jbohac/goodies/typekeys.conf" target="_blank">http://www.jikos.cz/~jbohac/<wbr />goodies/typekeys.conf</a><br />
<br />
As you've seen already, it's really simple. The license is &quot;GPL2<br />
or newer&quot;. Althought it can be useful as is, it is leiterallily a<br />
couple of lines of code (except the key table copied from<br />
somewhere else), so anyone who will want to extend it may well<br />
prefer to start from scratch.<br />
<br />
<br />
Regards,<br />
<div style='padding:5 0'><font size=1 color=#888888>[Quoted text hidden]</font></div></font>
</table>
</table>
<hr>

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.