IDE Window: Editor Options Mouse

From Lazarus wiki
Jump to navigationJump to search

Configure Mouse-Settngs for the IDE's SynEdit

Set the actions that happens when you use the mouse.

  • You can set actions for Single to Quad click for each of the MouseButtons (left/right/middle)
  • Using Modifiers (Shift/Ctrl/Alt) the must be none overlapping
    • Example
"Left Mouse with shift= on, ctrl=either, alt=either" conflicts with "Left Mouse with shift=either, ctrl=on, alt=either"
(If the checkbox is greyed, the Modifier key is ignored for checking.)
    • Fall-back: For each Combination of (left/right/middle) with Single/double/...) you can have one fall-back. This is identified, by all 3 modifier checkboxes greyed.
  • Select the command you like to happen
  • Select if the caret should be moved.
Note: currently almost all commands move the mouse implicit.
  • Act on mouse up: Most actions take place on mouse down (eg "Start selection" even must be on mouse down, since it relies on mouse move, with the button still down.
Some actions, like Mouselink, may be desired to take place only, once the button is released
    • Mouse-Up events do never conflict with mouse down events.

Using Double to Quad Click

  • Note: Those are currently only working with left mouse
  • Note: Those are currently only triggering Mouse Down

If you assign actions to double and triple click, you should aware that they always trigger the lesser clicks too.

This is: Doing a Triple-Click will first do a Single-Click (down and up) with the same Modifier Keys (none, shift, alt, ...), then a double click, then the triple. (At the time of the first click, SynEdit does not know there will be more clicks)

You should therefore take care of the actions assigned to those clicks.

  • With the default (select, select word, select line, select paragraph) this is no problem. Selecting a Line (Triple) is not disturbed by selecting a Word (Double) first.
  • If However you would assign MouseLink to the Single (or Double), and select Word to the Double (or Tripple, one more than the other), this would not work. Because by the time you do your last click, SynEdit already followed the Link (and will not undo this). In fact, if SynEdit followed a Link to an other File, then a new SynEdit became active, and would see your last click as a single click.
  • This is not a bug. This is the correct behaviour

General vs Selection:

If the mouse is hovering over the selected text block, then mouse actions from the Selections config will be searched first. If none is found actions from the "general" config are used.

Current Limitations

  • Double/Triple/Quad click only available for Left Mouse
  • Gutter Config not yet included.
  • GTK2: PopUp-Menu is recommended for use with ButtonUp only