You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eclipse.platform.common/bundles/org.eclipse.platform.doc.user/concepts/accessibility/keyboardshortcuts.htm
<p>For example we want to bind <b>CTRL+5</b> to the About command. By default the keys preference page will show
92
-
you all possible keybindings. You can see the About command listed in the Help category. You can bind the command by
93
-
putting focus in the Binding text box and pressing CTRL and 5 like you would if you were executing the command.</p>
94
-
<p>When you type CTRL+5 you have created a binding for About. The right-most column will indicate that this is a user
95
-
binding by displaying a <b>U</b>. If there was a conflict with another key, this column would also display a
96
-
<b>C</b>. The binding will be in the default context, "In Windows". You can now use the When combo box to change the
97
-
key binding context (for example, to move this binding to "Editing Text").</p>
98
-
<p>If you wanted to add a second key binding to About, you can use the <b>Copy Command</b> button to create a second
99
-
command entry for you to bind another key to. If you want to delete a binding, you can either use the <b>Remove
100
-
Binding</b> button or simply give focus to the Binding text box and hit <b>Backspace</b>.</p>
101
-
<h2>The Dynamic Nature of Key Bindings</h2>
102
-
<p>Key bindings are provided by plug-ins, and in Eclipse, plug-ins can be added or removed. This can cause key
103
-
bindings declared by these plug-ins to be added or removed. Eclipse stores custom key bindings in a way to compensate
104
-
for this. Consider the example above where <code>CTRL+6</code> was assigned to <code>About</code> in the
105
-
<em>Default</em> scheme. Say you install a new plug-in that assigns <code>CTRL+6</code> to a particular command.
106
-
Eclipse will preserve your assignment to <code>About</code>.</p>
107
-
<h2>Conflict Resolution</h2>
108
-
<p>There are only a finite number of simple, common key strokes available to assign to a multitude of commands. We
109
-
have seen that scheme, context, platform, and locale all partition key sequence assignments into domains where they
110
-
don't conflict with one another. Consider the case for <code>Ctrl+B</code> above if contexts did not exist. One
111
-
plug-in would assign <code>Ctrl+B</code> to <code>Build</code>, the other plug-in would assign <code>Ctrl+B</code> to
112
-
<code>Make Bold Text</code>. How would Eclipse properly resolve this conflict?</p>
113
-
<p>Though conflicts are drastically reduced by employing the above mechanisms, they can still occur. Two plug-ins,
114
-
independent of one another, could assign the same key sequence to different commands with the same context, scheme,
115
-
platform, and locale. Consider if a plug-in assigned <code>Ctrl+F4</code> in the <em>In Windows</em> context and
116
-
<em>Default</em> scheme to one of its commands. This directly conflicts with Eclipse assigning <code>Ctrl+F4</code>
117
-
to the close command in the same context and scheme.</p>
118
-
<p>This is a conflict. It wouldn't be proper to invoke both commands, nor would it be proper to simply choose one of
119
-
the two commands to receive the key stroke. We pop up the Key Assist Dialog with the conflicting commands and allow
120
-
the user to select one. The Key Assist Dialog is the same dialog that displays command choices for multiple key
121
-
stroke key bindings.</p>
122
-
<p>If the user sets a keybinding and creates a conflict, the conflicting bindings will be displayed in the conflicts
123
-
list. This can be used to navigate between conflicting keybindings so that they can be changed.</p>
124
-
<p>These types of conflicts can be resolved by explicitly assigning the key sequence to one of the commands, or
125
-
remove it from the other.</p>
126
-
<p>Another type of conflict can be caused by multiple-key stroke key sequences. For example, in the <em>Emacs</em>
127
-
scheme, there are many multiple-key stroke key sequences beginning with the key stroke <code>Ctrl+X</code>.
128
-
<code>Ctrl+X K</code> is assigned to <code>Close</code>. <code>Ctrl+X H</code> is assigned to <code>Select
129
-
All</code>.</p>
130
-
<p>As previously mentioned, the <em>Emacs</em> scheme borrows key bindings from the <em>Default</em> scheme. In the
131
-
default scheme, <code>Ctrl+X</code> is assigned to <code>Cut</code>. Though the <em>Emacs</em> scheme doesn't
132
-
explicitly redefine <code>Ctrl+X</code>, pressing <code>Ctrl+X</code> is required as part of many of its key
133
-
bindings. In the <em>Emacs</em> scheme, when one presses <code>Ctrl+X</code>, one is half way to entering one of many
134
-
possible assigned key sequences. One would not expect the <code>Cut</code> action to be invoked at this time.</p>
135
-
<p>For this type of conflict, the rule is that the <code>Ctrl+X</code> key sequence assigned to <code>Cut</code>
136
-
would be ignored. Otherwise, it would not be possible to complete many of the key bindings in the <em>Emacs</em>
137
-
configuration.</p>
22
+
<p>For example we want to bind <code>CTRL+5</code> to the <em>About</em> command. By default the keys preference page will show
23
+
you all possible keybindings. You can see the <em>About</em> command listed in the <em>Help</em> category. You can bind the command by
24
+
putting focus in the Binding text box and pressing <code>CTRL</code> and <code>5</code> like you would if you were executing the command.</p>
25
+
<p>When you type <code>CTRL+5</code> you have created a binding for the <em>About</em> command. The right-most column will indicate that this is a user
26
+
binding by displaying a <em>U</em>. If there was a conflict with another key, this column would also display a
27
+
<em>C</em>. The binding will be in the default context <em>In Windows</em>. You can now use the <em>When</em> combo box to change the
28
+
key binding context.</p>
29
+
<p>You can use the <em>Copy Command</em> button to create a second command entry for you to bind another key to. To remove a binding use
30
+
the <em>Unbind Command</em> button, or simply give focus to the <em>Binding</em> text box and hit <code>Backspace</code>.</p>
138
31
<h2>Export Key Bindings</h2>
139
32
<p>The bindings can be exported to a CSV file. For this purpose, press the button <strong>Export CSV ...</strong>.
140
33
This will launch a file dialog, where you can specify the location of the export file. Note: The export file is for
@@ -143,15 +36,15 @@ <h2>Show Key Bindings When Command Is Invoked</h2>
143
36
<p>For learning purposes, presentations or screen casts it is very helpful to show the corresponding key binding when
144
37
a command is invoked. Whenever the command is invoked (via the keyboard or via menu clicks), the key binding, the
145
38
command's name and description are shown on the screen.</p>
146
-
<p><imgsrc="../../images/show_key_bindings.png" alt="Key binding of triggered command shown on screen" style=
147
-
"width: 40%"></p>
148
39
<p>This can be activated via the check boxes in the <em>Show key binding when command is invoked</em> group on the
0 commit comments