Arun, your palmpilot keyboard probably uses a very different protocol to
communicate with the system. The two codes per keypress is a very good
thing, as the keyboard probably doesn't need special initalization. FYI,
the codes are for key up and key down. How do you think that the computer
repeats keystrokes when you hold down a key?
First of all, make sure that the codes are UNIQUE for each key pressed If
they aren't, learn how the keyboard operates, i.e. what speed, what parity
how many stop bits, etc...
The simplest way to 'fix' this 'problem' is to add a layer in your program
that converts the characters sent from your palmpilot keyboard to standard
ACSII. If you're lucky, you could get away with adding or subtracting an
offset, but you'll probably have to statically map each character.
i.e.
char ch, outch
for (;(!arewedone);ch=getacharfromport(argsneeded))
{
switch ch
case '\0xde': outch = 'a'
case '\0xad': outch = 'b'
case '\0xbe': outch = 'c'
case '\0xef': outch = 'e'
etc....
With your keyboard, it's better NOT to think of this as a full terminal,
rather think of it as special serial device, like a PLC or bar code reader.
Hope this helps,
Mike Hudson
Arun K Desai writes:
> Hi all,
> I have written a program which reads data from one pc to another pc through serial
>port and displays the data. It is working fine.
> But i have to test by connecting keysync keyboard which is normally used for palm
>pc's. It is reading random characters. At a time it is reading two characters for one
>key press.The characters which it is displaying are not there on that keyboard.
>
> note : i am using null modem cable.]
>
> Thax in advance for any help.
> With Regards,
> Arun.
>
>
>
>
>
> Send FREE April Fool's Greetings to your friends!
> http://www.whowhere.lycos.com/redirects/American_Greetings.rdct
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-serial" in
> the body of a message to [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]