all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: arthur miller <arthur.miller@live.com>
To: TRS-80 <lists.trs-80@isnotmyreal.name>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: Which modifier to use?
Date: Sat, 5 Dec 2020 22:34:07 +0000	[thread overview]
Message-ID: <AM0PR06MB65774210D62DF0BCE5B7B7EC96F00@AM0PR06MB6577.eurprd06.prod.outlook.com> (raw)

"I think it is little known that you can define keys in this way, I
learned it while setting up which-key.  If you use that package, the car
of the alist will appear as the description, allowing you to create sort
of poor man's menu system.  :)"

Thanks!

Yes, I use which-key,  but I certainly didn't know I could define keys with descriptions. Not sure I have use for it immediately, but interesting indeed!

-------- Originalmeddelande --------
Från: TRS-80 <lists.trs-80@isnotmyreal.name>
Datum: 2020-12-05 22:30 (GMT+01:00)
Till: help-gnu-emacs@gnu.org
Ämne: Re: Which modifier to use?

> On 2020-12-05 10:03, Arthur Miller wrote:
>
> I leave Super to my window manager and xbindkeys; and all other
> modifiers go to applications. It is a rule. Makes life easier if you
> switch between Windows and GNU/Linux

Luckily I can avoid Windoze nearly 100% of the time nowadays, however I
still follow this rule and think it's a great idea, anyway.

I use i3 (wm) and have lots of custom keybindings at the OS/WM level,
they are all based on using Super as modifier.  So, in my mind, Super
(aka "Win") has to do with window manager.

Inside Emacs, I also group related keybindings behind a sort of "leader"
key, for example (dk here is alias for define-key, stricty to shorten
these lines so I can keep nice formatting):

(dk global-map (kbd "C-c y")   '("Yankpad"               . nil))
(dk global-map (kbd "C-c y c") '("Capture"               .
yankpad-capture-snippet))
(dk global-map (kbd "C-c y e") '("Edit"                  .
yankpad-edit))
(dk global-map (kbd "C-c y i") '("Insert"                .
yankpad-insert))
(dk global-map (kbd "C-c y r") '("Reload"                .
yankpad-reload))
(dk global-map (kbd "C-c y R") '("Repeat"                .
yankpad-repeat))
(dk global-map (kbd "C-c y s") '("Set (local) category"  .
yankpad-set-local-category))
(dk global-map (kbd "C-c y S") '("Set (global) category" .
yankpad-set-category))

I think it is little known that you can define keys in this way, I
learned it while setting up which-key.  If you use that package, the car
of the alist will appear as the description, allowing you to create sort
of poor man's menu system.  :)

Cheers,
TRS-80


             reply	other threads:[~2020-12-05 22:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 22:34 arthur miller [this message]
2020-12-05 22:58 ` Which modifier to use? TRS-80
2020-12-06  0:58   ` arthur miller
  -- strict thread matches above, loose matches on Subject: below --
2020-12-05 11:28 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
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.

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

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

  git send-email \
    --in-reply-to=AM0PR06MB65774210D62DF0BCE5B7B7EC96F00@AM0PR06MB6577.eurprd06.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lists.trs-80@isnotmyreal.name \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.