From: "N. Jackson" <nljlistbox2@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Pop up context menu (at point) with <menu> key rather than mouse
Date: Fri, 09 Nov 2018 14:19:50 -0500 [thread overview]
Message-ID: <87sh0akqi1.fsf@moondust.localdomain> (raw)
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.
next reply other threads:[~2018-11-09 19:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 19:19 N. Jackson [this message]
2018-11-09 19:29 ` Pop up context menu (at point) with <menu> key rather than mouse 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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sh0akqi1.fsf@moondust.localdomain \
--to=nljlistbox2@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).