emacs-devel
[Top][All Lists]
Advanced

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

Re: Changing default mouse bindings


From: Tak Kunihiro
Subject: Re: Changing default mouse bindings
Date: 2017年11月15日 08:11:08 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (windows-nt)

>> Is it completely out of the question to just bind right-click
>> directly to this context menu by default instead of using double
>> clicks or long clicks? If so, will it ever be considered? It would
>> be a shame if Emacs is never able to shed some of its old baggage.
>
> I hope it would be considered. Originally I thought it would be best
> to work around the current bindings (via either the long press or
> double click of mouse-3), but if we can instead provide multiple
> functionalities with mouse-3 by differentiating between simple clicks
> and drags as Yuri suggested, that could be an even better solution.
My proposal is before changing the default binding, to have minor mode
such like `poplife-mode' that provides the mouse-3 binding with a series
of context menu. I think context menu itself is as important as how to
trigger.
(define-minor-mode poplife-mode
 "A global minor-mode to show context menu by right click."
 :init-value nil
 :global t
 :keymap (let ((map (make-sparse-keymap))
 (context-menu
 `(menu-item "Context menu" poplife-context-menu
 :filter ,(lambda (_) (poplife-context-menu (aref 
(this-command-keys) 0))))))
 (define-key map [mouse-3] context-menu)
 (define-key map [drag-mouse-3] context-menu)
 (define-key map [C-down-mouse-1] 'ignore)
 (define-key map [C-mouse-1] context-menu)
 (define-key map [C-double-mouse-1] context-menu)
 (define-key map [C-triple-mouse-1] context-menu)
 (define-key map [C-drag-mouse-1] context-menu)
 map))

reply via email to

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

AltStyle によって変換されたページ (->オリジナル) /