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).
This variable was added, or its default value changed, in Emacs 31.1.
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. 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.
On text terminals that Emacs knows are compatible with the mouse as well
as other critical editing functionality, this is automatically turned on
at startup. See Info node `(elisp)Terminal-Specific' and `xterm--init'."
:global t :group 'mouse
:version "31.1"
(setq xterm-mouse-mode-called t)
(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)))