[NTLUG:Discuss] A good'un
Darin W. Smith
darin_ext at darinsmith.net
Mon Jun 2 08:10:19 CDT 2003
Fred,
I've been using lineak with a MS Natural Internet Pro with great results.
What keyboard are you using? lineak comes with several common keyboard
config files already setup.
To get the key scan codes, you can use these instructions, which come
verbatim *from the LinEAK project homepage* (Look under "Documentation"):
"To be able to use your special keys, I will need the keycodes
generated by X. There are basically two ways to find them,
but for now, stick with the first option...
(option 1)
- open an xterm
- run 'xev'
- then for each button: press it and watch a bunch of
information appear in the terminal, something like:
KeyPress event, serial 23, synthetic NO, window 0x5a00001,
root 0x36, subw 0x0, time 2407465070, (146,-62), root:(719,272),
state 0x0, keycode 234 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 characters: ""
What you want is "keycode XXX". In the above example, the code
would be 234.
- Do this for every key, and make a list of the key/keycode pairs
(eg. play 234, stop 223, internet 187, etc)
[ Step 3: the keyboard definition ]
With the information acquired above, we can now create the keyboard
definition.
Now,
- take your favorite editor
- copy one of the keyboard definitions from the existing lineakkb.def file
(usually located in /usr/local/etc) to a new file.
- think of a unique identifier for your keyboard, and put it in [TYPE]
- change the "longname" to a description of your keyboard
- change the "keys = { }" list so that it contains the names of the keys
present on your keyboard. (note: only use names that exist in the
existing file, if you make up new ones, the program will fail)
- for each key, add the "key = keycode" pair.
And you're done. Now,
- Add the new definition at the bottom of the existing lineakkb.def
(you will probably have to be root to do so)
[ Step 4: the final steps ]
To check if your definition went alright, and no typo are present, run
"lineakd -l"
and check if your new keyboard type is listed.
To create a new config file for your keyboard, run
"lineakd -c TYPE"
where TYPE is the identifier you thought of.
To verify the definition is correct with your hardware, run
"lineakd -v"
now lineakd runs in verbose mode, so go ahead and punch your keys, they
should register correctly in the output of lineakd.
Press Ctrl-C to quit again.
Now you are set to add your own commands to the keys, by using
lineakconfig,
or to manually edit
$HOME/.lineak/lineakd.conf
it should be quite self-explanatory.
When you're done, you can start lineakd into the background and start
using it.
"lineakd -b"
NOTE: please share your newly supported keyboard with the rest of the
world
by e-mailing the new keyboard definition to me (Mark at PIRnet.nl)
Thanks!"
D!
On Sun, 1 Jun 2003 20:28:03 -0700 (PDT), Fred <fredstevens at yahoo.com>
wrote:
> I have an internet keyboard. I went to the LINeak site and followed the
> instructions, which gave me a config file with data for some other
> keyboard.
> Typical @#!^&% not-ready-for-primetime half-assed crap that eats up too
> much
> time before you find out... oops, soapbox off... anyway, does anyone have
> a
> script that will give the key code sequence when a key is pressed? Maybe
> if I
> had that I could make all those extra keys work with linux like they do
> with
> Windows. The manufacturer, Logitech-suk-Gates, says it is "proprietary
> info",
> so they won't give it to me and my abortive efforts at scripting reminded
> me
> why I quit writing.
>
> Thanks,
> Fred
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>
--
D!
Darin W. Smith
AIM: JediGrover
More information about the Discuss
mailing list