Thanks, Martin, for the tip!

Not only are some inbound converted to meaningful VT100-like sequences
but I found out that some of the *outbound* are already handled too!
Dunno if this was done by Boeblingen or UTSGlobal,  but either way,
nice job folks!!

So ... in a pinch,  I tested the followin sequences:

        <ESC>[...H   for explicit cursor placement
        <ESC>[...J   for clearing the screen
        <ESC>[...m   for text attributes (eg: color)

I have not tried the  "clear to here"  and  "clear from here"
operands of the  "J"  sequence,  but obviously  "clear all"  works.

Whatever YaST drives is trying for more capability than is present.
(Just talking about the output for the moment,  which given the
capability presently in the 3270 driver should be working flawlessly.)
I have tried  TERM=vt100,  TERM=vt220,  and  TERM=xterm  all with
the same ugliness:  broken border characters.  Methinks YaST is
going outside of curses/termcap to do this.

-- R;

On Thu, 31 May 2007, Martin Schwidefsky wrote:

> On Wed, 2007-05-30 at 23:35 -0400, Rick Troth wrote:
> > On an 'xterm',  pressing F1 delivers an  <ESC>[224z  sequence.
> > One way to get full-screen 3270 interaction to ASCII apps
> > is to have the 3270 PF1 AID converted to an  <ESC>[224z  sequence.
>
> With the current 3270 driver in 2.6.x kernels some PFx AID keys are
> already translated to meaningful escape sequences. For example PF1 AID
> is translated to "\033[[A" which is F1 in the vt100 world.
> You can change the translation with the "loadkeys" user space tool. The
> 3270 driver uses a little trick. loadkeys is normally used to do the
> input translation of raw keyboard keys. The 3270 driver uses the
> translation table defined with loadkeys for the output as well. This way
> it is possible to change the code page that is used with a particular
> device. Just define a new map file an feed it into loadkeys. The map
> file contains a section where you can replace keys with strings, here is
> the line for the PF1 translation:
>       string F1 = "\033[[A"
> The PF1 key itself is mapped as
>         shift   control keycode 113 = F1
> The keycode tables in linux are 128 bytes long but there are several of
> them (keycode, shift keycode, control keycode, ...). On the 3270 side we
> have 8 bit characters and the AID prefix. The AID prefix codes get
> translated to 256 + character, so there are keycodes 0-511. For example
> PF1 is EBCDIC 0xF1 but it always is preceeded with an AID, that makes
> the keycode for PF1 0x1F1. Four keymap tables are used to cover
> everything, "keycode" for 0-127, "shift keycode" for 128-255, "control
> keycode" for 256-383 and "shift control keycode" for 384-511. So for AID
> PF1 0x1F1 this translates to "shift controlf keycode 113". It is a bit
> awkward but I did not want to write new user space tools. You'll find
> the default keymap in linux/drivers/s390/char/defkeymap.map. Change at
> will, load it with loadkeys and watch :-)
>
> --
> blue skies,
>   Martin.
>
> "Reality continues to ruin my life." - Calvin.
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to