How do I use the mouse buttons in Emacs?
You can use your workstation's mouse to perform some editing operations in Emacs. These operations are summarized below.
- Left: Move the cursor to the mouse's location.
- Middle: Insert the text from the X cut buffer at the location of the Emacs cursor.
- Right: Copy the text between the cursor and the mouse into the X cut buffer. The text is not deleted from the buffer, but is put into the Emacs kill ring. The text may be recalled by using MIDDLE (above) or Ctrl-Y.
- Ctrl+Middle: Cut the text between the cursor and the mouse into the X cut buffer. The text is deleted from the buffer and is put into the Emacs kill ring. The text may be recalled by using MIDDLE (above) or Ctrl-Y.
- Ctrl+Right: Divide the current window into two windows.
- Ctrl+Shift+Right: Return to single-window mode, keeping the window that contains the mouse.
- Ctrl+Shift+Middle: Brings up a pop-up help window, from which various operations or buffers may be selected with the mouse.
NOTE: Emacs occasionally refers to the mouse buttons by number instead of "left" or "right". Mouse-1 is the left button, Mouse-2 is the middle button, and Mouse-3 is the right button. If you mouse only has two buttons and no scroll wheel, you can simulate the middle button by pressing the left and right buttons simultaneously. If your workstation has a scroll wheel mouse, pressing the scroll wheel down is equivalent to pressing the middle button. Scroll wheel mice can also send the events Mouse-4 and Mouse-5, which translate to moving the scroll wheel forwards and backwards, respectively.