[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
context-menu-mode and S-<down-mouse-1>
From: |
sbaugh |
Subject: |
context-menu-mode and S-<down-mouse-1> |
Date: |
Fri, 28 Feb 2025 21:27:00 +0000 (UTC) |
By default <mouse-3> is bound to mouse-save-then-kill. This is the
easiest and most typical way in Emacs to select the text between point
and the mouse cursor.
context-menu-mode takes over <down-mouse-3>, making it open the context
menu. Therefore, using mouse-save-then-kill now requires
double-right-clicking, and the context menu pops up in-between, which
can interfere.
As a result, with context-menu-mode turned on, there's no easy way to
select the text between point and the mouse cursor. After turning on
context-menu-mode at my site, users have complained to me about this.
I think a straightforward fix would be: when context-menu-mode is on,
S-<down-mouse-1> selects the text between point and the mouse cursor.
For better or for worse, that would match the behavior of
shift-left-click in other popular text editors. Changing the behavior
of S-<down-mouse-1> like this has been discussed in the past, but I
think the aforementioned issue with context-menu-mode should raise the
topic again.
The current binding for S-<down-mouse-1> is mouse-appearance-menu. To
preserve easy access to mouse-appearance-menu, we could add it to the
context menu. That would preserve easy access to mouse-appearance-menu
while freeing up S-<down-mouse-1> for manipulating the selection.
At the very least, we should make it easier to configure this: right now
there's no easy way to make S-<down-mouse-1> have the shift-left-click
selection-manipulation behavior it has in other popular text editors,
because there's no built-in command which has the right behavior. We
should at least add one.
- context-menu-mode and S-<down-mouse-1>,
sbaugh <=