On Thu, 16 Mar 2000, Ismael Cordeiro wrote:
> On Thu, 16 Mar 2000, Klaus Weide wrote:
> 
> > > With lynx/slang one can use the numeric keypad to enter numbers when in a
> > > text-entry field or text area. Outside of the text area the numeric
> > > keypad still act as arrows. With lynx/ncurses the numeric keypad act as
> > > arrows even in a text area, what makes impossible to the user to enter
> > > numbers using the keypad.
> > 
> > Not in general (and certainly not for me, if I have "NumLock" activated).
> 
> That's funny. You and Thomas are always criticizing my VT100/VT102 terminal
> emulator that supports color, saying that's not correct because the true
> VT100/VT102 terminals don't support color.

Don't expect me (or anyone) to know what kind of environment you are using.
Especially when you are starting a new thread, without any context.  Your
message (quoted fully above) makes a general statement ("...one can use...").
You didn't say whether you're talking about VT100 or some emulator or what,
all I know from your message is that your keyboard has some sort of numeric
keypad.

> Now you're talking about "NumLock"
> as if those terminals had a "NumLock" key, and forgetting that in those
> terminals it's the applications that set the numeric keypad to application
> mode or numeric mode.

What makes you think I was talking about "those terminals" at all?
I was explicitly talking about "for me" (and in parentheses).
Meant as just a counter-example against your claims about lynx/slang
and lynx/ncurses behavior.

> Get a VT100 manual and look for DECKPAM and DECKPNM.

I don't think I would find anything new.
But yes, I checked <http://vt100.net/docs/vt220-rm/chapter4.html#S4.6.18>.

> > I would guess that it is something in the terminfo for your $TERM that gets
> > ignored by slang but gets used by ncurses. Some escape sequence that
> > affects your terminal emulator, possibly in one of the init or reset
> > strings.
> 
> By what you said above about "NumLock", it's clear that by pressing that
> "NumLock" key you're making your terminal emulator to not accept all commands
> sent by the application. 

1.) It's by no means clear from what I said above.  (I didn't make any
    statement about how the terminal emulator reacts to DECKPAM/DECKPNM,
    in either NumLock state.)
2.) It's completely irrelevant how well or how badly my terminal emulator
    emulates a real VT100 terminal's feature, as long as my terminfo entry
    doesn't claim that it supports that feature and doesn't try to use that
    feature.  Which is exactly the case, for feature == DECKPAM / DECKPNM:
    They (i.e., "\E=" and "\E>") aren't part of any terminfo string for
    *this* emulator.
3.) In case you were curious - the terminal emulator in question happens to
    be the linux text mode console, commonly (e.g. in ncurses' terminfo)
    called just "linux".  It happens to be based on VT100 emulation, and it
    does support DECKPAM / DECKPNM.  (How well is not the topic.)
    But neither slang library functions nor ncurses library functions, and
    certainly not the lynx code, are sending DECKPAM / DECKPNM.
    Therefore I never have a problem with either lynx/slang or lynx/ncurses
    in this regard.  They just don't mess with the DECKPAM / DECKPNM state,
    period.
4.) The lynx code doesn't know anything about numeric keypad mode or
    application keypad mode, as different states of a terminal or terminal
    emulator.  It doesn't even know about a "numeric keypad".  It knows
    whether a key is a digit or not, but it doesn't know whether you pressed
    a key on your numeric keypad (if you have one), or used another key to
    send that digit, or something completely different.  It has two different
    ways to react to digits, depending on whether "Numbers act as arrows"
    is active or not.  Note that that's "Numbers" (I would find "digits"
    more correct), not "numeric keypad keys".


   Klaus

Reply via email to