help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arrow keys in the console


From: poppyer
Subject: Re: arrow keys in the console
Date: 18 May 2007 13:37:00 +0100
User-agent: Emacs Gnus

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 <address@hidden> writes:

> On 2007-05-18, Pascal Bourguignon <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]