There is nothing built in, but you can use this code. Set up variables dc-single-click-cmdand dc-double-click-cmdto the team that you want.
Note: this leads to a slight delay, b / c code must wait a little while to determine if the event was a single or double click.
(defvar dc-single-click-cmd 'dc-example-single-click)
(defvar dc-double-click-cmd 'dc-example-double-click)
(defvar dc-click-timer nil
"Pending single-click event.")
(defun dc-example-single-click ()
(interactive)
(message "A single click just happened."))
(defun dc-example-double-click ()
(interactive)
(message "Wait! I meant double click."))
(defun dc-click-cmd ()
"Either kick off a single click, or a double click."
(interactive)
(if dc-click-timer
(progn
(cancel-timer dc-click-timer)
(setq dc-click-timer nil)
(call-interactively dc-double-click-cmd))
(setq dc-click-timer (run-at-time (when double-click-time
(/ 1000.0 double-click-time))
nil
'dc-call-single-click))))
(defun dc-call-single-click ()
"spawn the single click"
(setq dc-click-timer nil)
(call-interactively dc-single-click-cmd))
source
share