unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Jean Louis" <bugs@gnu.support>, "Stefan Möding" <s.moeding@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Which modifier to use?
Date: Sat, 5 Dec 2020 07:52:44 -0800 (PST)	[thread overview]
Message-ID: <ca412f70-65c3-478e-a8ce-66e378d24ecd@default> (raw)
In-Reply-To: <X8uERVNq3WteGcNV@protected.rcdrun.com>

> > (define-prefix-command 'stm-launcher-map)
> > (global-set-key (kbd "s-z") 'stm-launcher-map)
> 
> Thank you. This is good and useful tip. Then I could do s-z for new
> map and get plethora of other keys. I did not know it works that way
> nicely.
> 
> > (define-key stm-launcher-map (kbd "=") #'ipcalc-at-point)
...

In that case, you asked the wrong question.
That answer, which I guess is what you were
really looking for, is about using a _prefix
key_, not a modifier key.  Completely
different animal.
___

And yes, prefix keys are wonderful.  When
bound to keymaps they also let you easily move
whole sets of commands/keys around as units.

E.g.: A library can identify a set of commands
that belong together in UI terms, by putting
them on a keymap.  And it can put that keymap
(optionally, i.e., under user control) on a
given prefix key by default.  But a user can
easily move that whole set of commands and
their bindings from the default prefix key to
another prefix key.



  reply	other threads:[~2020-12-05 15:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 11:28 Which modifier to use? Jean Louis
2020-12-05 11:48 ` Christopher Dimech
2020-12-05 12:55   ` Jean Louis
2020-12-05 15:03     ` Arthur Miller
2020-12-05 17:55       ` Jean Louis
2020-12-05 21:29       ` TRS-80
2020-12-06  5:40         ` Jean Louis
2020-12-05 12:25 ` Stefan Möding
2020-12-05 12:59   ` Jean Louis
2020-12-05 15:52     ` Drew Adams [this message]
2020-12-05 16:08       ` Arthur Miller
2020-12-05 18:01       ` Jean Louis
2020-12-05 14:55 ` Arthur Miller
2020-12-05 17:54   ` Jean Louis
2020-12-06  9:14 ` Marcin Borkowski
2020-12-07  6:57   ` Jean Louis
2020-12-06 23:33 ` Michael Heerdegen
2020-12-07  0:35   ` Christopher Dimech
2020-12-09  7:13 ` Philip K.
  -- strict thread matches above, loose matches on Subject: below --
2020-12-05 22:34 arthur miller
2020-12-05 22:58 ` TRS-80
2020-12-06  0:58   ` arthur miller

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=ca412f70-65c3-478e-a8ce-66e378d24ecd@default \
    --to=drew.adams@oracle.com \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=s.moeding@gmail.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).