emacs-devel
[Top][All Lists]
Advanced

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

Re: Customize key bindings?


From: Simon Josefsson
Subject: Re: Customize key bindings?
Date: Tue, 30 Dec 2003 21:34:28 +0100
User-agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     I have an idea for a custom-key.el that would allow users to add
>     global key bindings via the customize interface.  I suspect this is
>     sufficient for many people. It would be sufficient for me.  See below.
>
> That is a feature I would definitely like to have added.
> I agree that global bindings are enough to make a very useful feature.

Good.

> However, I would expect that the `string' type is not very convenient
> for specifying a key sequence.  The right way is to let the user
> actually type the key sequene to bind, as global-set-key already does.
> Can someone define a type for that?

Yes, this would be better.  I'm not really familiar with custom enough
to add a new type, but some ideas on the GUI:

The custom buffer could look like:

[INS] [DEL] Key: <f5>...           [READ KEY]
            Function: compile...

Where the '<f5>...' and 'compile...' are the current string input
fields, [INS]/[DEL] are the alist buttons, and [READ KEY] is a new
button users can press that read a key interactively, much like C-h k
or similar.  Advanced users can still enter the key binding using the
string input field.

There is one complication though -- imagine if the user wants to bind
'C-c x y z' to something, effectively creating sub-keymaps.  Should
this be possible?  How?  I'm leaning towards not supporting it.  The
problem is to find out when the key pressed by the user "ends".  It is
easier to only allow the user to only add simple key bindings to
existing keymaps.

> I think that our current interface for adding to an alist
> is rather inconvenient too.

Hm, I can't think of anything I find problematic.





reply via email to

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