Sign in Join
Wiki copytemporary

IDE Window: EditorMouseOptionsAdvanced: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-* This page is part of [[IDE Window: Editor Options]]
2-
3- * You can get this dialog via:
4-
5-
1+- This page is part of [[IDE Window: Editor Options]]
62
7- Menu / Environment / Editor options / Mouse
8- Source editor / popup menu / Editor properties ...
3+- You can get this dialog via:
94
105
11-
12-## Contents
6+
7+Menu / Environment / Editor options / Mouse
138
14- * 1 The Context Tree
15- * 2 The Click Configuration
16- * 2.1 The Button
17- * 2.2 The Click Type
18- * 2.3 The Click Direction
19- * 2.4 Restricting the mouse-up action
20- * 2.5 The Modifier Keys
21- * 2.6 The Priority
22- * 2.7 Opt(ion) field
23- * 3 The Action / Behaviour
24- * 3.1 No Action Command
25- * 3.2 Selection Commands
26- * 3.2.1 Block Selection Commands
27- * 3.2.2 Item Selection Commands
28- * 3.2.3 Drag Selection Command
29- * 3.2.4 Quick copy Selection Command
30- * 3.3 Context Popup Menu
31- * 3.4 Fold Commands
32- * 3.4.1 Fold Commands
33- * 3.4.2 Unfold Commands
34- * 3.4.3 Fold Popup Menu
35- * 3.5 Source Link Command
36- * 3.6 Breakpoint Command
37- * 3.7 IDE-Command
38- * 4 The "Other Actions using the same button" Table
39- * 5 Current Limitations
40- * 6 Pitfalls
41- * 6.1 Mixing Down and Up Clicks
42- * 6.2 Double to Quad Clicks
43- * 7 Useful Examples
44- * 7.1 Mouse "Move" versus "Click" on Gutter to select Lines / toggle action
45- * 7.2 Line Numbers in Gutter to select Lines
46- * 7.3 Fold by clicking on Keyword ("begin")
47- * 7.4 Fold current block by clicking on vertical fold line
48- * 7.5 Extend "Source Links" to jump Begin/End-pairs
49- * 7.6 Change History Jumps for 3 button Mouse (follow back the "Source Link" trail)
50- * 7.6.1 With a 3 Button Mouse
51- * 7.7 Move to procedure body
9+Source editor / popup menu / Editor properties ...
5210
5311# The Context Tree
5412
55-The context tree is the Treeview just left to the Overview Grid. It currently has the entries:
13+The context tree is the Treeview just left to the Overview Grid. It currently has the entries:
5614
57- * **Text**
58- * **Selection**
59- * **Gutter**
60- * **Fold** **Tree**
61- * **Collapsed** **[+]**
62- * **Expanded** **[-]**
63- * **Line** **Numbers**
15+- **Text**
16+ - **Selection**
17+- **Gutter**
18+ - **Fold** **Tree**
19+ - **Collapsed** **\[+\]**
20+ - **Expanded** **\[-\]**
21+ - **Line** **Numbers**
6422
65-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.
23+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.
6624
67-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)
25+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)
6826
69-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.
27+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.
7028
71-See also The Priority and Fall-Through in the The Action / Behaviour section.
29+See also The Priority and Fall-Through in the The Action / Behaviour section.
7230
7331# The Click Configuration
7432
75-When you click a mouse button, the following items are checked to find the desired behaviour/action.
33+When you click a mouse button, the following items are checked to find the desired behaviour/action.
7634
7735## The Button
7836
79-There are individual settings for the **Left** , **Right** and **Middle** mouse Button
37+There are individual settings for the **Left**, **Right** and **Middle** mouse Button
8038
81- * Extra Mouse Buttons (Button 4 and 5) work only on Windows
39+- Extra Mouse Buttons (Button 4 and 5) work only on Windows
8240
83-##
41+==
8442
85-The Click Type
43+The Click Type ==
8644
87-There are individual settings for **Single** , **Double** , **Triple** or **Quad** clicks.
45+There are individual settings for **Single**, **Double**, **Triple** or **Quad** clicks.
8846
8947Please make sure you read the section on Double to Quad Clicks
9048
91-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.
49+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.
9250
93- * Example:
51+- Example:
9452
95- 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.
96- 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**)
53+
54+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.
9755
98-Notes:
56+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**)
9957
100- * Not all of them are supported on all platforms
101- * On Windows **Triple** and **Quad** only work for the left button.
58+Notes:
10259
103-##
60+- Not all of them are supported on all platforms
61+- On Windows **Triple** and **Quad** only work for the left button.
10462
105-The Click Direction
63+==
10664
107-A mouse click consists of a mouse-**down** and a mouse-**up**.
65+The Click Direction ==
10866
109-Actions can be configured to happen on either of those 2 events.
67+A mouse click consists of a mouse-**down** and a mouse-**up**.
11068
111-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.
69+Actions can be configured to happen on either of those 2 events.
11270
113-Notes:
71+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.
11472
115- * Some events require the correct Click Direction to work properly:
116- * Context-Menu: On some WidgetSets this will only work reliable on mouse-**up** events
117- * 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)
118- * 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.
119-This can be used to select/drag if mouse is moved, otherwise fall back to an action configured on mouse up
73+Notes:
12074
121-##
75+- Some events require the correct Click Direction to work properly:
76+ - Context-Menu: On some WidgetSets this will only work reliable on mouse-**up** events
77+ - 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)
78+- 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.\
79+ This can be used to select/drag if mouse is moved, otherwise fall back to an action configured on mouse up
12280
123-Restricting the mouse-up action
81+==
12482
125-If an action is set to mouse-up, then it can be restricted to execute only, if the down click was on the same area.
83+Restricting the mouse-up action ==
12684
127-The following test can be performed:
85+If an action is set to mouse-up, then it can be restricted to execute only, if the down click was on the same area.
12886
129- * Match action pos of mouse down:
87+The following test can be performed:
13088
131- This does check if a click at the mouse-down location would trigger the same action.
132- In cases like fold, where the [+] on different lines all return the fold-action, yet should be treated as different, this needs to be combined with the "action line". For a click on the current selection of text on the other hand, all lines might be treated the same.
89+- Match action pos of mouse down:
13390
134- * Match action line of mouse down:
91+
92+This does check if a click at the mouse-down location would trigger the same action.
13593
136- The down click occurred on the same line of text
94+In cases like fold, where the \[+\] on different lines all return the fold-action, yet should be treated as different, this needs to be combined with the "action line". For a click on the current selection of text on the other hand, all lines might be treated the same.
13795
138- * Match action button of mouse down:
96+- Match action line of mouse down:
13997
140- The down last click was the same button (no other button has been pressed in the meantime)
98+
99+The down click occurred on the same line of text
141100
142- * Match action modifiers of mouse down:
101+- Match action button of mouse down:
143102
144- The down click was done using the same modifier keys
103+
104+The down last click was the same button (no other button has been pressed in the meantime)
145105
146- * Search all action of mouse down:
106+- Match action modifiers of mouse down:
147107
148- If the click is on an element that overrides the actions for the below "context" #The_Context_Tree, check if the action would have been on any of the outer contexts.
108+
109+The down click was done using the same modifier keys
149110
150- * Continue with next mouse up action:
111+- Search all action of mouse down:
151112
152- If the up click is not executed, search default actions and outer context for an alternative action to be executed. The default if this is not given, is to perform no action for this mouse-up.
113+
114+If the click is on an element that overrides the actions for the below "context" #The_Context_Tree, check if the action would have been on any of the outer contexts.
153115
154-##
116+- Continue with next mouse up action:
155117
156-The Modifier Keys
118+
119+If the up click is not executed, search default actions and outer context for an alternative action to be executed. The default if this is not given, is to perform no action for this mouse-up.
157120
158-Mouse behaviour can be modified by holding the **Shift** , **Alt** or **Ctrl** key (or combinations of them)
121+==
159122
160-At the time of the click-**down** or **up** the state of all three keys is checked. An action can be defined to:
123+The Modifier Keys ==
161124
162- * require one, some or all of the modifier keys pressed (Checkbox ticked)
163- * require one, some or all of the modifier keys *not* pressed (Checkbox not ticked)
164- * ignore the state of one, some or all of the modifier keys (Checkbox greyed)
125+Mouse behaviour can be modified by holding the **Shift**, **Alt** or **Ctrl** key (or combinations of them)
165126
166-For a given combination of Button, Click-Type, Click-Direction there must not be any ambiguity for the modifier keys. Example
127+At the time of the click-**down** or **up** the state of all three keys is checked. An action can be defined to:
167128
168-Bad / Ambiguous
169-
129+- require one, some or all of the modifier keys pressed (Checkbox ticked)
130+- require one, some or all of the modifier keys *not* pressed (Checkbox not ticked)
131+- ignore the state of one, some or all of the modifier keys (Checkbox greyed)
170132
171- * Left, Single, down Click with: Shift required pressed; Alt and Ctrl ignored
172- * Left, Single, down Click with: Ctrl required pressed; Alt and Shift ignored
133+For a given combination of Button, Click-Type, Click-Direction there must not be any ambiguity for the modifier keys. Example
173134
174- Now if you do this click, with both of Shift and Ctrl pressed, it would be unclear which of the 2 settings to use
175-Correct
176-
135+Bad / Ambiguous
177136
178- * Left, Single, down Click with: Shift required pressed; Ctrl required un-pressed; Alt ignored
179- * Left, Single, down Click with: Ctrl required pressed; Shift required un-pressed; Alt ignored
137+- Left, Single, down Click with: Shift required pressed; Alt and Ctrl ignored
138+- Left, Single, down Click with: Ctrl required pressed; Alt and Shift ignored
180139
181-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:
140+
141+Now if you do this click, with both of Shift and Ctrl pressed, it would be unclear which of the 2 settings to use
182142
183- * Left, Single, down Click with: Ctrl required pressed; Shift required pressed; Alt ignored
143+Correct
184144
185-
145+- Left, Single, down Click with: Shift required pressed; Ctrl required un-pressed; Alt ignored
146+- Left, Single, down Click with: Ctrl required pressed; Shift required un-pressed; Alt ignored
186147
187-Default Fallback
188-
148+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:
189149
190-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.
150+- Left, Single, down Click with: Ctrl required pressed; Shift required pressed; Alt ignored
191151
192-Note
193-
152+Default Fallback
194153
195-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.
196-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.
197-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.
154+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.
198155
199-##
156+Note
200157
201-The Priority
158+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.\
159+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.\
160+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.
202161
203-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.
162+==
204163
205-This can be used for 2 purposes:
164+The Priority ==
206165
207-Resolve Ambiguity
208-
166+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.
209167
210- 1. Left, Single, down Click, **priority** **0** with: Shift, Ctrl required pressed; Alt ignored
211- 2. Left, Single, down Click, **priority** **1** with: Shift required pressed; Ctrl, Alt ignored
168+This can be used for 2 purposes:
212169
213-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:
170+Resolve Ambiguity
214171
215- * Only Shift pressed: Only Config 2 (priority 1) does match. Config 2 is taken.
216- * Shift and Ctrl pressed: Both Config do match. Config 1 has higher priority (0), Config 1 is taken
172+1. Left, Single, down Click, **priority** **0** with: Shift, Ctrl required pressed; Alt ignored
173+2. Left, Single, down Click, **priority** **1** with: Shift required pressed; Ctrl, Alt ignored
217174
218-
175+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:
219176
220-Define Actions for Command Fall-through
221-
177+- Only Shift pressed: Only Config 2 (priority 1) does match. Config 2 is taken.
178+- Shift and Ctrl pressed: Both Config do match. Config 1 has higher priority (0), Config 1 is taken
222179
223-Sometimes a Command can not be executed at the given location. If the Command notices this, it will pass the Click on. The 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.
180+;
224181
225- * Not all Commands/Actions support Fall-through
226- * "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"
227- * See Useful Examples: Extend "Source Links" to jump Begin/End-pairs
182+Define Actions for Command Fall-through: Sometimes a Command can not be executed at the given location. If the Command notices this, it will pass the Click on. The 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.
228183
229-##
184+- Not all Commands/Actions support Fall-through
185+- "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"
186+- See Useful Examples: Extend "Source Links" to jump Begin/End-pairs
230187
231-Opt(ion) field
188+==
232189
233-This numeric option applies to certain settings only:
190+Opt(ion) field ==
234191
235-Wheel scroll:
192+This numeric option applies to certain settings only:
236193
237- * speed lines => amount of lines
238- * other speed => percent
194+Wheel scroll:
239195
240-and possibly a few others.
196+- speed lines =\> amount of lines
197+- other speed =\> percent
241198
242-#
199+and possibly a few others.
243200
244-The Action / Behaviour
201+=
245202
246-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)
203+The Action / Behaviour =
247204
248-Move Caret checkbox
249- 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)
205+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)
250206
251-Command options
252- Some commands take additional params to refine there behaviour
207+Move Caret checkbox
208+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)
253209
254-Implicit mouse up action
255- Some events that occur on mouse **down** events implicitly assign a mouse **up** action for the current click.
256-An implicit Mouse-Up event may or may not cancel the action/behaviour normally assigned to the mouse up.
210+Command options
211+Some commands take additional params to refine there behaviour
212+
213+Implicit mouse up action
214+Some events that occur on mouse **down** events implicitly assign a mouse **up** action for the current click.\
215+An implicit Mouse-Up event may or may not cancel the action/behaviour normally assigned to the mouse up.\
257216E.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.
258217
259-Fall-Through
260-
218+Fall-Through
261219
262-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.
263-Note: Not all commands support this, even if they are not executed.
220+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.\
221+Note: Not all commands support this, even if they are not executed.
264222
265223## No Action Command
266224
267-There are 2 uses for this:
225+There are 2 uses for this:
268226
269-Move Caret
270- 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.
227+Move Caret
228+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.\
271229If it occurs on **down** then the caret will be set to the location the mouse was pressed, never mind where you release the button
272-Prevent fallback to parent node
273- In Context-Subnodes this can prevent a click from executing the parent node(s) action.
274-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.
275230
276-
231+Prevent fallback to parent node
232+In Context-Subnodes this can prevent a click from executing the parent node(s) action.\
233+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.
277234
278-Fall-Through
279- Never
235+Fall-Through
236+Never
280237
281238## Selection Commands
282239
283240### Block Selection Commands
284241
285-There are 3 Selection commands, for the 3 selection modes supported by SynEdit: **Normal** , **Column** or **Full-Lines**.
242+There are 3 Selection commands, for the 3 selection modes supported by SynEdit: **Normal**, **Column** or **Full-Lines**.
286243
287-Note: All of them move the caret implicitly.
244+Note: All of them move the caret implicitly.
288245
289-Each of those can be configured in 2 different _Modes_ :
246+Each of those can be configured in 2 different *Modes*:
290247
291-Begin
292- Starts a new selection . If an old selection exists, it will be disregarded. The new Selections starts at the current mouse location.
293-Continue
294- If an old selection exists, then it will be extend.
295-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.
248+Begin
249+Starts a new selection . If an old selection exists, it will be disregarded. The new Selections starts at the current mouse location.
296250
297-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**)
251+Continue
252+If an old selection exists, then it will be extend.\
253+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.
298254
299-"Begin-Mode" on mouse **up** does nothing, but setting the caret. (Except currently for line mode, which selects the line).
300-"Continue-Mode" on mouse **up** will extend the selection
255+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**)
301256
302-
257+"Begin-Mode" on mouse **up** does nothing, but setting the caret. (Except currently for line mode, which selects the line).\
258+"Continue-Mode" on mouse **up** will extend the selection
303259
304-Fall-Through
305- Never
260+Fall-Through
261+Never
306262
307263### Item Selection Commands
308264
309-Allow to select the Word, Line or Paragraph at the mouse position. Once selected the selection will not extend, if the mouse moves.
310-
311-"Line" supports 2 modes, either including leading/trailing spaces of the line or not.
265+Allow to select the Word, Line or Paragraph at the mouse position. Once selected the selection will not extend, if the mouse moves.
312266
313-Note: All of them move the caret implicitly.
267+"Line" supports 2 modes, either including leading/trailing spaces of the line or not.
314268
315-
269+Note: All of them move the caret implicitly.
316270
317-Fall-Through
318- Never
271+Fall-Through
272+Never
319273
320274### Drag Selection Command
321275
322-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**)
323-
324-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.
276+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**)
325277
326-Note: moves the caret implicitly.
278+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.
327279
328-
280+Note: moves the caret implicitly.
329281
330-Fall-Through
331- If no text is selected. Or if the selection can not be dragged (Column or Line mode selection)
282+Fall-Through
283+If no text is selected. Or if the selection can not be dragged (Column or Line mode selection)
332284
333285### Quick copy Selection Command
334286
335-Inserts a copy of the currently selected text at the mouse location. If no text is selected, inserts the content of the clipboard.
336-
337-Note: moves the caret implicitly.
287+Inserts a copy of the currently selected text at the mouse location. If no text is selected, inserts the content of the clipboard.
338288
339-
289+Note: moves the caret implicitly.
340290
341-Fall-Through
342- If no text is selected and the clipboard is empty
291+Fall-Through
292+If no text is selected and the clipboard is empty
343293
344294## Context Popup Menu
345295
346-Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
347-
348-
296+Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
349297
350-Fall-Through
351- Never
298+Fall-Through
299+Never
352300
353301## Fold Commands
354302
355-Fold commands are commonly assigned to the fold-tree-nodes, but can also be assigned to other context, like the text area.
303+Fold commands are commonly assigned to the fold-tree-nodes, but can also be assigned to other context, like the text area.
356304
357-The fold-tree has 3 context-nodes
305+The fold-tree has 3 context-nodes
358306
359-Fold Tree
360- Any area of the fold-tree, this can be [+], [-], |, or empty
307+Fold Tree
308+Any area of the fold-tree, this can be \[+\], \[-\], \|, or empty
361309
362-Collapsed
363- The [+] only. This means the line has at least one collapsed section. It may have a mix of collapsed/expanded sections
364-Expanded
365- The [-] only. This means the line has at at only expanded sections (at least one)
310+Collapsed
311+The \[+\] only. This means the line has at least one collapsed section. It may have a mix of collapsed/expanded sections
366312
367-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.
313+Expanded
314+The \[-\] only. This means the line has at at only expanded sections (at least one)
368315
316+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.
317+
369318### Fold Commands
370319
371-By default only acts on nodes starting on the line at the mouse location.
320+By default only acts on nodes starting on the line at the mouse location.
372321
373-The following modes are available:
322+The following modes are available:
374323
375-One
376- 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.
377-This is not necessarily the shortest fold-node (in amount of lines folded), as $region and begin folds can overlap.
378-All
379- Folds all Nodes that start on this line
380-At Caret
381- 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).
382-Current
383- 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.
384-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)
324+One
325+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.\
326+This is not necessarily the shortest fold-node (in amount of lines folded), as \$region and begin folds can overlap.
385327
386-
328+All
329+Folds all Nodes that start on this line
387330
388-Fall-Through
389- (subject to change) Only in "At Caret" mode, if no fold starts under the mouse location
331+At Caret
332+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).
390333
334+Current
335+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.\
336+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)
337+
338+Fall-Through
339+(subject to change) Only in "At Caret" mode, if no fold starts under the mouse location
340+
391341### Unfold Commands
392342
393-Only acts on nodes starting on the line at the mouse location.
343+Only acts on nodes starting on the line at the mouse location.
394344
395-The following modes are available:
345+The following modes are available:
396346
397-One
398- Folds the "most outer" folded node starting on this line. This is the node that starts at the left most place in the line.
399-All
400- Unfolds all nodes that start at the current line
347+One
348+Folds the "most outer" folded node starting on this line. This is the node that starts at the left most place in the line.
401349
402-Fall-Through
403- Never (subject to change)
350+All
351+Unfolds all nodes that start at the current line
404352
405-### Fold Popup Menu
353+Fall-Through
354+Never (subject to change)
406355
407-Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
356+### Fold Popup Menu
408357
409-A pop up menu allowing you to see and change folds enclosing the current line
358+Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
410359
411-
360+A pop up menu allowing you to see and change folds enclosing the current line
412361
413-Fall-Through
414- Never
362+Fall-Through
363+Never
415364
416365## Source Link Command
417366
418-Trigger jump to implementation.
419-
420-The "underline" argument controls, if the curremt link under the mouse is highlighted (by an underline) while the modifier keys are pressed.
367+Trigger jump to implementation.
421368
422-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.
369+The "underline" argument controls, if the curremt link under the mouse is highlighted (by an underline) while the modifier keys are pressed.
423370
424-
371+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.
425372
426-Fall-Through
427- If no linkable identifier is below the mouse
373+Fall-Through
374+If no linkable identifier is below the mouse
428375
429376## Breakpoint Command
430377
431-Toggle breakpoint on this line
432-
433-
378+Toggle breakpoint on this line
434379
435-Fall-Through
436- Never
380+Fall-Through
381+Never
437382
438383## IDE-Command
439384
440-Select from the same commands that are available via the Keyboard Config.
441-
442-If the chosen Command depends on the current caret location, then it is recommended to tick "Move Caret".
443-
444-
385+Select from the same commands that are available via the Keyboard Config.
445386
446-Fall-Through
447- Never
387+If the chosen Command depends on the current caret location, then it is recommended to tick "Move Caret".
448388
449-
389+Fall-Through
390+Never
450391
451392# The "Other Actions using the same button" Table
452393
453-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 **not** necessarily executed together.
394+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 not necessarily executed together.
454395
455-The list includes clicks from the parent(s) contexts, but not any child contexts.
396+The list includes clicks from the parent(s) contexts, but not any child contexts.
456397
457-The clicks are usually searched in the order indicated in the first column. You need to check:
398+The clicks are usually searched in the order indicated in the first column. You need to check:
458399
459- * Clicks in the other direction (up/down)
460- * if the Modifier Keys match or could match
461- * A click could fall through
462- * A click with lesser count (single, double, ...) exists
400+- Clicks in the other direction (up/down)
401+- if the Modifier Keys match or could match
402+- A click could fall through
403+- A click with lesser count (single, double, ...) exists
463404
464-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 fall through.
405+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 fall through.
465406
466-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.
407+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.
467408
468409# Current Limitations
469410
470- * On Windows **Triple** and **Quad** pressing work for the left button only.
471- * Extra Mouse Buttons (Button 4 and 5) work on Windows and Linux only
472- * GTK2: PopUp-Menu is recommended for use with Button-Up only
473- * OS-Depended: Some clicks may be used by the Window-Manager, and do not reach the IDE at all
411+- On Windows **Triple** and **Quad** pressing work for the left button only.
412+- Extra Mouse Buttons (Button 4 and 5) work on Windows and Linux only
413+- GTK2: PopUp-Menu is recommended for use with Button-Up only
414+- OS-Depended: Some clicks may be used by the Window-Manager, and do not reach the IDE at all
474415
475416# Pitfalls
476417
477418## Mixing Down and Up Clicks
478419
479-A mouse-down action does **not** prevent the mouse up action. This may lead to unexpected additional actions being executed
480-Consequential a click-up may be preceeded by unexpected click-down actions.
420+A mouse-down action does not prevent the mouse up action. This may lead to unexpected additional actions being executed\
421+Consequential a click-up may be preceeded by unexpected click-down actions.
481422
482- * The mouse-up / mouse-down can be in a parent context node
483- * To avoid search in parent nodes, define a "no action" event in the current node
423+- The mouse-up / mouse-down can be in a parent context node
424+- To avoid search in parent nodes, define a "no action" event in the current node
484425
485426## Double to Quad Clicks
486427
487- * On Windows **Triple** and **Quad** only work for the left button.
428+- On Windows **Triple** and **Quad** only work for the left button.
488429
489-If you assign actions to double and triple click, you should aware that they always trigger the lesser clicks too.
430+If you assign actions to double and triple click, you should aware that they always trigger the lesser clicks too.
490431
491-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)
432+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)
492433
493- * The single click can be in a parent context node
434+- The single click can be in a parent context node
494435
495-
496-You should therefore take care of the actions assigned to those clicks.
436+You should therefore take care of the actions assigned to those clicks.
497437
498- * 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.
499- * 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.
500- * This is not a bug. This is the correct behaviour
438+- 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.
439+- 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.
440+- This is not a bug. This is the correct behaviour
501441
502442# Useful Examples
503443
504-Some of the examples have become default, since they were listed here
444+Some of the examples have become default, since they were listed here
505445
506446## Mouse "Move" versus "Click" on Gutter to select Lines / toggle action
507447
508-Left click followed by mouse move will do selection, while a Click without move will toggle breakpoints/fold-nodes.
448+Left click followed by mouse move will do selection, while a Click without move will toggle breakpoints/fold-nodes.
509449
510-You can also choose to apply this only to the fold part of the gutter.
450+You can also choose to apply this only to the fold part of the gutter.
511451
512-
452+Context Node
453+Gutter
513454
514-Context Node
515- Gutter
516-Configuration
517- Left - Any - Down - All modifiers greyed
518-Action
519- Selection - Mode: Begin
455+Configuration
456+Left - Any - Down - All modifiers greyed
520457
521-
522-**Optional:**
458+Action
459+Selection - Mode: Begin
523460
524-
461+Optional:
525462
526-Context Node
527- Gutter
528-Configuration
529- Left - Any - Down - Shift required pressed; Ctrl, Alt required unpressed
530-Action
531- Selection - Mode: Continue
463+:;Context Node: Gutter
532464
533-
465+:;Configuration: Left - Any - Down - Shift required pressed; Ctrl, Alt required unpressed
534466
535-Context Node
536- Gutter
537-Configuration
538- Left - Any - **Up** \- All modifiers greyed
539-Action
540- Toggle Breakpoint
467+:;Action: Selection - Mode: Continue
541468
542-
469+Context Node
470+Gutter
543471
544-Context Node
545- Gutter => Line Numbers
546-No Entries
547-
472+Configuration
473+Left - Any - Up - All modifiers greyed
548474
549-
550-_Remove the Entry_
475+Action
476+Toggle Breakpoint
551477
552-Context Node
553- ~~Gutter~~
554-Configuration
555- ~~Left - Any - Down - All modifiers greyed~~
556-Action
557- ~~No Action~~
478+Context Node
479+Gutter =\> Line Numbers
558480
559-If you choose to apply this only to the fold part of the gutter, then instead of removing the above entry set it to "Action: Selection Mode Begin"
481+No Entries
560482
561-
562-_Change_
483+Remove the Entry
563484
564-Context Node
565- Gutter => Fold Tree => Collapsed
566-Fold Tree => Expanded
567-Configuration
568- Change all to include the checkbox "Act on Mouse Up"
485+Context Node
486+Gutter
569487
570-
488+Configuration
489+Left - Any - Down - All modifiers greyed
571490
491+Action
492+No Action
493+
494+If you choose to apply this only to the fold part of the gutter, then instead of removing the above entry set it to "Action: Selection Mode Begin"
495+
496+Change
497+
498+Context Node
499+Gutter =\> Fold Tree =\> Collapsed\
500+Fold Tree =\> Expanded
501+
502+Configuration
503+Change all to include the checkbox "Act on Mouse Up"
504+
572505## Line Numbers in Gutter to select Lines
573506
574-You can set the Line number part of the gutter to select text (full lines) instead of toggling a breakpoint. The Rest of the gutter (left to the line numbers) will still do breakpoints.
507+You can set the Line number part of the gutter to select text (full lines) instead of toggling a breakpoint. The Rest of the gutter (left to the line numbers) will still do breakpoints.
575508
576-Context Node
577- Gutter => Line Numbers
578-Configuration
579- Left - Any - Down - All modifiers greyed
580-Action
581- Line Selection - Mode: Begin
509+Context Node
510+Gutter =\> Line Numbers
582511
583-Setting Click to "Any" instead of "Single" means that double-clicks do not accidentally toggle breakpoints.
512+Configuration
513+Left - Any - Down - All modifiers greyed
584514
515+Action
516+Line Selection - Mode: Begin
517+
518+Setting Click to "Any" instead of "Single" means that double-clicks do not accidentally toggle breakpoints.
519+
585520## Fold by clicking on Keyword ("begin")
586521
587-Instead of folding a block by clicking on the [-] symbol in the gutter, you can fold a block by clicking on it's start keyword (e.g. "begin" or "$region"). this is useful if more than one block starts on the same line.
522+Instead of folding a block by clicking on the \[-\] symbol in the gutter, you can fold a block by clicking on it's start keyword (e.g. "begin" or "\$region"). this is useful if more than one block starts on the same line.
588523
589-Context Node
590- Text
591-Configuration
592- Middle or Right - Single - Down - Ctrl or Alt
593-Action
594- Fold Code - Nodes: At Caret
524+Context Node
525+Text
595526
527+Configuration
528+Middle or Right - Single - Down - Ctrl or Alt
529+
530+Action
531+Fold Code - Nodes: At Caret
532+
596533## Fold current block by clicking on vertical fold line
597534
598-You can set a click on the vertical line ("|" below the [-] sign in the fold tree) to fold the enclosing node. This may be useful if the [-] is outside the visible area.
535+You can set a click on the vertical line ("\|" below the \[-\] sign in the fold tree) to fold the enclosing node. This may be useful if the \[-\] is outside the visible area.
599536
600-Context Node
601- Gutter => Fold Tree
602-Configuration
603- Left - Any - Down - All modifiers greyed
604-Action
605- Fold Code - Nodes: Current Node
537+Context Node
538+Gutter =\> Fold Tree
606539
607-This replaces the default "No Action" Entry. The default entry (as will the substitute) prevents Fold-Tree-Gutter clicks to toggle breakpoints.
540+Configuration
541+Left - Any - Down - All modifiers greyed
608542
543+Action
544+Fold Code - Nodes: Current Node
545+
546+This replaces the default "No Action" Entry. The default entry (as will the substitute) prevents Fold-Tree-Gutter clicks to toggle breakpoints.
547+
609548## Extend "Source Links" to jump Begin/End-pairs
610549
611-The Source-Link command is only useful for certain identifiers. But a very similar command exist "Find block other End" (IDE-Command). This can be set as a Fall-Through. In this case the same Click can trigger either of the 2 commands, depending on being above a link, or a begin end pair.
550+The Source-Link command is only useful for certain identifiers. But a very similar command exist "Find block other End" (IDE-Command). This can be set as a Fall-Through. In this case the same Click can trigger either of the 2 commands, depending on being above a link, or a begin end pair.
612551
613-Since IDE-Commands do not support Fall-Through to a further Action thye must be the last in the order of priorities. The "Source Link Command" does support Fall-Through, so it can be tried first.
552+Since IDE-Commands do not support Fall-Through to a further Action thye must be the last in the order of priorities. The "Source Link Command" does support Fall-Through, so it can be tried first.
614553
615-Keep the "Source Link Command" as per default:
554+Keep the "Source Link Command" as per default:
616555
617-Context Node
618- Text
619-Configuration
620- Left - Single - Up - Ctrl required pressed; Shift, Alt required unpressed
621-Priority
622- 0 (highest)
623-Action
624- Source Link - Underline: yes
556+Context Node
557+Text
625558
626-Add a new entry
559+Configuration
560+Left - Single - Up - Ctrl required pressed; Shift, Alt required unpressed
627561
628-Context Node
629- Text
630-Configuration
631- Left - Single - Up - Ctrl required pressed; Shift, Alt required unpressed
632-Priority
633- 1 (lower)
634-Action
635- IDE-Command - Find block other end
562+Priority
563+0 (highest)
636564
637-Note: While links will be underlined, Begin/End pairs will not be underlined (but can be clicked)
565+Action
566+Source Link - Underline: yes
638567
639-## Change History Jumps for 3 button Mouse (follow back the "Source Link" trail)
568+Add a new entry
640569
641-This is usually assigned to ctrl-h. Source-Links and similar actions keep a history of points visited. You can navigate this history backward and forward.
570+Context Node
571+Text
642572
643-By default Lazarus uses the 2 extra Buttons of a 5 button mouse to navigate this jump history.
573+Configuration
574+Left - Single - Up - Ctrl required pressed; Shift, Alt required unpressed
644575
645-(This works only if the mouse is over the text. If you want them to work just anywhere including the Gutter space, you need to add a copy in the Gutter context too. There is currently no context that catches Gutter and Text)
576+Priority
577+1 (lower)
646578
647-Steps to change them for a 3 button mouse:
579+Action
580+IDE-Command - Find block other end
648581
649- * select the "text" node from the context-tree (this includes selection, there is no need to add extra config for selection)
650- * Find the 2 entries (look for "extra1", "Extra2" in the button column
651- * Double-click each, to edit
652- * ctrl-right (or ctrl-middle or alt-right) click the "capture" field. **Ensure you check "act on mouse up"**
653- * save changes
582+Note: While links will be underlined, Begin/End pairs will not be underlined (but can be clicked)
654583
655-That's it
584+## Change History Jumps for 3 button Mouse (follow back the "Source Link" trail)
656585
657-
586+This is usually assigned to ctrl-h. Source-Links and similar actions keep a history of points visited. You can navigate this history backward and forward.
658587
588+By default Lazarus uses the 2 extra Buttons of a 5 button mouse to navigate this jump history.
589+
590+(This works only if the mouse is over the text. If you want them to work just anywhere including the Gutter space, you need to add a copy in the Gutter context too. There is currently no context that catches Gutter and Text)
591+
592+Steps to change them for a 3 button mouse:
593+
594+- select the "text" node from the context-tree (this includes selection, there is no need to add extra config for selection)
595+- Find the 2 entries (look for "extra1", "Extra2" in the button column
596+- Double-click each, to edit
597+- ctrl-right (or ctrl-middle or alt-right) click the "capture" field. **Ensure you check "act on mouse up"**
598+- save changes
599+
600+That's it
601+
659602### With a 3 Button Mouse
660603
661-You may assign this to something like ctrl-right mouse.
604+You may assign this to something like ctrl-right mouse.
662605
663606**If you use the right button, then you must use it on button-up. Otherwise you will also get the context-menu**
664607
665-Context Node
666- Text
667-Configuration
668- Right - Single - up - Ctrl Required pressed, Others either greyed, or required un-pressed
669-Action
670- Ide Command - Jump back
608+Context Node
609+Text
671610
611+Configuration
612+Right - Single - up - Ctrl Required pressed, Others either greyed, or required un-pressed
613+
614+Action
615+Ide Command - Jump back
616+
672617## Move to procedure body
673618
674-See this [[post in the forum](<http://forum.lazarus.freepascal.org/index.php/topic,12672.msg108498.html#msg108498>)]
619+See this [[http://forum.lazarus.freepascal.org/index.php/topic,12672.msg108498.html|http://forum.lazarus.freepascal.org/index.php/topic,12672.msg108498.html#msg108498 post in the forum]]
675620
676621---
677-*From the Free Pascal wiki, page "IDE Window: EditorMouseOptionsAdvanced", as the Internet Archive kept it on 2025-03-27. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
622+*From the Free Pascal wiki, page "IDE Window: EditorMouseOptionsAdvanced", as it stood on 2015-07-02 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history