[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating custom key maps for stock bindings
From: |
Tim Johnson |
Subject: |
Re: Creating custom key maps for stock bindings |
Date: |
Mon, 20 Jan 2020 16:22:19 -0900 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 1/20/20 4:10 PM, Drew Adams wrote:
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'.
Understood about the modifiers.
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).
Good.
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
Cool.
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'.
I see no utility in rebinding such sequences. With which-key, pressing
c-x and waiting a couple of seconds invokes a buffer with descriptions
of all sequences starting with c-x.
I just want to list out for sequences with simpler modifiers, C-char,
C-M-char, M-char, Super-char and hyper-char.
Looks good to go.
Thanks Drew
--
Tim
tj49.com