Variable: xterm-mouse-mode
xterm-mouse-mode is a customizable variable defined in xt-mouse.el.gz.
Value
nil
Documentation
Non-nil if Xterm-Mouse mode is enabled.
See the xterm-mouse-mode(var)/xterm-mouse-mode(fun) command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node (emacs)Easy Customization)
or call the function xterm-mouse-mode(var)/xterm-mouse-mode(fun).
Probably introduced at or before Emacs version 19.30.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/xt-mouse.el.gz
;;;###autoload
(define-minor-mode xterm-mouse-mode
"Toggle XTerm mouse mode.
Turn it on to use Emacs mouse commands, and off to use xterm mouse commands.
This works in terminal emulators compatible with xterm. It only
works for simple uses of the mouse. Basically, only non-modified
single clicks are supported. When turned on, the normal xterm
mouse functionality for such clicks is still available by holding
down the SHIFT key while pressing the mouse button."
:global t :group 'mouse
(funcall (if xterm-mouse-mode 'add-hook 'remove-hook)
'terminal-init-xterm-hook
'turn-on-xterm-mouse-tracking-on-terminal)
(if xterm-mouse-mode
;; Turn it on
(progn
(setq mouse-position-function #'xterm-mouse-position-function
tty-menu-calls-mouse-position-function t)
(mapc #'turn-on-xterm-mouse-tracking-on-terminal (terminal-list)))
;; Turn it off
(mapc #'turn-off-xterm-mouse-tracking-on-terminal (terminal-list))
(setq mouse-position-function nil
tty-menu-calls-mouse-position-function nil)))