IDE Window: Editor Options Mouse

From Lazarus wiki
Revision as of 13:46, 4 June 2009 by Martin (talk | contribs)
Jump to navigationJump to search

Deutsch (de) English (en)

The Context Tree

The context tree is the Treev just left to the Overview Grid. It currently has 2 Entries:

  • General
  • Selection

You can define the behaviour of the Mouse-Buttons, dependent on the Context. E.g. clicking "selected text" may have a different action, than clicking unselected text.

If a Node for a specific context exists, it will use it's parents as fallback. E.g. If you click on "selected text", the configuration of the Selection node is searched first. If it has no action for your click, the parent node General is searched. (By default this is used to assign "drag selected text" to the left button)

More Context nodes are planned, to allow configuring Mouse clicks on the Gutter, and Fold-Tree

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

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