Variable: dired-click-to-select-mode
dired-click-to-select-mode is a buffer-local variable defined in
dired.el.gz.
Documentation
Non-nil if Dired-Click-To-Select mode is enabled.
Use the command dired-click-to-select-mode(var)/dired-click-to-select-mode(fun) to change this variable.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/dired.el.gz
(define-minor-mode dired-click-to-select-mode
"Toggle click-to-select inside this Dired buffer.
When this minor mode is enabled, using `mouse-2' on a file name
within a Dired buffer will toggle its mark instead of going to it
within another window.
This minor mode is intended to be used when performing file management
using a touch-screen device. The mode is automatically enabled when a
\"hold\" gesture over a file name is received, and is therefore
automatically disabled after any Dired operation on the marked
files (any command whose name starts with \"dired-do-\" and which
performs some operation on the marked files) completes. When the mode
is automatically disabled, it unmarks all the marked files in the Dired
buffer."
:group 'dired
:lighter " Click-To-Select"
(unless (derived-mode-p '(dired-mode wdired-mode))
(error "Not a Dired buffer"))
(if dired-click-to-select-mode
(setq-local tool-bar-map
`(keymap (exit-click-to-select menu-item
"Exit Click To Select Mode"
dired-click-to-select-mode
:help "Exit `dired-click-to-select-mode'."
:image ,(tool-bar--image-expression "close")
:enable t)))
;; Reset the default tool bar.
(kill-local-variable 'tool-bar-map)
(dired-unmark-all-marks))
;; Repropertize this Dired buffer.
(let ((inhibit-read-only t))
(remove-text-properties (point-min) (point-max)
'(invisible nil
keymap nil
dired-filename nil
help-echo nil
mouse-face nil))
(when dired-make-directory-clickable
(dired--make-directory-clickable))
(dired-insert-set-properties (point-min) (point-max)))
;; Redisplay the tool bar.
(force-mode-line-update))