unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: arrow keys in the console
Date: Sat, 19 May 2007 12:38:42 +1000	[thread overview]
Message-ID: <87bqghfsgd.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: slrnf4r9qe.3n5.tyler.smith@blackbart.mynetwork

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.
>

Note that Pascal's advice is only relevant if your running under X. It will not
work under a linux console. 

I think your problem is to do with different keycodes/mappings between X and
the GNU Linux console. The console uses its own keymap and you need to use one
that will map the values from a console keyboard to something that emacs
recognises. Its a long time since I've looked at this, so my recollections are
a bit hazy. I suggest you look at the loadkeys man pages to start with. The
loadkeys program is used to manipulate the kernel keymap for the console. 

Many distributions have a package called something like console-data, which
contains various keymaps you can use. This would possibly give you some
examples (or maybe even a keymap already done that meets your needs). 

Tim


-- 
tcross (at) rapttech dot com dot au

  parent reply	other threads:[~2007-05-19  2:38 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
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 [this message]
     [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=87bqghfsgd.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --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).