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

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

RE: Which modifier to use?


From: Drew Adams
Subject: RE: Which modifier to use?
Date: Sat, 5 Dec 2020 07:52:44 -0800 (PST)

> > (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 via email to

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