Questions tagged [mouse]

for Emacs support of mouse. Emacs mouse interface supports click events, drag events, button-down events, and motion events. Whereas the current buffer handles keystrokes, mouse events in a clicked buffer are independent of the current buffer.

Filter by
Sorted by
Tagged with
0
votes
1answer
66 views

Prevent mouse click from changing cursor position while in insert mode

I work on a laptop most of the time and it happens somewhat often that while inserting some text (in evil mode) I will accidentally hit the touchpad with my thumb, changing the cursor position and ...
4
votes
2answers
1k views

Terminal Emacs not receiving <wheel-up> or <wheel-down>?

From what I understand, I should be able to get mouse scrolling to work in emacs nox mode with the following: (require 'mouse) (xterm-mouse-mode t) (mouse-wheel-mode t) (global-set-key (kbd "<...
2
votes
0answers
27 views

How to detect the modifier key state with track-mouse?

When using track-mouse pressing modifier keys doesn't generate events. Is there a way to detect if any modifier keys are held while tracking the mouse?
1
vote
1answer
92 views

How to access mouse event coordinates? (conveniently)

When getting events from (read-event) it's possible to access only mouse events using (mouse-movement-p event). Inspecting the events I've found I can get the Y pixel location using (cdr (nth 2 (nth ...
0
votes
0answers
20 views

Outline minor mode + mouse

XEmacs had outl-mouse that used outline-minor-mode plus a few pixmaps and mouse keybindings to let old lazy guys to hide and show (in my use case) sections and subsections etc of my AUCTeX buffers, ...
4
votes
2answers
467 views

How to make mode-line text look like a link/button on hover

What face/text/other property should I use to have mode-line text look like a button/link/stuff to click on while I am hovering over it with the cursor? Some examples: different background, 3D-like ...
0
votes
1answer
44 views

Replace clicking a menu bar option from M-` to f10 behavior

When I click on File I want to see and not What can I change to provide this functionality? This question didn't really get the right answer.
0
votes
1answer
56 views

After change from Ubuntu to Lubuntu the mouse wheel (scroll) doesn't work without pressing CTRL together

When I try to scroll with mouse I receive a message saying Wrong type argument: commandp, mouse-5 or Wrong type argument: commandp, mouse-4. This happens after I tried a lot of random fixes. Before ...
5
votes
3answers
470 views

Mouse wheel not working with new mouse

I'm running Emacs 25.1.1 on Debian. No particularly elaborate setup. I recently bought a new mouse, a Logitech MX Anywhere 2S, though I am not using any of the "programmable" features. I simply use ...
3
votes
2answers
289 views

Dired reuse buffer on mouse click

I am currently using the diredp-toggle-find-file-reuse-dir feature of Dired+ so that selecting a directory in a dired buffer opens the directory in the current buffer as described here. However, it ...
1
vote
1answer
24 views

binding M-[ causes mouse focus to insert characters

I have bound M-[ to backward-paragraph. This causes a problem in terminal mode, whereby every time the mouse enters or leaves the frame (i.e., Emacs gains or loses focus), the characters I and O are ...
8
votes
4answers
227 views

Is there a way to determine the face at frame x / y (mouse position)?

When trying to theme certain modes, it's not possible to place the point on the themed item (e.g. to do C-u C-x =) and identify the face used. My thought is to use the mouse to identify the face used,...
4
votes
1answer
857 views

Drag selected text with the mouse

In many editors it is standard to move selected text by dragging and dropping it with the mouse. In emacs dragging selection with the mouse starts a new selection by default. This is extremely ...
1
vote
1answer
28 views

right click for menu with choices (to change font size)?

I am using emacs 26.1 under macos. when I right-click with the mouse, emacs seems to want to select the region. alas, I would prefer to see a popup menu where I can select a few choices that I would ...
1
vote
1answer
48 views

How can I change what happens when I click on a pdf-tools link?

I read pdfs with pdf-tools, but I think what I'm asking may apply to more than pdf-tools alone. In any case, as an example, some research paper pdfs have references with clickable links - say a link ...
7
votes
5answers
2k views

Generate mouse-2 event from MacBook trackpad

I have Emacs.app version 24.5 (9.0) on a MacBook with Mac OS X 10.11.3 (15D21). How can I generate mouse-2 from my MacBook's trackpad? I've googled and found references to mac-emulate-three-button-...
1
vote
2answers
79 views

How to make an invisible overlay displaying other text clickable

I've been trying to add the ability to unfold with mouse by clicking on ellipsis in my json-mode, but after considerable time spent experimenting and looking through the Elisp manual, I can't figure ...
1
vote
0answers
42 views

Disable mouse drag to select

I often run into an issue where I will click in a Emacs frame to make it active and accidentally slide my cursor so that it changes from a click to a drag. This means that some text is highlighted ...
0
votes
0answers
34 views

Cygwin mintty cut will paste to notepad, but (sometimes) not to cygwin emacs. Why? mouse-yank-primary?

I'm running Windows 7, cygwin emacs-w32 26.1, and mintty 2.9.6. When I select text in mintty (using the mouse), and paste (using C-v) into Notepad (for example), it works the way I would expect it to....
2
votes
2answers
202 views

Any way to select a region using `S-down-mouse-1` without saving the region as a kill?

Using emacsw32. The usual suggested way to make a selection using S-down-mouse-1 is to bind that to mouse-save-then-kill. Is there a similar command which selects a region, but does not save the ...
2
votes
1answer
128 views

Use mouse buttons as modifiers

I want to make use of a Thinkpad trackpoint's thumb buttons which I almost never use in Emacs anyway. I'd like to use them as additional Controls in Emacs, and in Emacs only. I've found this answer, ...
1
vote
1answer
44 views

Update point using mouse

I have been trying to add a custom keyboard command that will find a functions definition using S-mouse1. The issue is that I need two mouse clicks for this to work. The first click is to move ...
3
votes
2answers
87 views

xpm: Change displayed image on mouse-over in `header-line-format`

Q: How do I programmatically instruct Emacs to change a displayed image (XPM) on mouse-over in the header-line-format? For example, the following image has a black circle with a white letter X. On ...
3
votes
2answers
1k views

Mouse pointer between characters and the text cursor misplacement

Mouse cursor position interpretation in emacs drives me nuts. Why draw the mouse cursor in emacs window with vertical thin bar if you cannot effectively position it between characters? Selecting ...
5
votes
1answer
888 views

can scrolling be smoother than single line in emacs/org-mode?

Using the trackpad, the scrolling in emacs/spacemacs is notably less smooth than in modern browsers and other editors. I have to confess that this jerkiness irks me more than I would prefer but I have ...
0
votes
2answers
39 views

bind an insertion to a mouse click [duplicate]

I need to change a space to a | here and there and i guessed that the best possibility were to bind a mouse click and the insertion of the pipe (global-set-key [s-mouse-1] '(insert "|")) But when I ...
6
votes
1answer
1k views

Enable Emacs column selection using mouse

How to use mouse to select column in Emacs? How to enable it? The emacs wiki RectangleMark says, there is mouse support for rectangle highlighting by dragging the mouse while holding down the ...
2
votes
1answer
124 views

How to get xemacs-like Buffers menu entry in emacs?

xemacs has a nicely organized Buffers entry in its built-in menu. As you can see from the snapshot, it's sorted alphabetically and grouped by modes: I can't find how to make emacs do the same. menu-...
0
votes
1answer
189 views

How to resize vertical split with mouse when using telephone-line instead of mode-line?

According to this StackOverflow answer, one can resize a vertical split with the mouse by dragging the mode-line in a specific spot. I'm using telephone-line and can't find any spot on there to ...
1
vote
0answers
39 views

How to avoid entering visual mode when clicking a link while using evil?

Emacs newbie here using spacemacs. How to avoid entering visual mode when clicking a link while using evil? This is particularly problematic in org-mode.
23
votes
3answers
1k views

Smooth (mouse) scroll for inline images?

I display images in-line with begin_src & result blocks. However, for large-images, when I scroll past the bottom of the image, I get a 'jerk' and the whole image is scrolled away. Similarly if I ...
6
votes
4answers
1k views

How to disable mouse in Spacemacs

I'd like to completely disable my mouse in Spacemacs. Following the advice in this answer, I set up the following in my .spacemacs file as (defun dotspacemacs/user-config () "Configuration function ...
6
votes
2answers
811 views

Preventing mouse clicks in inactive windows from repositioning the cursor

When I have Emacs (24.4, Mac OS, NS build) in the foreground, I often have many windows open in one frame. I sometimes want to switch windows by clicking in an inactive window. By default, this calls ...
1
vote
1answer
71 views

How to get mouse copy like done on Lisp Machine Zmacs/ZWEI?

I'd like my emacs v25.3.1 running on Mac OS X to have a mouse middle button functionality that copies what you mouse middle on to the insertion point in your buffer. This is great when writing code ...
5
votes
2answers
103 views

local keymap in mode-line doesn't work in terminal

I'm having trouble with getting local keymap:s to work in the mode-line, but only in terminals (with xterm-mouse-mode enabled). This applies to both the standard mode-line entries (like mode-line-...
0
votes
1answer
32 views

How can I return back to point position after jumping by `<down-mouse-1>`?

How can I return back to point position after jumping by <down-mouse-1>? Example: moving in the buffer for a while with C-pbfn, then use mouse for navigation, and press C-u C-<space> ...
5
votes
2answers
186 views

Detect if mouse button is held down?

I have some code that runs in a hook that I want to change to only execute only if the left mouse button is not currently held down. I don't see any obvious functions or variables that let me directly ...
5
votes
3answers
260 views

Turn off mouse highlighting in org-agenda

When I am viewing my org-agenda, whatever line I have the mouse point on is highlighted. Since I never act on these lines with the mouse, and since the line where point is is also highlighted, the ...
2
votes
0answers
23 views

How to reliably redefine scroll wheel in isearch? [I'm using Mitsuharu Yamamoto's Mac port]

I decided to define <wheel-up> and <wheel-down> to isearch-repeat-forward and isearch-repeat-backward in the isearch-mode-map. This works, but if you scroll quickly, it reverts to ...
2
votes
3answers
610 views

Hide mouse pointer while typing

Some programs, like many terminal emulators and gVim, hide the mouse pointer as soon as the keyboard is in use. Obviously, this is helpful when the mouse pointer happens to obscure some text behind it....
2
votes
0answers
85 views

Horizontal Scroll Wheel on Mouseover Buffer

My mouse has a horizontal scroll function, where I can tap the scroll wheel left and right to scroll horizontally. By default, it seems Emacs does nothing with that. The scroll wheel produces <...
0
votes
1answer
93 views

do not move window when “left mouse click on empty part of menubar”

With Emacs GTK, when left clicking with the mouse on an empty part of the menubar, it starts moving the whole window (aka it moves the frame). Emacs is doing this also, when starting it with emacs -Q. ...
1
vote
1answer
131 views

How can Emacs mouse capture in an X11 based terminal be disabled to enable copy and past?

I am using Spacemacs in a terminal in a desktop, ie Konsole and when I try to copy and paste I see that emacs is capturing mouse clicks. Is it possible to disable Emacs mouse capture for copying and ...
2
votes
3answers
774 views

xterm-mouse-mode use mouse on clickable texts

I am using emacs with PuTTY. I have xterm-mouse-mode turned on, and it works nicely, except that nothing happens when I click on "clickable texts" for example on the start page, or in neotree. Is ...
3
votes
1answer
423 views

Keyboard equivalent of left mouse click in org mode

Is there a keyboard equivalent of left mouse click in emacs? Use case here is an .org file I have which contains a no. of URLs I can left click on those URLs to have them open in a browser I was ...
1
vote
1answer
673 views

How to use menu bar at the top via mouse?

I am opening emacs in --no-window-system mode and I switched xterm-mouse-mode on. Mouse clicks within a buffer work. However, I want the menu at the top of the window to open when I click on it. I.e.,...
1
vote
1answer
152 views

elisp - detect line change event to trigger function

I want to detect line change event (arrow-,arrow- or mouse click) to trigger my function call. Below example handled arrow- arrow- but can not handle mouse click or C-n C-p line change event. (defun ...
1
vote
1answer
116 views

Making it so that cursor movement after command will deactivate region

I'm overriding double-mouse-1 to do additional stuff on top of its default behavior. To this end, I have a function that (1) does my additional stuff and then (2) calls another function, ora-mark-like-...
1
vote
2answers
130 views

Detecting double click when running from terminal

I'm using this in my .emacs file to make double-clicking the left mouse button run a command: (global-set-key [(double-mouse-1)] 'some-command) This only works in GUI mode; it doesn't work when ...
3
votes
2answers
346 views

How can I move point to where the mouse is pointing now

I want to move point to where the mouse is pointing. This is easy to do interactively: just click and point will move to where the mouse is pointing. However, I need to do this inside elisp code. I ...