Variable: gpm-mouse-mode

gpm-mouse-mode is a customizable variable defined in t-mouse.el.gz.

Value

t

Documentation

Non-nil if Gpm-Mouse mode is enabled.

See the gpm-mouse-mode(var)/gpm-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 gpm-mouse-mode(var)/gpm-mouse-mode(fun).

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/t-mouse.el.gz
;;;###autoload
(define-minor-mode gpm-mouse-mode
  "Toggle mouse support in GNU/Linux consoles (GPM Mouse mode).

This allows the use of the mouse when operating on a GNU/Linux console,
in the same way as you can use the mouse under X11.
It relies on the `gpm' daemon being activated.

Note that when `gpm-mouse-mode' is enabled, you cannot use the
mouse to transfer text between Emacs and other programs which use
GPM.  This is due to limitations in GPM and the Linux kernel."
  :global t :group 'mouse :init-value t
  (dolist (terminal (terminal-list))
    (when (and (eq t (terminal-live-p terminal))
               (not (eq gpm-mouse-mode
                        (terminal-parameter terminal 'gpm-mouse-active))))
      ;; Simulate selecting a terminal by selecting one of its frames ;-(
      (with-selected-frame (car (frames-on-display-list terminal))
        (gpm-mouse-tty-setup))))
  (when gpm-mouse-mode
    (add-hook 'tty-setup-hook #'gpm-mouse-tty-setup)))