Embedded Linux Button Support

Warren Togami warren at togami.com
Tue Jul 24 05:20:52 PDT 2001


Is this for your micromouse project?
It may be easy to write a simple program in bash, perl or C that sits
quietly and accepts input from stdin.  If it sees a matching keycode, it
could take appropriate action by either spawning a new background process,
or signalling an already running process.  For signalling check out "man
sigaction" to code the programs that would be controlling things in
background processes, and signallable from the tiny controller process.
Using struct sigaction may be easiest in C for coding those background
processes.

Under the MVC (Model, View, Controller) design paradigm, this tiny program
would be the "controller" portion, controlling processes within the "model".
Your view could be integrated into this controller frontend, giving useful
status information on the console or if needed, a simple textual menuing
system.

Be careful in learning what these key codes actually contain, because often
shells don't display all hidden control characters within keycodes.  Perhaps
you should code a simpler program that does nothing but capture a key code
then display it in hexadecimal.

----- Original Message -----
From: "Linux Robot" <linuxrobot at hotmail.com>
To: "Linux & Unix Advocates & Users" <luau at list.luau.hi.net>
Sent: Monday, July 23, 2001 11:38 PM
Subject: [luau] Embedded Linux Button Support


> I'm fiddling with linux on a PDA (the VTech Helio), and was wondering if
> anyone knows how I could go about controlling the buttons at the bottom
> (actually make them do something useful).  Currently I get console
messages
> when I press the buttons (which seems to include a unique number for each
> button).  So it seems like linux knows that the buttons exist, and it's
just
> a matter of setting up a controller or something...  I tried a few mailing
> lists, but either the links are dead or no one responds to my desperate
> pleas for help.  I was just wondering if anyone here knows how I could
start
> tackling this problem, or where I could go to for help...
>
> Thanks,
> The Button-Insubordinate Linux Robot



More information about the LUAU mailing list