unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Tim Johnson <tim@akwebsoft.com>, MLEmacs <Help-gnu-emacs@gnu.org>
Subject: RE: Creating custom key maps for stock bindings
Date: Mon, 20 Jan 2020 17:10:32 -0800 (PST)	[thread overview]
Message-ID: <f18c121d-7839-4a4f-a856-affcfe0cba53@default> (raw)
In-Reply-To: <b4e50a5a-6499-0f46-68d9-d69b495ceb9b@akwebsoft.com>

> 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	other threads:[~2020-01-21  1:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  0:16 Creating custom key maps for stock bindings Tim Johnson
2020-01-21  1:10 ` Drew Adams [this message]
2020-01-21  1:22   ` Tim Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f18c121d-7839-4a4f-a856-affcfe0cba53@default \
    --to=drew.adams@oracle.com \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=tim@akwebsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).