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

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

RE: Creating custom key maps for stock bindings


From: Drew Adams
Subject: RE: Creating custom key maps for stock bindings
Date: Mon, 20 Jan 2020 17:10:32 -0800 (PST)

> it occurs to me that I could rebind existing 
> singleton modifier key into something like this
> (simple examples only):
> 
> tj-control-keymap, containing all the commands which have a control-
> char combinations
> 
> tj-alt-keymap, containing all the commands which have a alt-char
> combinations
> 
> tj-control-alt-keymap, containing all the commands which have a
> control-alt-char combinations
> 
> The question I have, to avoid possible unforeseen problems down the
> road, do I need to unset all of these keys before rebinding them to
> custom keymaps?

A modifier key is not, by itself, a key sequence.
So you can't bind, say, `C-' to `tj-control-keymap'.

But you can certainly bind each of the maps you mention
to a real key sequence, which could be a single key
(other than a modifier key).

And in that case, no, you don't need to unset any
existing key bindings.  (Of course, if the key you
bind one of those maps to is already bound to some
command or another keymap then it will no longer
be available for that original binding, if you
rebind it.)

See, for example, the value of variable `ctl-x-map',
which is bound to all of the key sequences that start
with `C-x'.



reply via email to

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