Difference between revisions of "IDE Window: Editor Options Mouse/de"

From Lazarus wiki
Jump to navigationJump to search
Line 86: Line 86:
 
== Double to Quad Clicks ==
 
== Double to Quad Clicks ==
  
* Note: Those are currently only working with left mouse
+
* Anmerkung: Dies funktioniert gegenwärtig nur mit der linken Maustaste.
* Note: Those are currently only triggering Mouse Down
+
* Anmerkung: 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.
+
Wenn sie einem Doppel- oder Dreifachklick eine Aktion zuweisen, dann sollten sie daran denken, daß diese immer auch die Aktionen für einen Einfach- bzw. Doppelklick auslösen.
  
 
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)
 
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)

Revision as of 11:41, 5 June 2009

Deutsch (de) English (en)

The Context Tree

The context tree is the Treeview just left to the Overview Grid. Gegenwärtig enthält es 2 Einträge:

  • Allgemein
  • Auswahl

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

The Click Configuration

When you click a mouse button, the following items are checked to find the desired behaviour/action.

The Button

There are individual settings for the Left, Right and Middle mouse Button

The Click Type

There are individual settings for Single, Double, Triple or Quad clicks.

Please make sure you read the section on Double to Quad Clicks


There also is a setting Any, which means the action is executed for any of the clicks. That would mean that a double click would execute the action twice. Or if the first part of the double-click changed the state of the object, the 2nd part would apply to the new state.

  • Example:
The left button on the code fold part is configured as Any. Each click will toggle between folded and unfolded. Therefore a double click will revert the action of the first.
Without the Any setting, if you accidentally folded the wrong node, you would have to wait before you could click again to unfold it. (Because a quick 2nd click would count as double click, which wouldn't be matched by Single)

Anmerkungen:

  • Not all of them are supported on all platforms
  • Currently Double, Triple and Quad only work for the left button and only for down clicks

The Click Direction

A mouse click consists of a mouse-down and a mouse-up.

Actions can be configured to happen on either of those 2 events.

You can assign 2 different actions to the 2 events of the same click. They will be executed in the order of the events. However keep in mind that such a configuration may limit the action of the mouse-down event.

Anmerkungen:

  • Some events require the correct Click Direction to work properly:
    • Start Selection, Drag Selection: Only works on down events, since it relies on the following mouse-movement-while-button-down. (It has a build in "end" at mouse button up)
    • Context-Menu: On some WidgetSets this will only work reliable on mouse-up events

The Modifier Keys

Mouse behaviour can be modified by holding the Shift, Alt or Strg key (or combinations of them)

At the time of the click-down or up the state of all three keys is checked. An action can be defined to:

  • require one, some or all of the modifier keys pressed (Checkbox ticked)
  • require one, some or all of the modifier keys *not* pressed (Checkbox not ticked)
  • ignore the state of one, some or all of the modifier keys (Checkbox greyed)

For a given combination of Button, Click-Type, Click-Direction there must not be any ambiguity for the modifier keys. Example

  • Bad / Ambiguous:
    • Left, Single, down Click with: Shift required pressed; Alt and Strg ignored
    • Left, Single, down Click with: Ctrl required pressed; Alt and Shift ignored
Now if you do this click, with both of Shift and Strg pressed, it would be unclear which of the 2 settings to use
  • Correct:
    • Left, Single, down Click with: Shift required pressed; Strg required un-pressed; Alt ignored
    • Left, Single, down Click with: Strg required pressed; Shift required un-pressed; Alt ignored
  • If uou whish Shift to be preferred (the shift action should be taken, if both modifier keys are pressed) then you must at an extra setting:
    • Left, Single, down Click with: Strg required pressed; Shift required pressed; Alt ignored

There is one exception from this rule. If all modifier keys are set to be ignored, the entry becomes the fall-back for the button, click-type, click-dir configuration. This is, if no configuration is found which has at least one modifier key required either pressed or un-pressed, then the fallback will be used.

Anmerkung:

  • The Modifier Combinations used to detect the action on mouse down (or up) has nothing to do, with the modifier Key that certain actions use during there mouse-move phase.
e.g. Dragging uses "Strg" to copy the dragged text instead of moving it. However the use of "Strg" for copy indication is during mouse move, so you can set start dragging to rely on any other Modifier key. It is however recommended to set Ctrl to greyed, so you can start dragging with the key pressed or un-pressed.
This is different to using "alt" (or others) for column mode selection: Here the decision is made only at the time of click. Later changes of the "alt" key during mouse-move do not change the selection mode.

Configure Mouse-Settngs for the IDE's SynEdit

  • Select the command you like to happen
  • Select if the caret should be moved.
Note: currently almost all commands move the mouse implicit.

Double to Quad Clicks

  • Anmerkung: Dies funktioniert gegenwärtig nur mit der linken Maustaste.
  • Anmerkung: Those are currently only triggering Mouse Down

Wenn sie einem Doppel- oder Dreifachklick eine Aktion zuweisen, dann sollten sie daran denken, daß diese immer auch die Aktionen für einen Einfach- bzw. Doppelklick auslösen.

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.
  • Das ist kein Bug sondern das korrekte Verhalten.

Aktuelle Einschränkungen

  • Double/Triple/Quad click ist nur für die linke Maustaste und nur für Mouse down verfügbar
  • Gutter Config not yet included.
  • GTK2: PopUp-Menu is recommended for use with ButtonUp only