Subject: bug#38013: [PATCH] Rectangular region selection with mouse

From: Mattias Engdegård <[email-masked]>
Date: Mon, 4 Nov 2019 12:33:36 +0100

4 nov. 2019 kl. 10.07 skrev martin rudalics <[email-masked]>:

> I meant that the code for working with the secondary selection has
> been set up in a quite meticulous way so I would never mess with it
> (including the modifiers it uses).

Not here to mess with it, but if the user prefers to free up the Meta modifier for something else but still have access to the secondary selection, it seems to be perfectly possible. The current patch applies the modifier in a consistent way on all related bindings.

Even better would be a unified binding interface that also takes care of clashes in an automated way.

(Drew, don't worry --- the bindings are placeholders so that people can try out the selection mechanism. The default bindings are yet to be determined.)

> I usually shift-control with my pinkie alone so I would consider it
> optimal and use it for many key combinations all the time.

Geometry of hands and keyboards varies; I find single-key modifiers easier (but not necessarily difficult) to use.

However, shift-control could be a reasonable default value, if we dare not alter anything else. Is there any reason to prefer one of {shift-control, shift-meta, control-meta} to the rest?

> These deserve their bindings though I would not pop up a menu from a
> mouse-down event alone.  What I am obviously assuming is that the
> rectangular region selection code is based on mouse-dragging from one
> corner of the rectangle to the opposite one, so a mouse-drag is easily
> distinguishable from a click for a pop-up-menu.  If this assumption is
> wrong, my rebinding proposal is clearly void.

Thanks for explaining. Unfortunately, region selection and menu pop-up do not seem to be compatible in that way --- at least I didn't manage to use the same modifier for both. Perhaps the events could be multiplexed somehow, but it seems to be on the hacky side.