A little more info on the Iphone thing...
Bill Campbell
bill at celestial.com
Mon Oct 27 12:28:17 PDT 2008
On Mon, Oct 27, 2008, Nancy Palmquist wrote:
>John,
>
>You can set PFTERM=ansi or any existing filepro termcap. TERM is what UNIX uses
>and PFTERM is what filepro uses if it exists.
>
>Is ansi close to vt220?
Any differences are likely to be in the codes sent by function keys.
Looking at a stock /etc/termcap file on a CentOS 5 Linux box, the
primary function key codes sent by the function keys are defined
as follows (\E indicates the ESC character staring all ANSI codes):
:k1=\E[17~:k2=\E[18~:k3=\E[19~:k4=\E[20~:k5=\E[21~:\
:k6=\E[23~:k7=\E[24~:k8=\E[25~:
SCO ANSI terminals use very different key codes:
:k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:\
:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:
I just learned something new about termcaps. At least on Linux, termcap
entries may have multiple ``tc=xxx'' options to load other termcap entries
as the ``ansi=generic'' entry on this box at least 11 of them.
ANSI emulations of older VTxxx terminals use the VT100 key codes for the
PF1-PF4 keys over the numeric keypad where $DEITY wanted them:
:k1=\EOP:k2=\EOR:k4=\EOS:
Often setting TERM=xterm will do the Right Thing(tm) -- unless it's a SCO
xterm which does funny things with the key codes.
It's pretty easy to figure out what key codes are being sent by a terminal
or terminal emulation program. Open a file on the system in the terminal
with ``vi'' or ``vim'', say /tmp/keys, then get the mapping for each key by
typing something like this where the ctrl-V tells vi to take the following
key literally. The ESC characters will look like ^[.
F1=ctrl-VF1
F2=ctrl-VF2
...
F12=ctrl-VF12
On the xterm I'm using here on a SuSE Linux Enterprise 10 system gives:
F1=^[[11~
F2=^[[12~
F12= == whoops I can't do that from an OS X desktop :-).
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186
Giving money and power to government is like giving whiskey and car keys to
teenage boys -- P.J. O'Rourke
More information about the Filepro-list
mailing list