
function keys and embedded ascii extension characters
Quote:
> : I have a user that has provided a serial program that demands
function
> :keys such as "F4" & "F2" for some of its commands. Can someone tell me
the
> :appropriate way to generate an "F4" across a serial channel opened with
> :[open /dev/ttyS0]. Thats question one.
> Function keys on keyboards just generate a series of ASCII characters.
> Unfortunately, the specifics of the characters differs between various
> systems and keyboards, etc.
> So you need to figure out more details on what sequences the application
> is expecting, then just do some code like
> set serial [open "/dev/ttyS0" "w"]
> puts $serial "\033[22z"
> or whatever sequence your application is expecting.
Well, this looks a little like an old ansi escape sequence. If I look in one
of the books behind me, I can see that an IBM PC function key *should*
produce something like two bytes where the first one is 0x00 and the second
one comes from a list like:
F1: 00d 59d
F2: 00d 60d
F3: 00d 61d
F4: 00d 62d
I also vaguely remember the Esc-LeftBracket beginnings of an ansi cursor
control sequence.
Am I correct in thinking that there is something along that line and if so,
could someone point me at a little more information so send a function key
or two on a serial port, please?
Charles