21.22 Using a Mouse in Text Terminals
Some text terminals support mouse clicks in the terminal window.
In a terminal emulator which is compatible with xterm
, you can use M-x xterm-mouse-mode
to give Emacs control over simple uses of the mouse—basically, only non-modified single clicks are supported. Newer versions of xterm
also support mouse-tracking. The normal xterm
mouse functionality for such clicks is still available by holding down the SHIFT
key when you press the mouse button. Xterm Mouse mode is a global minor mode (see Minor Modes). Repeating the command turns the mode off again.
In the console on GNU/Linux, you can use M-x gpm-mouse-mode
to enable mouse support. You must have the gpm server installed and running on your system in order for this to work. Note that when this 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.
See MS-DOS Mouse, for information about mouse support on MS-DOS.