[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.
Re: Which modifier to use?, Stefan Möding, 2020/12/05
Re: Which modifier to use?, Arthur Miller, 2020/12/05
Re: Which modifier to use?, Marcin Borkowski, 2020/12/06
Re: Which modifier to use?, Michael Heerdegen, 2020/12/06
Re: Which modifier to use?, Philip K., 2020/12/09