× 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.


  • Subject: Re: Hi. How would I go about changing the keyboard ....
  • From: "Jay 'Eraserhead' Felice" <eraserhead@xxxxxxxxxxxxxx>
  • Date: Thu, 17 May 2001 11:28:54 -0400
  • User-Agent: Mutt/1.2.5i

On Thu, May 17, 2001 at 10:20:19AM +0200, Paolo Fiore wrote:
> > ----- Original Message -----
> > From: Scott Klement <klemscot@xxxxxxxxxxxx>
> > Sent: Tue, 27 Mar 2001 11:13:30 -0600 (CST
> > Subject: Hi. How would I go about changing the keyboard ....
> 
> Scott, sorry if I've just partially quoted your original msg! I'm
> dragging&dropping from IE to Outlook... and this is quite explaining what I
> know about "gnu/linux"! Yep, I'm a newbie and know very very few about
> shell, X, term, scripts.... but if you wanted a perfect Cobol program I'm
> the one to ask for :)
> 
> So, good morning to the all mailing list!
> 
> > ~/tn5250/XTerm
> > <Key>Control_L: string("\022") \n\
> > causes Ctrl-R (interpreted as "Error Reset") when left control
> > key is pressed.
> > Personally, I run the program called "xev" and I type "man tn5250"
> > to see what strings I want
> 
> I gave a look at the man page, but I didn't find those "hex" values...
> - because I'd need another modification: having the Return acting as "New
> Line"
> Could also be I'm loosing something :( in yr example who's receiving Ctrl-R
> & from who?
> TN5250 feels the ctrl-L and sends to xterm a ctrl-R? And xterm knows through
> the terminfo that ctrl-R means send to the AS an "Error reset", sounds?
> Am I enough confused?

The terminfo actually knows nothing about Ctrl-R.  Ctrl-R is Ctrl-R.  The
tn5250 program sends the AS/400 an error reset when it receives a Ctrl-R.

There are three layers involved (sometimes four).  I'm going to try to make
a comprehensive, lucid explanation, with history, since this is not the first
time this has come up:

First, there were dumb terminals - teletypes.  These sent ASCII codes from the
keyboard to the the computer and displayed or printed ASCII codes sent from
the computer.  You could use the CTRL key to send the lower control codes, like
you could send a newline with Ctrl+J or a form feed with Ctrl+L, etc.

But then the displays got more sophisiticated and needed escape sequences to
control them to clear lines, move the cursor, set colors, etc.  The keyboards
attached to them became more sophisticated and started sending escape sequences
back for functions keys like F1 and Home.  Unfortunately, no-one agreed on a
standard for these codes - and different hardware had different quirks anyway
(like on some you couldn't put a character in the lower right-hand corner
without the screen scrolling).  /etc/termcap was invented as a database of
escape sequences to do things like clear the screen and to interpret function
keys.  termcap was replaced by terminfo, which is more comprehensive.  This
is how an application can know that you've just pressed F1, which really sends
something like <ESC> [ F 1 <NUL> (that's made up, but similar).  Most terminal
"types" have only four F-keys (F1-F4) even though the terminals themselves
nowadays usually have at least 10 and they can be shifted.

Okay.  So far, so good?   Now we have X windows and the xterminal.  This is
different because xterm is _not_ a terminal, but a terminal "emulator".  In
other words, it fakes sending escape sequences for function keys, and it can
be told what to do when it receives a clear-screen escape sequence.  Xterm
uses X windows' keyboard handling, which is much better (in some respects),
since it has a unique number for each key, including function keys.

So we have to twiddle a bunch of things to get tn5250 to behave the way we
would like it to.   Most xterm termcap/terminfo entries only have entries for
22 F-keys, for example, when we need 24.  We also don't have separate enter
and newline keys.

So, we can use the xterm configuration (~/.Xdefaults) to tell the xterm what
escape sequences to send when we press certain keys (When we press Shift+F12,
send <ESC> [ F 2 4 <NUL>.  Then we can use termcap/terminfo definitions to
tell the curses library (our application) what different escape sequences mean.
(When we receive <ESC> [ F 2 4 <NULL>, that means F24).  Then our applications
interprets keys differently (When we get F24, send the screen with the Cmd24
AID code, and when we receive Ctrl+R, clear the error indicator, etc.)

Hmm.  This didn't come out as clear as I had hoped.  If anyone wants to
contribute commentary, I'll revise it.  If we can fix it up, I'll put it in
the docs.

> 
> Thank to you all
> Paolo
> P.S. Sorry my poor English
> 

It's not bad at all.  You should see my French ;-)

-Jay 'Eraserhead' Felice
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.