× 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: FER - valid keys
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Tue, 23 Jan 2001 11:12:45 -0600 (CST)



On Mon, 22 Jan 2001, Sean Porterfield wrote:

> Scott Klement wrote:
> > 
> > On Mon, 22 Jan 2001, Sean Porterfield wrote:
> > 
> > > When FER is set, only certain keys are valid.  The ones I know of are
> > > arrow keys, TAB, BACKTAB, BACKSPACE, ENTER, FIELD EXIT, FIELD +.  (This
> > > was tested on a 3487.)  The odd thing about the "real" terminal is left
> > > arrow which  doesn't move the cursor, all other arrow keys do.  I guess
> > > it moves left back into the field.
> > 
> > On most terminals, once you get to the end and you've typed the last
> > digit, the cursor flashes a little differently, and you're in a mode where
> > you need to press a field-exit (or similar key) before you can continue.
> 
> Yes, I suppose that is correct.  The only FER field I can think of in
> our software is a one character field, so it's hard to tell some things.
> 
> > Can you elaborate on what's wrong with FIELD+?  If it happened in the last
> > few weeks, its probably my fault. :(   What does it do wrong?
> 
> Input Inhibit goes on instead of FER off (FER stays on according to the
> display, don't know about code.)

My first thought upon reading this was "hmmm.. that doesnt happen here!",
but then I decided to review my FreeBSD keyboard mapping vs. the Linux
one.  Here is what I found:

1) In the freebsd keyboard map (or, the updated version that only exists
     on my system at present) fieldexit is mapped to ctrl-k, and
     fieldplus is mapped to ctrl-x.
2) The linux version doesn't map a field plus key.  It's still using the
     original tn5250 strangeness where the "+" key in a signed numeric
     field acts as field plus, but in a character field it acts as the 
     "+" character.
3) In cursesterm.c, NOTHING is wired to the "real" fieldplus key.  (But
     both C-k and C-x are mapped to FIELDEXIT)

Therefore, I submit that the reason you're getting II in a FER field is
because you're actually sending "+", which isn't an exit key for FER.

The fix is to change your keyboard map to send ctrl-x when you press the 
keypad's "+" key (which probably shouldn't go into CVS for a console mode 
keyboard map... but maybe should for an xterm), and to change cursesterm
to wire ctrl-x to K_FIELDPLUS (which must be a bug).


> 
> > > I added K_ENTER to my display.c and it seems to work well.  I don't know
> > > how to fix up arrow, right arrow, down arrow, FIELD+, FIELD- (if FIELD-
> > > should really work - it doesn't on my "real" terminal).
> > >
> > 
> > Just above where you added the K_ENTER there is some code that says
> > something like:
> > 
> >       case K_LEFT:
> >       case K_BACKSPACE:
> >          tn5250_display_indicator_clear (This, TN5250_DISPLAY_IND_FER);
> >          return;
> > 
> > Try adding some code below that which looks like this:
> > 
> >       case K_UP:
> >       case K_DOWN:
> >       case K_RIGHT:
> >          tn5250_display_indicator_clear (This, TN5250_DISPLAY_IND_FER);
> >          break;
> > 
> > (note the "break" instead of "return" will cause it to move up/down/right
> > as well as clearing FER)
> > 
> > Is that what you're looking for?   (I'd get up and try it on a terminal,
> > but I've just spent too much time with tn5250 today, already)
> 
> Keeping in mind that I'm not a C programmer, and the only one I really
> cared about was enter (there were others I cared about, but they've been
> fixed for a while)...
> 
> Having said that, the above code seems to make tn5250 function as I
> would expect on my FER field.  (I only have one 1 character FER field in
> the software we use...)

Weren't you the one who asked how to fix up, right, down, etc?

> 
> Scott, wanna get Jay a patch?  It's mostly your code... :)  Otherwise
> I'll give it a shot.

I'm confused... did we decide to change the behavior of the arrow keys
or not?  


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