[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pop up context menu (at point) with <menu> key rather than mouse

From: N. Jackson
Subject: Pop up context menu (at point) with <menu> key rather than mouse
Date: Fri, 09 Nov 2018 14:19:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]