Solved: aterm & mutt problem with home/end keys
=?iso-8859-1?Q?Mikko_H=E4nninen?= (Mikko.Hanninen@dna.fi)
Thu, 27 Jan 2000 19:59:49 +0200
Hello,
Awhile ago I wrote about having a problem running the email program Mutt
in an aterm and not getting it to obey the Home/End keys, even though
everything else seemed to work (PageUp/PageDown, Delete) in Mutt, and
also these keys worked everywhere else (notably, in tcsh).
I finally traced down the problem to this:
Mutt uses getch() from curses. I found out, after a bit of hacking and
adding debugging info, that this function was returning KP_FIND and
KP_SELECT, for Home and End respectively. The Find and Select keys were
undefined in Mutt's keymap (and as they should be -- my keyboard doesn't
have them!), so Mutt properly returned "invalid key".
So, why was getch() returning KP_FIND and KP_SELECT, instead of KP_HOME
and KP_END? I started digging around in the aterm sources, and sure
enough, I found something called LINUX_KEYS defined in aterm's
feature.h, which makes the Home and End keys return the strings \e[1~
and \e[2~ -- which are apparently used for the Find and Select keys on
some other platforms. By undefining LINUX_KEYS I now get \e[7~ and
\e[8~, which I can bind in Mutt (even though the <home> and <end>
shortcuts still don't work).
Strangely enough, Home/End still work in tcsh with no changes into
mappings anywhere.
Mikko
PS. I'm crossposting this to both the AfterStep and Mutt lists, so if
there are any followups, please make sure that they get sent only to
the appropriate list.
--
// Mikko Hänninen, aka. Wizzu // wiz@iki.fi // http://www.iki.fi/wiz/
// The Corrs list maintainer // net.freak // DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
The only substitute for good manners is fast reflexes.
--------------------------------------------------------------------
To unsubscribe from this mailing list, simply type the following at #
echo "unsubscribe as-users <your_email>" | mail majordomo@afterstep.org