Open deen1 opened 4 months ago
I believe emacs will intercept the sequence <escape> C-h
before which-key can handle it. The problem is that emacs translates that sequence to C-M-h
. I can't find the reference for it right now, but essentially <escape> x
, where x
could be any key, translates immediately to M-x
, so you're unintentionally invoking C-M-h
instead of something + C-h
, if that makes sense.
This behavior is something particular to <escape>
and would be difficult if not impossible to circumvent unfortunately.
I believe emacs will intercept the sequence C-h before which-key can handle it. The problem is that emacs translates that sequence to C-M-h.
This is what I understood, but I had hoped that by adding e.g. <f5>
as the paging key (as far as I can tell, <escape>-<f5>
is not bound to anything) we could circumvent C-M-h
binding.
But I guess you're saying that Emacs basically tries to reserve any key combination beginning with <escape>
, which may be why (define-key which-key-mode-map (kbd "<escape> <f5>") 'which-key-C-h-dispatch)
doesn't work as intended.
That's a shame, but I can live with it. Thanks for your input on this!
Apologies if this has been raised before, but I couldn't quite find an issue that addressed this head on. I found this Stack Exchange post, which had a couple of answers (but the question is focused on Spacemacs, which I don't use), and this possibly related issue, #223.
When hitting
<escape>
in a number of contexts,which-key
pops up in a side-window with a number of options – see first screenshot below (which was made viaemacs -Q
, so hopefully should be reproducible). But it is not possible to page them, as<escape> C-h
is bound to something else (I think it's(mark-defun)
) and the side-window is killed.Following the paging section in the README, I tried running
emacs -Q
, loadingwhich-key
and using the following config:Unfortunately, hitting
<escape>
no longer offers all the previous command descriptions, just the<f5>
for paging (see second screenshot).Is this simply an unavoidable issue with
<escape>
, or is there some way around it?