unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pascal Bourguignon <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: arrow keys in the console
Date: Fri, 18 May 2007 09:25:19 +0200	[thread overview]
Message-ID: <87646qoaow.fsf@thalassa.lan.informatimago.com> (raw)
In-Reply-To: slrnf4q266.489.tyler.smith@blackbart.mynetwork

Tyler Smith <tyler.smith@mail.mcgill.ca> writes:

> Hi, 
>
> I'm having some issues with the arrow keys in the console, or when
> running emacs -nw under X. If I use any of the arrow keys the cursor
> moves up one paragraph and adds a letter to the screen. It's a
> different letter for each key. I thought I might have something in X
> or the console screwed up, but the arrows seem to work fine in mutt,
> the command line, slrn etc. How do I fix this for emacs?
>
> Here's the quoted output of up, down, right, left, pageup, and
> pagedown, if that helps:
>
> ^[[A^[[B^[[C^[[D^[[5~^[[6~

You can fix it by setting the right value for the TERM environment variable.

What terminal emulator or what kind of console do you use?

For example, I use xterm, so I write:
TERM=xterm ; export TERM
in my ~/.bashrc file.


Otherwise, you can rebind the commands dynamically:
M-x global-set-key RET <up-arrow> RET previous-line RET
M-x global-set-key RET <down-arrow> RET next-line RET
M-x global-set-key RET <right-arrow> RET forward-char RET
M-x global-set-key RET <left-arrow> RET backward-char RET
etc...

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.

  reply	other threads:[~2007-05-18  7:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18  1:00 arrow keys in the console Tyler Smith
2007-05-18  7:25 ` Pascal Bourguignon [this message]
2007-05-18 12:16   ` Tyler Smith
2007-05-18 12:37     ` poppyer
2007-05-18 14:00     ` Peter Dyballa
2007-05-18 15:14       ` Tyler Smith
     [not found]       ` <mailman.807.1179498154.32220.help-gnu-emacs@gnu.org>
2007-05-19  3:03         ` Tim X
2007-05-19  3:14           ` Tyler Smith
2007-05-19  4:54             ` Tim X
2007-05-19  2:38     ` Tim X
     [not found]     ` <mailman.805.1179497353.32220.help-gnu-emacs@gnu.org>
2007-05-19  2:41       ` Tim X
2007-05-19  3:00         ` Tyler Smith
2007-05-19 14:37           ` Peter Dyballa
     [not found]           ` <mailman.860.1179585463.32220.help-gnu-emacs@gnu.org>
2007-05-19 14:58             ` poppyer
2007-05-19 14:59             ` Tyler Smith
2007-05-19 17:22               ` Peter Dyballa
     [not found]               ` <mailman.872.1179595364.32220.help-gnu-emacs@gnu.org>
2007-05-20 15:43                 ` Tyler Smith
2007-05-21 12:03                 ` Will Parsons
2007-05-22  4:38           ` Xavier Maillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87646qoaow.fsf@thalassa.lan.informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).