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

From Free Pascal wiki
Jump to navigationJump to search
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{IDE Window: Editor Options Mouse}}
+
<noinclude>{{IDE Window: Editor Options Mouse}}<!--- This page may be used as template in other pages ---></noinclude>
  
 
<!-- do NOT REMOVE the div tags in the headers. They are used for the F1 help in the IDE. They must be kept, even if you rename the headers -->
 
<!-- do NOT REMOVE the div tags in the headers. They are used for the F1 help in the IDE. They must be kept, even if you rename the headers -->
  
* This page is part of [[IDE_Window:_Editor_Options]]
+
<u><b>This is part of the online help for the IDE. </b></u><br/>
 +
It describes the section: "Editor" / "Mouse". You can open the described dialog in your IDE via:<br/>
 +
*The menu: "Tools" => "Options" / Editor options ...
 +
*The source-editor pop-up menu: "Editor properties ...
  
* You can get this dialog via:
+
<font size="+1"><u><b>Navigation</b></u></font><br/>
:: Menu / Environment / Editor options / Mouse
+
<table><tr><td>
:: Source editor / popup menu / Editor properties ...
+
*<font size="+1">[[IDE_Window:_Editor_Options|Editor Options]]</font> Overview of all Editor Options
<br>
+
</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td><td>
 +
*<font size="+1">[[IDE_Window:_Options|IDE Options]]</font> Overview of all options for the IDE</td>
 +
</tr></table>
  
= The Context Tree =
+
----
  
The context tree is the Treeview just left to the Overview Grid. It currently has the entries:
+
__TOC__
* '''Text'''
 
** '''Selection'''
 
* '''Gutter'''
 
** '''Fold''' '''Tree'''
 
*** '''Collapsed''' '''[+]'''
 
*** '''Expanded''' '''[-]'''
 
** '''Line''' '''Numbers'''
 
  
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.
+
= General =
  
If a click has no Entry in a specific context, it will use the content's parent(s) 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 '''Text''' is searched. (By default this is used to assign "drag selected text" to the left button)
+
== Hide mouse when typing ==
  
The '''Gutter''' and '''Text''' node are top level nodes, that do not have fall-backs. But the other nodes do fall back on their parents.
+
If the mouse is positioned over the editor, it will be hidden while you type. Any mouse-move, click, or menu action will make it visible again.
  
See also [[#The Priority|The Priority]] and [[#fallthrough|Fall-Through]] in the [[#The Action / Behaviour|The Action / Behaviour]] section.
+
= Gutter =
  
= The Click Configuration =
+
You can currently choose between two predefined modes for the gutter area
  
When you click a mouse button, the following items are checked to find the desired behaviour/action.
+
== Standard ==
  
== The Button ==
+
All left-clicks on the gutter act when you press the mouse button down.
  
There are individual settings for the '''Left''', '''Right''' and '''Middle''' mouse Button
+
== Extended ==
* Extra Mouse Buttons (Button 4 and 5) work only on Windows
 
  
== <div id="ClickType"></div> The Click Type ==
+
All left-clicks on the gutter act when you release the mouse button. This mode allows the mouse to select text while being over the gutter.
  
There are individual settings for '''Single''', '''Double''', '''Triple''' or '''Quad''' clicks.
+
* Mouse pressed down and moved (either to other line, or into the text area), will make a selection. No action will be taken on when the mouse is released
 +
* Mouse pressed and released without moving it, will execute the normal gutter click action (breakpoint/fold)
  
Please make sure you read the section on [[#Double to Quad Clicks|Double to Quad Clicks]]
+
== Extended, right only (only in Lazarus 1.5) ==
  
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.  
+
The Gutter-parts close to the text (line-numbers, change-indicator, and fold) act as describe in extended. The others act as described in standard.
*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''')
 
  
Notes:
+
== Use line numbers to select lines (only in Lazarus 1.5) ==
* Not all of them are supported on all platforms
 
* On Windows '''Triple''' and '''Quad''' only work for the left button.
 
  
== <div id="ClickDir"></div> The Click Direction ==
+
Independent of the above setting. the gutter part showing the line numbers will always select the current line (mouse down), and additional full lines on mouse move.
  
A mouse click consists of a mouse-'''down''' and a mouse-'''up'''.
+
This selects in line-mode and can not be used to select part of a line by moving the mouse over the text area. To be able to start a normal selection (select any part of the line), use the "extended" setting above.
  
Actions can be configured to happen on either of those 2 events.
+
= Text-area =
  
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.
+
== Right mouse includes caret move ==
  
Notes:
+
Right mouse always triggers the context Menu. Setting the caret to the click location is optional.
* Some events require the correct Click Direction to work properly:
 
** Context-Menu: On some WidgetSets this will only work reliable on mouse-'''up''' events
 
** 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)
 
* Selecting and Dragging (only if actually done by moving the mouse) capture the mouse-up event and prevent any other Action on the up event.<br>This can be used to select/drag if mouse is moved, otherwise fall back to an action configured on mouse up
 
  
== <div id="ModKeys"></div> The Modifier Keys ==
+
== Drag Selection ==
  
Mouse behaviour can be modified by holding the '''Shift''', '''Alt''' or '''Ctrl''' key (or combinations of them)
+
You can use the left mouse button to drag an existing selection to a new location in the text. Hold ctrl while dragging to make a copy.
  
At the time of the click-'''down''' or '''up''' the state of all three keys is checked. An action can be defined to:
+
== Options no longer present (moved) in Lazarus 1.0 ==
* 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
+
=== Alt-Key set column mode ===
;Bad / Ambiguous:
 
* Left, Single, down Click with: Shift required pressed; Alt and Ctrl ignored
 
* Left, Single, down Click with: Ctrl required pressed; Alt and Shift ignored
 
: Now if you do this click, with both of Shift and Ctrl pressed, it would be unclear which of the 2 settings to use
 
;Correct:
 
* Left, Single, down Click with: Shift required pressed; Ctrl required un-pressed; Alt ignored
 
* Left, Single, down Click with: Ctrl required pressed; Shift required un-pressed; Alt ignored
 
If you 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: Ctrl required pressed; Shift required pressed; Alt ignored
 
  
 +
Use the entry <b>Select text (Columns)</b> from the drop down (for alt-button)
  
;Default Fallback:
+
If you use the left mouse button, then the dropdown for shift-alt-button will offer <b>Continue Select text (Columns) (Bound to Alt)</b>
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.
 
  
;Note:
+
=== Double click selects line ===
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.<br>
 
e.g. Dragging uses "ctrl" to copy the dragged text instead of moving it. However the use of "ctrl" 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.<br>
 
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.
 
  
== <div id="Priority"></div> The Priority ==
+
Use the drop downs in the "Left2" page
  
It is possible to configure several equal (or overlapping / ambiguous) Clicks in the same Context. The Configuration with the highest Priority (lowest number (0 = top)) wins.
+
== Actions  for each mouse button ==
  
This can be used for 2 purposes:
+
[[File:IDE_Options_mouse_choose_button.png]]
  
;Resolve Ambiguity:
+
The dialog provides a setup page for each mouse button.
# Left, Single, down Click, '''priority''' '''0''' with: Shift, Ctrl required pressed; Alt ignored
+
;Left, Left2: The main button of a mouse.
# Left, Single, down Click, '''priority''' '''1''' with: Shift required pressed; Ctrl, Alt ignored
+
;Right: The 2nd button of a mouse. (also known as context menu button)
Normally those two would conflict, because if you click with shift and ctrl then both will match. However due to the priority this can be resolved:
+
;Middle: Usually triggered by pressing (instead of turning) the wheel
* Only Shift pressed: Only Config 2 (priority 1) does match. Config 2 is taken.
+
;Extra1, Extra2: Only for 5 button mouses
* Shift and Ctrl pressed: Both Config do match. Config 1 has higher priority (0), Config 1 is taken
+
;Wheel: Actions for turning the wheel
  
 +
Each page provides a list of actions for the indicated mouse button, with or without modifier keys.
 +
* The left-button without any modifier is fixed as "select text" and can not be modified.
 +
* Double and triple click is only supported for the left button (page "Left2").
  
;<div id="Fallthrough"></div>Define Actions for Command Fall-through:
+
The modifier Keys must be an exact match. If "Ctrl-Button" is configured, then other combinations like ctrl-alt-button or ctrl-shift-button will not trigger this configuration.  
Sometimes a Command can not be executed at the given location. If the Command notices this, it will pass the Click on. The [[#fallthrough|Fall-Through]] first looks for further Commands in the same Context, but with lower priority. If none are found it will search parent context too.
+
* However there is an exception, if <b>all</b> combinations containing alt for this button are set to "Nothing/Default" then ctrl-alt-button will be treated as ctrl-button.
* Not all Commands/Actions support Fall-through
+
* If all combinations of ctrl, alt and shift are set to "Nothing/Default" then they modifier keys will be ignored for this button, and the button always triggers the action set on the no-modifier-key dropdown.
* "Default Fallback" (modifier Keys) will act like any other entry in the Priority. If A click is matched by a "specific configuration" at priority 2 (low) and a "default fallback" at priority 1 (higher), then it will first be given to the "default fallback", and only if this supports and trigger Fall-through the event may go to the "specific config"
+
* On some OS certain combinations of modifier key with specific buttons, may be handled by the OS, and are not available.
* See Useful Examples: [[#Extend "Source Links" to jump Begin/End-pairs|Extend "Source Links" to jump Begin/End-pairs]]
 
  
= <div id="ActionHelp"></div>The Action / Behaviour =
 
  
Each mouse button event as defined above, can trigger some action. The same action can be assigned to more than one event. (IF 2 events have the same behaviour, then there modifier keys are not checked for ambiguity)
+
;Nothing/Default: No action, or action without modifier key
 +
;Select text: Selects text. An existing selection will be lost.
 +
;Select text (Columns): Selects text in column mode. An existing selection will be lost.
 +
;Select text (Lines): Selects text, full lines only. An existing selection will be lost.
 +
;Select current Word: Selects one word.
 +
;Select current Line (Text): Selects one line, without leading/trailing spaces.
 +
;Select current Line (Full): Selects one line, with leading/trailing spaces
 +
;Select current Paragraph: Selects one paragraph. Bound by empty lines.
 +
;Paste: Inserts the current selection. If there is no selection, then it depends on the OS, may insert (secondary) clipboard, or do nothing.
 +
;Jumps to implementation: Navigates pascal source via codetools. (Find implementation of identifier)
 +
;Jumps to implementation/other block end: Navigates pascal source... Also jumps between matching begin/end pairs
 +
;Add history point: Add your own History point (normally done by implementation jumps.
 +
;History back: Navigate to previous source location.
 +
;History forward: If you navigated back in history, go forward again.
 +
;Set free bookmark: Sets an available bookmark
 +
;Reset zoom: See mouse wheel, sets editor font size to default
 +
;Context Menu: normal editor context menu.
 +
;Context Menu (debug): debug section from editor context menu.
 +
;Context Menu (tab): Context menu for editor tabs (trigger anywhere in the editor area)
  
;Move Caret checkbox: With each action you can define, if you whish the caret to be moved. However this only additionally enforces the caret move. If an action implicitly moves the caret, then this will happen, even if you uncheck the this box. (e.g. Selecting a block always moves the caret)
+
The following are only available for the shift-left-button with or without alt or ctrl. If the left button (with or without alt or ctrl) is set to "select text" (or "select text (Columns/Line)") then one extra entry is listed as first entry in the dropdown. The entry allows to continue (extend) an existing selection. The entry will be one of the following:
 +
;Continue Select text:
 +
;Continue Select text (Columns/Line):
 +
;Continue Select text (...) (Bound to Alt,Ctrl Button): Continue/Extend an existing selection, using the same selection mode as the button without shift
  
;Command options: Some commands take additional params to refine there behaviour
+
=== Actions for mouse wheel ===
  
;Implicit mouse up action: Some events that occur on mouse '''down''' events implicitly assign a mouse '''up''' action for the current click. <br> An implicit Mouse-Up event may or may not cancel the action/behaviour normally assigned  to the mouse up. <br> E.g. dragging implicitly drops (inserts) the text when the button is released, it cancel whatever action may have been assigned to the mouse up event.
+
The wheel can be set to scroll, at different speeds, or change the editor font size (zoom)
  
<div id='fallthrough'></div>
+
Normal scroll is vertical,but automatically changes to horizontal, if the editor has no horizontal scroll bar (to few line).
;Fall-Through:
+
Horizontal can be enforced.
Some Commands can not always be executed. For Example "Source Link Command" can only be executed, if above a link-able identifier. In cases where a command can not be executed, it may trigger a Fall-Through. This means the Click will behave as if the configuration had not existed, and consequently a lower priority followed by the parent context will be searched.
 
<br>Note: Not all commands support this, even if they are not executed.
 
  
== No Action Command ==
+
=== More about: Jumps to implementation/other block end ===
  
There are 2 uses for this:
+
by default, if you click on any identifier such as a function, variable or type name the IDE will jump to the declaration of this identifier (even into another unit).
;Move Caret: With "Move Caret" it will set the caret to the mouse location. This will unset an existing selection. It also prevents a new selection from being marked by moving the mouse. <br> If it occurs on '''down''' then the caret will be set to the location the mouse was pressed, never mind where you release the button
 
;Prevent fallback to parent node: In Context-Subnodes this can prevent a click from executing the parent node(s) action. <br> E.g. this is assigned to the FoldTree. It catches clicks that are neither on a [+] or [-] node. Otherwise they fall through to the normal Gutter and toggle a breakpoint.
 
  
 +
This is the same feature that is available as key-shortcut (usually {{keypress|Alt|Up}}). See "Key Mapping" / "Codetools" / "Find declaration"
  
;Fall-Through: Never
+
"other block end" means that if you are not over an identifier, but instead over a "begin", "end" or matching brackets or similar then the jump will go to the matching word/bracket. On the Keyboard this is {{keypress|Ctrl|Q|K}}. See also: "Key Mapping" / "Codetools" / "Find block other end")
  
== Selection Commands ==
+
= Advanced Options =
  
=== Block Selection Commands ===
+
For advanced options please see here: [[IDE_Window:_EditorMouseOptionsAdvanced|Advanced Mouse Options]]
 
 
There are 3 Selection commands, for the 3 selection modes supported by SynEdit: '''Normal''', '''Column''' or '''Full-Lines'''.
 
 
 
Note: All of them move the caret implicitly.
 
 
 
Each of those can be configured in 2 different ''Modes'':
 
;Begin: Starts a new selection . If an old selection exists, it will be disregarded. The new Selections starts at the current mouse location.
 
;Continue: If an old selection exists, then it will be extend.<br>If there was no selection, then a new selection is created, which will start at the position the caret had before the event occurred, and range to the click position.
 
 
 
Those events should be assigned to mouse '''down''' events, in which case the selection will resize with any following mouse-movement until the mouse button is released. ('''Implicit mouse up action''')
 
 
 
"Begin-Mode" on mouse '''up''' does nothing, but setting the caret. (Except currently for line mode, which selects the line).<br>
 
"Continue-Mode" on mouse '''up''' will extend the selection
 
 
 
 
 
;Fall-Through: Never
 
 
 
=== Item Selection Commands ===
 
 
 
Allow to select the Word, Line or Paragraph at the mouse position.
 
Once selected the selection will not extend, if the mouse moves.
 
 
 
"Line" supports 2 modes, either including leading/trailing spaces of the line or not.
 
 
 
Note: All of them move the caret implicitly.
 
 
 
 
 
;Fall-Through: Never
 
  
=== Drag Selection Command ===
+
Once you have made changes in the advanced settings, this page will show a warning that it does not represent your settings any more.
  
Drags (Copies or moves) the current selection to a new position, following mouse movement. It will be pasted there if the button is released. ('''Implicit mouse up action''')
+
In this case it also will no longer just follow the changes you make. Instead it will display a button which you must use to override the settings you made in the advanced page. A warning will be shown, if you have unsaved changes.
 
 
Independent of the modifier keys pressed at the time of the event occurring (or the configured mod, keys), it will check for the '''ctrl''' key at the time the dragged text is inserted. If Ctrl is pressed the text will be copied, otherwise moved.
 
 
 
Note: moves the caret implicitly.
 
 
 
 
 
;Fall-Through: If no text is selected. Or if the selection can not be dragged (Column or Line mode selection)
 
 
 
=== Quick copy Selection Command ===
 
 
 
Inserts a copy of the currently selected text at the mouse location. If no text is selected, inserts the content of the clipboard.
 
 
 
Note: moves the caret implicitly.
 
 
 
 
 
;Fall-Through: If no text is selected and the clipboard is empty
 
 
 
== Context Popup Menu ==
 
 
 
Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
 
 
 
 
 
;Fall-Through: Never
 
 
 
== Fold Commands ==
 
 
 
Fold commands are commonly assigned to the fold-tree-nodes, but can also be assigned to other context, like the text area.
 
 
 
The fold-tree has 3 context-nodes
 
;Fold Tree: Any area of the fold-tree, this can be [+], [-], |, or empty
 
:;Collapsed: The [+] only. This means the line has at least one collapsed section. It may have a mix of collapsed/expanded sections
 
:;Expanded: The [-] only. This means the line has at at only expanded sections (at least one)
 
 
 
Note, that if you configure a specific click (e.g. shift-left-down) for either [+] or [-] or both, then most likely you should add the same click with "no action" (or other default) to the parent "Fold Tree" node. Otherwise such a click if not on the [+]/[-] node will fall through to the gutter, and may trigger an action there.
 
 
 
=== Fold Commands ===
 
 
 
By default only acts on nodes starting on the line at the mouse location.
 
 
 
The following modes are available:
 
;One: Folds the "most inner" unfolded node starting on this line. This is the node that starts at the right most place in the line. Any node already folded is ignored, so if any unfolded node exists, one and exactly one node will be folded.<br>This is not necessarily the shortest fold-node (in amount of lines folded), as $region and begin folds can overlap.
 
;All: Folds all Nodes that start on this line
 
;At Caret: This only works if configured for the "Text" context. It folds the node which starts under the current mouse location. This allows you to click on a "begin" (or other keyword) to fold it. (Useful if more than one node starts at the line).
 
;Current: Folds the most inner node containing the current mouse location (the gutter is treated as "at the start of line"). It will search for the first fold-starting keyword (e.g "begin") in front of the current mouse location, whic has a block enclosing the mouse location (end is past mouse location). This may be above the current line.<br> If assigned to the gutter (or fold tree) this is always above the current line, unless the line starts with a keyword (no spaces before)
 
 
 
 
 
;Fall-Through:  (subject to change) Only in "At Caret" mode, if no fold starts under the mouse location
 
 
 
=== Unfold Commands ===
 
 
 
Only acts on nodes starting on the line at the mouse location.
 
 
 
The following modes are available:
 
;One: Folds the "most outer" folded node starting on this line. This is the node that starts at the left most place in the line.
 
;All: Unfolds all nodes that start at the current line
 
 
 
;Fall-Through: Never (subject to change)
 
 
 
=== Fold Popup Menu ===
 
 
 
Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
 
 
 
A pop up menu allowing you to see and change folds enclosing the current line
 
 
 
 
 
;Fall-Through: Never
 
 
 
== Source Link Command ==
 
 
 
Trigger jump to implementation.
 
 
 
The "underline" argument controls, if the curremt link under the mouse is highlighted (by an underline) while the modifier keys are pressed.
 
 
 
If you assign this command to a click with no modifier keys needed, you would get constant highlights (because the expected modifiers (none) are pressed). In this case you cn switch it off.
 
 
 
 
 
;Fall-Through: If no linkable identifier is below the mouse
 
 
 
== Breakpoint Command ==
 
 
 
Toggle breakpoint on this line
 
 
 
 
 
;Fall-Through: Never
 
 
 
== IDE-Command ==
 
 
 
Select from the same commands that are available via the Keyboard Config.
 
 
 
If the chosen Command depends on the current caret location, then it is recommended to tick "Move Caret".
 
 
 
 
 
;Fall-Through: Never
 
 
 
 
 
 
 
= The "Other Actions using the same button" Table =
 
 
 
This table can help you identifying other clicks, that may be executed together with the current click. It lists potential other clicks. The listed clicks are <b>not</b> necessarily executed together.
 
 
 
The list includes clicks from the parent(s) contexts, but not any child contexts.
 
 
 
The clicks are usually searched in the order indicated in the first column. You need to check:
 
* Clicks in the other direction (up/down)
 
* if the Modifier Keys match or could match
 
* A click could [[#Fallthrough|fall through]]
 
* A click with lesser count (single, double, ...) exists
 
 
 
Usually there are up to two Actions executed. The first matching one from the up and one the first matching one from the down clicks part of the list. Further Actions can happen due to [[#Fallthrough|fall through]].
 
 
 
So if your item (highlighted) is not first in the list, or there are actions in the other click-dir (up/down) check carefully, if this matches your intention.
 
 
 
= Current Limitations =
 
 
 
* On Windows '''Triple''' and '''Quad''' only work for the left button.
 
* Extra Mouse Buttons (Button 4 and 5) work only on Windows
 
* GTK2: PopUp-Menu is recommended for use with Button-Up only
 
* OS-Depended: Some clicks may be used by the Window-Manager, and not reach the IDE at all
 
 
 
= Pitfalls =
 
 
 
== Mixing Down and Up Clicks ==
 
 
 
A mouse-down action does <b>not</b> prevent the mouse up action. This may lead to unexpected additional actions being executed<br>Consequential a click-up may be preceeded by unexpected click-down actions.
 
* The mouse-up / mouse-down can be in a parent [[#The Context Tree|context node]]
 
* To avoid search in parent nodes, define a "no action" event in the current node
 
 
 
== Double to Quad Clicks ==
 
 
 
* On Windows '''Triple''' and '''Quad''' only work for the left button.
 
 
 
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)
 
* The single click can be in a parent [[#The Context Tree|context node]]
 
 
 
 
 
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
 
 
 
= Advanced Options =
 
 
 
For advanced options please see here: [[IDE_Window:_EditorMouseOptionsAdvanced|Advanced Mouse Options]]
 

Revision as of 13:50, 2 July 2015

Deutsch (de) English (en)


This is part of the online help for the IDE.
It describes the section: "Editor" / "Mouse". You can open the described dialog in your IDE via:

  • The menu: "Tools" => "Options" / Editor options ...
  • The source-editor pop-up menu: "Editor properties ...

Navigation

     

General

Hide mouse when typing

If the mouse is positioned over the editor, it will be hidden while you type. Any mouse-move, click, or menu action will make it visible again.

Gutter

You can currently choose between two predefined modes for the gutter area

Standard

All left-clicks on the gutter act when you press the mouse button down.

Extended

All left-clicks on the gutter act when you release the mouse button. This mode allows the mouse to select text while being over the gutter.

  • Mouse pressed down and moved (either to other line, or into the text area), will make a selection. No action will be taken on when the mouse is released
  • Mouse pressed and released without moving it, will execute the normal gutter click action (breakpoint/fold)

Extended, right only (only in Lazarus 1.5)

The Gutter-parts close to the text (line-numbers, change-indicator, and fold) act as describe in extended. The others act as described in standard.

Use line numbers to select lines (only in Lazarus 1.5)

Independent of the above setting. the gutter part showing the line numbers will always select the current line (mouse down), and additional full lines on mouse move.

This selects in line-mode and can not be used to select part of a line by moving the mouse over the text area. To be able to start a normal selection (select any part of the line), use the "extended" setting above.

Text-area

Right mouse includes caret move

Right mouse always triggers the context Menu. Setting the caret to the click location is optional.

Drag Selection

You can use the left mouse button to drag an existing selection to a new location in the text. Hold ctrl while dragging to make a copy.

Options no longer present (moved) in Lazarus 1.0

Alt-Key set column mode

Use the entry Select text (Columns) from the drop down (for alt-button)

If you use the left mouse button, then the dropdown for shift-alt-button will offer Continue Select text (Columns) (Bound to Alt)

Double click selects line

Use the drop downs in the "Left2" page

Actions for each mouse button

IDE Options mouse choose button.png

The dialog provides a setup page for each mouse button.

Left, Left2
The main button of a mouse.
Right
The 2nd button of a mouse. (also known as context menu button)
Middle
Usually triggered by pressing (instead of turning) the wheel
Extra1, Extra2
Only for 5 button mouses
Wheel
Actions for turning the wheel

Each page provides a list of actions for the indicated mouse button, with or without modifier keys.

  • The left-button without any modifier is fixed as "select text" and can not be modified.
  • Double and triple click is only supported for the left button (page "Left2").

The modifier Keys must be an exact match. If "Ctrl-Button" is configured, then other combinations like ctrl-alt-button or ctrl-shift-button will not trigger this configuration.

  • However there is an exception, if all combinations containing alt for this button are set to "Nothing/Default" then ctrl-alt-button will be treated as ctrl-button.
  • If all combinations of ctrl, alt and shift are set to "Nothing/Default" then they modifier keys will be ignored for this button, and the button always triggers the action set on the no-modifier-key dropdown.
  • On some OS certain combinations of modifier key with specific buttons, may be handled by the OS, and are not available.


Nothing/Default
No action, or action without modifier key
Select text
Selects text. An existing selection will be lost.
Select text (Columns)
Selects text in column mode. An existing selection will be lost.
Select text (Lines)
Selects text, full lines only. An existing selection will be lost.
Select current Word
Selects one word.
Select current Line (Text)
Selects one line, without leading/trailing spaces.
Select current Line (Full)
Selects one line, with leading/trailing spaces
Select current Paragraph
Selects one paragraph. Bound by empty lines.
Paste
Inserts the current selection. If there is no selection, then it depends on the OS, may insert (secondary) clipboard, or do nothing.
Jumps to implementation
Navigates pascal source via codetools. (Find implementation of identifier)
Jumps to implementation/other block end
Navigates pascal source... Also jumps between matching begin/end pairs
Add history point
Add your own History point (normally done by implementation jumps.
History back
Navigate to previous source location.
History forward
If you navigated back in history, go forward again.
Set free bookmark
Sets an available bookmark
Reset zoom
See mouse wheel, sets editor font size to default
Context Menu
normal editor context menu.
Context Menu (debug)
debug section from editor context menu.
Context Menu (tab)
Context menu for editor tabs (trigger anywhere in the editor area)

The following are only available for the shift-left-button with or without alt or ctrl. If the left button (with or without alt or ctrl) is set to "select text" (or "select text (Columns/Line)") then one extra entry is listed as first entry in the dropdown. The entry allows to continue (extend) an existing selection. The entry will be one of the following:

Continue Select text
Continue Select text (Columns/Line)
Continue Select text (...) (Bound to Alt,Ctrl Button)
Continue/Extend an existing selection, using the same selection mode as the button without shift

Actions for mouse wheel

The wheel can be set to scroll, at different speeds, or change the editor font size (zoom)

Normal scroll is vertical,but automatically changes to horizontal, if the editor has no horizontal scroll bar (to few line). Horizontal can be enforced.

More about: Jumps to implementation/other block end

by default, if you click on any identifier such as a function, variable or type name the IDE will jump to the declaration of this identifier (even into another unit).

This is the same feature that is available as key-shortcut (usually Alt+). See "Key Mapping" / "Codetools" / "Find declaration"

"other block end" means that if you are not over an identifier, but instead over a "begin", "end" or matching brackets or similar then the jump will go to the matching word/bracket. On the Keyboard this is Ctrl+Q+K. See also: "Key Mapping" / "Codetools" / "Find block other end")

Advanced Options

For advanced options please see here: Advanced Mouse Options

Once you have made changes in the advanced settings, this page will show a warning that it does not represent your settings any more.

In this case it also will no longer just follow the changes you make. Instead it will display a button which you must use to override the settings you made in the advanced page. A warning will be shown, if you have unsaved changes.