unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: poppyer <poppyer@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: arrow keys in the console
Date: 18 May 2007 13:37:00 +0100	[thread overview]
Message-ID: <lm4pmanw9f.fsf@clpc78.comlab> (raw)
In-Reply-To: slrnf4r9qe.3n5.tyler.smith@blackbart.mynetwork

Hi, following is what I do to make my [home] [end] key works, I think arrow
keys can be done in a similar way.

put something like this in your .emacs file:
(define-key function-key-map "\eOH" [home])
(define-key function-key-map "\eOF" [end])
(define-key function-key-map "\e[7~" [home])
(define-key function-key-map "\e[8~" [end])

To get the strings right, you can test it in your terminal by ^V and the
key you want. 

Not sure if this is the right way, but at least it works :)


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

> On 2007-05-18, Pascal Bourguignon <pjb@informatimago.com> wrote:
> >
> > 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.
> >
> I'm just experimenting with the console in linux, i.e., starting up
> emacs without starting X. echo $TERM now shows: linux. How do I find
> out what it should be?
> 
> For some reason the problem seems to have fixed itself in xterm when
> running X. I've been mucking around in my .Xresources trying to fix
> the xterm fonts, but I'm not sure what the change was that solved the
> problem. It stil exists in the non-X console.
> 
> >
> > 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...
> 
> I'll try that if I can't figure out the underlying problem, thanks.
> 
> Tyler
> 
> 

-- 

  reply	other threads:[~2007-05-18 12:37 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
2007-05-18 12:16   ` Tyler Smith
2007-05-18 12:37     ` poppyer [this message]
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=lm4pmanw9f.fsf@clpc78.comlab \
    --to=poppyer@gmail.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).