[Top][All Lists]

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

Re: M-<, M->, M-% ...

From: Alan Mackenzie
Subject: Re: M-<, M->, M-% ...
Date: Wed, 26 Mar 2008 21:27:45 +0000
User-agent: Mutt/1.5.9i

Hi, Xavier,

On Wed, Mar 26, 2008 at 02:00:38AM +0100, Xavier Maillard wrote:
> Hi,

> What is the best way to invoke the above mentionned keys in the
> linux console (I really mean the console, not a xterm) ?

There are two things you need to do.  You need to enhance your keyboard
layout to generate distinct codes for these keys (dumpkeys and loadkeys
are your friends), and you need to tell Emacs how to interpret them.

A fully general method for getting this going was worked out a decade
ago by Kalle Niemitalo.  I've been using it for many years.  This scheme
allows you such key sequences as C-S-<up>, too.

The particular keys you're asking about, M-%, M-<, and M->, are
relatively simple on an English keyboard layout.  I'm not sure how it
would be on a (?)French layout.  Here is the bit of my file
boottime.kmap.gz that gives M-<

keycode  51 = comma            less
        alt     keycode  51 = Meta_comma
        shift alt keycode 51 = Meta_less                <==============
        control shift keycode 51 = F205 # ACM 21/12/03

The "string" F205 (for C-<), lower down in the file, looks like this:

string F205 = "\033[1><"         # Control+Shift+, (C-<)

Two Emacs lisp files interpret the 7 new prefixes, like that in F205.
For example, 

    <esc>[1>   is interpreted as <control>
    <esc>[2>                     <alt>
    <esc>[3>                     <control>+<alt>
    <esc>[4>                     <shift>

They put extra bindings in the function key map.

If you would like, I could send you all these files by private email,
though you will have to adapt my English keyboard layout to your own
one.  It will take, perhaps, an evening or two to get working

> Regards

>       Xavier

Alan Mackenzie (Nuremberg).

reply via email to

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