all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Pop up context menu (at point) with <menu> key rather than mouse
@ 2018-11-09 19:19 N. Jackson
  2018-11-09 19:29 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: N. Jackson @ 2018-11-09 19:19 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to configure my Emacs so that when I press the <menu> key
on my keyboard, a pop-up menu is displayed.

I think I want this to be same pop-up menu that is displayed when I
press C-mouse-3. Although I am not quite clear how this menu differs
from the one that pops up when I press F10 -- sometimes they are the
same, sometimes they are different.

Possibly what I really want is the pop-up menu that appears when I press
just mouse-3, although that doesn't seem to pop up a menu at the moment
(rather is seems to select random-seeming text) but I think it used to
give a pop-up menu -- or maybe it just does in certain contexts. Yes. It
works on "buttons" in the Gnus Article buffer for example.

In any case, I want the menu to pop up in the context of point, not in
the context of the mouse pointer.

Initially I tried

  (define-key key-translation-map (kbd "<menu>") (kbd "<C-mouse-3>"))

but obviously that is too naïve, as clearly I'm going to need to do
something about making the menu's position be the position of point.

I think what I need to move forward on this, is to know what function is
run to display the menus popped up by C-mouse-3 (and by mouse-3 (when it
pops up a menu at all)), I suppose I can find these functions by running
Emacs under GDB, popping up a menu, halting Emacs in GDB, and displaying
a backtrace, although I feel there must be a much easier way.

Does anyone have any information that might help with this?

N.






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-10 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 19:19 Pop up context menu (at point) with <menu> key rather than mouse N. Jackson
2018-11-09 19:29 ` Eli Zaretskii
2018-11-10 17:11   ` N. Jackson
2018-11-10 17:27     ` Yuri Khan
2018-11-10 17:50       ` N. Jackson
2018-11-10 18:00     ` Eli Zaretskii

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.