[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What is the difference between down-mouse-3 and mouse-3
From: |
Ye Wenbin |
Subject: |
What is the difference between down-mouse-3 and mouse-3 |
Date: |
Tue, 15 Apr 2008 12:38:47 +0800 |
User-agent: |
Opera Mail/9.25 (Linux) |
I wrote try to figure out how to set up mouse menu, after spending a lot of
time to to figure out why no action preform when click submenu, I found
that
I should bind down-mouse-3 event rather than mouse-3 event. I can't find
where is the difference mentioned in elisp manual. Is there any documents
for the reason that submenu does not work for mouse-3 binding?
Here is my test code:
(define-derived-mode foo-mode text-mode "Foo"
"Test major mode"
)
(easy-menu-define foo-menu foo-mode-map "My own menu"
'("Foo"
["Next Line" next-line t]
("Sub Menu"
["Previous Line" previous-line t])))
(define-key foo-mode-map [mouse-3] 'mouse-popup-menubar-stuff)
;; (define-key foo-mode-map [down-mouse-3] 'mouse-popup-menubar-stuff)
--
Best Regards,
Ye Wenbin
- What is the difference between down-mouse-3 and mouse-3,
Ye Wenbin <=