<<< Date Index >>>     <<< Thread Index >>>

Re: Handling of shift+return



On Tue, 9 Dec 2003, Ronald J Kimball wrote:

> Thomas Dickey wrote:
>
> > On Tue, 25 Nov 2003, Ronald J Kimball wrote:
> >
> > > My ISP recently did an OS upgrade, and since then I've noticed a change in
> > > behavior.
> > >
> > > If I hold down shift and press return, mutt does not treat it as a normal
> > > return.  Previously on this system, mutt treated shift+return and return
> > > the same.
> > >
> > > This is inconvenient when I want to change to my inbox, because I
> > > habitually type 'c shift+1 shift+return', hitting return before I release
> > > the shift key.  Instead of changing to my inbox, I end up with: 'Open
> > > mailbox: !OM' displayed.
> >
> > that looks like the numeric-keypad application-mode "Enter", rather than
> > any "return" key.  What type of program are you using?  (And what was
> > $TERM set to).
>
> Thanks for your response!  Sorry it's taken me so long to get back to you.
> (Screwed up my confirmation to the list.)
>
> I am using Konsole on KDE, and using ssh to connect to the machines where I
> run mutt.  For both connections, $TERM is set to xterm.

One odd thing about SGI's terminal descriptions is that they give (for the
"enter" key) the code corresponding to the numeric keypad (in application
mode) string for its Enter key.  Most terminal descriptions assign that
string to the one returned by the Enter/CarriageReturn key.  That's the
^[OM (in terminfo: \EOM).

Since SGI's "enter" (kent) string is \E[OM, then mutt will return a
KEY_ENTER when you send the corresponding string.  Checking, I see that
konsole does indeed send that for shift+return.  Its numeric keypad
doesn't do that - so much for "vt100" compatibility.

(konsole's keyboard layouts have little to do with the terminals they're
named after)

> I just realized that, on both machines, emacs sees shift+return as ^[OM.
> So it does seem that there's something different within mutt between the
> two machines.

Probably mutt is using ncurses on one machine, but not the other.
ncurses' terminfo description is less eccentric than SGI's (and doesn't
mention kent since it would be inconsistent).  So that string isn't
recognized when using ncurses.  (You could add kent=\EOM to whatever
your Linux machine shows as "xterm" - I'll have to think about whether
I should add that to ncurses)

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net