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

From Free Pascal wiki
Jump to navigationJump to search
Line 4: Line 4:
  
 
The context tree is the Treev just left to the Overview Grid. It currently has 2 Entries:
 
The context tree is the Treev just left to the Overview Grid. It currently has 2 Entries:
* ''General''
+
* '''General'''
* ''Selection''
+
* '''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.
 
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)
+
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
 
More Context nodes are planned, to allow configuring Mouse clicks on the Gutter, and Fold-Tree
  
= Configure Mouse-Settngs for the IDE's SynEdit =
+
= 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|Double to Quad Clicks]]
 +
 
 +
Notes:
 +
* 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.
 +
 
 +
Notes:
 +
* Some events rerquire 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 ==
  
 
Set the actions that happens when you use the mouse.
 
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
 
* Using Modifiers (Shift/Ctrl/Alt) the must be none overlapping
 
** Example
 
** Example
Line 22: Line 52:
 
:: (If the checkbox is greyed, the Modifier key is ignored for checking.)
 
:: (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.
 
** 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.
 +
 +
 +
= Configure Mouse-Settngs for the IDE's SynEdit =
 +
 
* Select the command you like to happen
 
* Select the command you like to happen
 
* Select if the caret should be moved.
 
* Select if the caret should be moved.
 
: Note: currently almost all commands move the mouse implicit.
 
: 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 ==
+
= Double to Quad Clicks =
  
 
* Note: Those are currently only working with left mouse
 
* Note: Those are currently only working with left mouse
Line 46: Line 77:
 
== Current Limitations ==
 
== Current Limitations ==
  
* Double/Triple/Quad click only available for Left Mouse
+
* Double/Triple/Quad click only available for Left Mouse and only for mouse down
 
* Gutter Config not yet included.
 
* Gutter Config not yet included.
 
* GTK2: PopUp-Menu is recommended for use with ButtonUp only
 
* GTK2: PopUp-Menu is recommended for use with ButtonUp only

Revision as of 14:09, 4 June 2009

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

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

Notes:

  • 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.

Notes:

  • Some events rerquire 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

Set the actions that happens when you use the mouse.

  • 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.


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

  • 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 and only for mouse down
  • Gutter Config not yet included.
  • GTK2: PopUp-Menu is recommended for use with ButtonUp only