× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



and... when you say "{ K_BACKTAB, "kB" }" on cursesterm.c and then i make an 
'man terminfo' on my linux console and i see that the code for backtab (tough 
it appears to be 'kcbt' on terminfo) is ** kcbtÜE[Z **.

My question is : how to configure the us5250.map to send that caracter 
(/perform the backtab) to the terminal (i already made my way to the Field_Exit 
and Reset keys via \xxx codes) ?

thx

-----Original Message-----
From: linux5250-admin@midrange.com On Behalf Of Scott Klement
Sent: 09 November 2001 23:22
To: tn5250
Subject: Re: [LINUX5250] complete list of key values



Hi James,

>
> Like what does "\033Ò mean?
>

When you see "\033Ò, the "\033" part represents an ASCII value of
(octal) 033.  Octal 033 is ESC.  So "\033Ò would be ESC =
>
> Plus I haven't found out what the difference is between ~Shift and just
> Shift (as contained in the XTerm file).  Anyone care to illuminate?
>

The difference between Shift and ~Shift is that they are opposites.
Shift means that the shift key needs to be pressed for it to send the
string.   ~Shift means that it will only send this string if the shift
key is _not_ pressed.

So:
       ~Shift <Key>F1: string("\0331") \n\
would send ESC 1 to the emulator, when F1 is pressed, and Shift is _not_
held down, and:
       Shift <Key>F1: string("\033!") \n\
would send ESC ! to the emulator when F1 is pressed and Shift _is_ being
held down.

> For the HOWTO I'm looking for a complete list of the key values used to
> represent to 5250 terminal keys (the value of the 'string("<value>")'
> settings in XTerm.  Obviously I can look at the XTerm file to see what is
> being used, but what I want to know is "\033! means F13" type of info.

Well, you could get this from the man page...  For example, it says that
F12 is "M-Ò which just means that it's ESC Ð  (The M- means "meta",
but in tn5250, we always meta to mean ESC)

A possibly better place to get this information, however, is by looking
at the source code.   The file "cursesterm.c" contains two arrays where
the possible keys are defined.

The "curses_caps" array lists the keys, followed by the termcap
capabilities that correspond to them.   TN5250 will extract the
appropriate escape codes from the the termcap or terminfo that the
user currently has loaded.

For example, the the line that says:
  { K_BACKTAB, "kB" },

Means that the escape code for the "kB" termcap entry will be recognized
as the backtab key.  Then if you look up "kB" in the 5250.tcap file in
the linux directory, you'll see text that says "kBÜE[Z".   This means
that TN5250 will treat the sequence "ESC [ Z" as a backtab if the
5250.tcap file is being used as your loaded termcap.

The next array "curses_vt100" contains more keys, but here it directly
lists the escape codes that are valid.  So when it says:
   { K_FIELDPLUS,       "\030" },

This means the the ASCII code (octal) 030 is treated as Field Plus.
My ASCII chart tells me that 030 is Ctrl-X.

We make it all work by having xterm send a Ctrl-X when the "+" key on
the numeric keypad is entered by coding this in XTerm:

        <Key>KP_Add: string("\030") \n\

then, when tn5250 receives the Ctrl-X, it looks it up in the curses_vt100
array and finds out that it stands for K_FIELDPLUS.

I hope that makes sense... :)

Of course, just because it's defined in cursesterm.c doesn't mean that it
will work :)  There has to be code that checks for K_FIELDPLUS, for
example, and when it sees it, adjusts the field and moves the cursor
appropriately -- but that's another story!

(Speaking of which, I should probably look at that question about newlines
that was posted here a little while ago...)


_______________________________________________
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/linux5250
or email: LINUX5250-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.