[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arrow keys in the console
From: |
Tim X |
Subject: |
Re: arrow keys in the console |
Date: |
Sat, 19 May 2007 12:38:42 +1000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (gnu/linux) |
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
- arrow keys in the console, Tyler Smith, 2007/05/17
- Re: arrow keys in the console, Pascal Bourguignon, 2007/05/18
- Re: arrow keys in the console, Tyler Smith, 2007/05/18
- Re: arrow keys in the console, poppyer, 2007/05/18
- Re: arrow keys in the console, Peter Dyballa, 2007/05/18
- Re: arrow keys in the console, Tyler Smith, 2007/05/18
- Message not available
- Re: arrow keys in the console, Tim X, 2007/05/18
- Re: arrow keys in the console, Tyler Smith, 2007/05/18
- Re: arrow keys in the console, Tim X, 2007/05/19
- Re: arrow keys in the console,
Tim X <=
- Message not available
- Re: arrow keys in the console, Tim X, 2007/05/18
- Re: arrow keys in the console, Tyler Smith, 2007/05/18
- Re: arrow keys in the console, Peter Dyballa, 2007/05/19
- Message not available
- Re: arrow keys in the console, poppyer, 2007/05/19
- Message not available
- Re: arrow keys in the console, Tyler Smith, 2007/05/19
- Re: arrow keys in the console, Peter Dyballa, 2007/05/19
- Message not available
- Re: arrow keys in the console, Tyler Smith, 2007/05/20
- Message not available
- Re: arrow keys in the console, Will Parsons, 2007/05/21
- Re: arrow keys in the console, Xavier Maillard, 2007/05/22