help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: F10 → menu


From: John Ankarström
Subject: Re: F10 → menu
Date: Sun, 28 May 2017 17:18:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes:

> I'm on a MacBook Pro with a trackpad, so C-click is right-click and triggers 
> the
> buffer menu (mouse-buffer-menu → C-down-mouse-1). And I can't do 
> C-right-click.
> The click is a left click by default.
>
> But now, I see I can bind that C-click to the function you just defined... :)

Ah, I see. I remember that from using a Mac.

If you want to have the menu show up at the position of the mouse
cursor (like <C-down-mouse-3>), just remove the explicit position
from the call to `popup-menu':

--8<---------------cut here---------------start------------->8---
(defun mouse-menu-bar-open ()
  (interactive)
  (popup-menu (mouse-menu-bar-map)))

(global-set-key (kbd "<C-S-down-mouse-1>") #'mouse-menu-bar-open)
--8<---------------cut here---------------end--------------->8---

Above I set that to control + shift + left-click, but again,
maybe on a Mac trackpad that would be <S-down-mouse-3>.

- John



reply via email to

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