Re: Backspace problems in XTerm
- To: mutt-users@xxxxxxxx
- Subject: Re: Backspace problems in XTerm
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Thu, 6 Sep 2007 11:08:20 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date:from:to:subject:message-id:references:mime-version:content-type:in-reply-to; q=dns/txt; s=default; bh=qp+V+cEvwquLR4iuoau4BKoNUMA=; b=bXDrxkRB15v3Suoh4qvUrXrBOOm7niGMYhu52KZpLD8CQ92aobXZVuFEo0IBBWeqGTsmGV4aaiKmexkeual6M98k3/dmmrRu7iFcNXEiygAGtOVZhAayYJZd43YQI7mNBKCM89/DQf4VcjoeqmWyxsgcADhVw1ZhZhv+FeHWDpM=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=cPck6CsjX48T6ADJQacJ1BUNVnUmUvm8QQswHHASfX1Wk0GLdWYTJ1/QUSSSryDebwyjGy0wEb7+uXKCMM0d52UojbXAZjQm2tJdfP5AXI27g1GmZcWbFyXBlV0+2IMhTT1HhqpP3j9P+hnm+gp9Ubu8om0aSWZ6jIQgaJ28hms=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent;
- In-reply-to: <20070906162423.GA30288@localhost>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- References: <20070906162423.GA30288@localhost>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.16 (2007-09-05)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday, September 6 at 09:54 PM, quoth Kumar Appaiah:
>1. Everything's fine, except that in the pager, if I press backspace,
>it says key not bound. If I press Ctrl+H, it works as expected.
Okay... all that means is that (probably) your backspace key isn't
emitting a ^H but is instead emitting a ^?. Some terminals do one
while some do the other. Xterm is convenient in that its easy to tell
it which one to emit. You can verify this by, in the shell (or
anywhere else) typing control-V and then pressing the backspace key.
>2. All other applications work fine; emacs -nw, vim etc.
Of course; probably because your stty settings define ^? to be the
"erase" character. In most cases, this is enough.
>3. So, in Mutt, I wish to bind my previous-line to Ctrl+H in the
>pager. However, when I add bind \008 to previous-line, it still
>doesn't work. When doing a "?", the binding displays as "^H" all
>right, but below, it says <BackSpace> again, and my binding has no
>effect.
This config line:
bind pager \008 previous-line
Binds the key sequence backslash-zero-zero-eight to previous-line. It
does not bind the key hexadecimal-eight to previous-line.
When you bind things, though, mutt ignores the terminal settings and
does exactly what you tell it to. In other words:
bind pager ^H previous-line
Will only bind ^H and not whatever your backspace key happens to be
emitting. If your backspace key is emitting ^?, then it's pretty
obvious why this command does not bind previous-line to the backspace
key.
Irritatingly, while the following *should* make mutt use whatever
character is currently the "erase" character, it doesn't. Sadly, it's
equivalent to the previous example:
bind pager <BackSpace> previous-line # this syntax should work
>Can you suggest an effective workaround? Using XTerm's "Backarrow Key"
>fixes this, but it breaks all other apps, like emacs -nw, break.
The obvious workaround is to bind whatever your backspace key IS
emitting. E.g. this:
bind pager ^? previous-line
(note that you have to enter that in your muttrc by making sure the ^?
is not the two-letter sequence carrot-questionmark, but is the
single-character sequence that your delete key is emitting.)
~Kyle
- --
A wise man changes his mind, a fool never.
-- Spanish proverb
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFG4DQEBkIOoMqOI14RAmA4AJ9ZURMKlPQ7mWiV41IaeCe3dbO2WACbBuhc
eaTHLH+AVt9F7PJiCq37TpU=
=Mz9u
-----END PGP SIGNATURE-----