[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get key-binding for a command and print key binding in kbd syntax
From: |
Robert Pluim |
Subject: |
Re: Get key-binding for a command and print key binding in kbd syntax |
Date: |
Thu, 09 Feb 2023 11:28:39 +0100 |
>>>>> On Thu, 09 Feb 2023 09:33:16 +0100, Tassilo Horn <tsdh@gnu.org> said:
Tassilo> Hi all,
Tassilo> someone asked on another list if mu4e could replace its main
buffer's
Tassilo> content, parts of which looks like
Tassilo> Maildirs
Tassilo> * [ji] /Fastmail/GNU 0/1244
Tassilo> * [ja] /Fastmail/Archive 0/8976
Tassilo> * [jb] /Fastmail/Drafts 0/24
Tassilo> where j is the key bound to the mu4e-search-maildir command by
default,
Tassilo> with the correct key bound in its mode's map. I.e., right now, j
is
Tassilo> hard-coded and conforms to the standard binding but is wrong when
you
Tassilo> define-key it otherwise.
Tassilo> So the question is: how do you get the key(s) for a command?
Tassilo> `where-is-internal' looks promising giving ([106] [menu-bar mu4e
Search\
Tassilo> maildir]) where 106 is the char ?j. If that's the right way, is
numeric
Tassilo> vector vs. vector of symbols the right way to distinguish key
bindings
Tassilo> from menu items?
`substitute-command-keys'
Tassilo> And the other question: how to I convert such a key binding vector
to a
Tassilo> string in kbd syntax for display purposes?
`key-description'
Robert
--
- Get key-binding for a command and print key binding in kbd syntax, Tassilo Horn, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax,
Robert Pluim <=
- Re: Get key-binding for a command and print key binding in kbd syntax, Tassilo Horn, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Tassilo Horn, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Robert Pluim, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Tassilo Horn, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Robert Pluim, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Tassilo Horn, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Robert Pluim, 2023/02/09
- Re: Get key-binding for a command and print key binding in kbd syntax, Tassilo Horn, 2023/02/09