Wiki source code of XWiki Keyboard Shortcuts

Version 32.2 by Vincent Massol on 2020/04/05

Hide last authors
Sorin Burjan 12.4 1 {{velocity}}
2 $xwiki.ssx.use("Features.KeyboardShortcuts")
3 {{/velocity}}
Ecaterina Moraru (Valica) 12.1 4
Thomas Mortagne 8.1 5 {{box cssClass="floatinginfobox" title="**Contents**"}}
6 {{toc/}}
7 {{/box}}
Jean-Vincent Drean 1.1 8
Vincent Massol 31.2 9 You can use keyboard shortcuts to use some XWiki features. Keyboard shortcuts help you save time since you never have to take your hands off the keyboard to use the mouse.
Jean-Vincent Drean 1.1 10
Ecaterina Moraru (Valica) 12.1 11 = Using keyboard shortcuts =
Jean-Vincent Drean 1.1 12
Ecaterina Moraru (Valica) 12.1 13 == View Mode ==
Jean-Vincent Drean 1.1 14
Thomas Mortagne 8.1 15 {{info}}
16 View keyboard shortcuts are only available to advanced users, preventing simple users to get unexpected behavior when pressing keyboard keys by mistake
17 {{/info}}
Jean-Vincent Drean 1.1 18
Ecaterina Moraru (Valica) 12.1 19 === a) Edit Actions ===
Jean-Vincent Drean 1.1 20
Sorin Burjan 12.4 21 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate edit actions" %)
Vincent Massol 32.2 22 |(% class="shortcut" %)
Sorin Burjan 12.4 23 (((
24 (% class="key" %)E
Eduard Moraru 13.2 25 )))|Edit the page using the default edition mode
Vincent Massol 32.2 26 |(% class="shortcut" %)
Sorin Burjan 12.4 27 (((
28 (% class="key" %)K
Eduard Moraru 13.2 29 )))|Edit the page in wiki edition mode
Vincent Massol 32.2 30 |(% class="shortcut" %)
Sorin Burjan 12.4 31 (((
32 (% class="key" %)G
Eduard Moraru 13.2 33 )))|Edit the page using the WYSIWYG editor
Vincent Massol 32.2 34 |(% class="shortcut" %)
Sorin Burjan 12.4 35 (((
36 (% class="key" %)F
Eduard Moraru 13.2 37 )))|Inline Form
Vincent Massol 32.2 38 |(% class="shortcut" %)
Sorin Burjan 12.4 39 (((
40 (% class="key" %)R
Eduard Moraru 13.2 41 )))|Edit page access rights
Vincent Massol 32.2 42 |(% class="shortcut" %)
Sorin Burjan 12.4 43 (((
44 (% class="key" %)O
Eduard Moraru 13.2 45 )))|Edit page objects
Vincent Massol 32.2 46 |(% class="shortcut" %)
Sorin Burjan 12.4 47 (((
48 (% class="key" %)S
Eduard Moraru 13.2 49 )))|Edit class
Jean-Vincent Drean 1.1 50
Ecaterina Moraru (Valica) 12.1 51 === b) View Actions ===
Jean-Vincent Drean 1.1 52
Sorin Burjan 12.4 53 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate view actions" %)
Vincent Massol 32.2 54 |(% class="shortcut" %)
Sorin Burjan 12.4 55 (((
56 (% class="key" %)C
Eduard Moraru 13.2 57 )))|Go to page comments
Vincent Massol 32.2 58 |(% class="shortcut" %)
Sorin Burjan 12.4 59 (((
60 (% class="key" %)A
Eduard Moraru 13.2 61 )))|Go to page attachments
Vincent Massol 32.2 62 |(% class="shortcut" %)
Sorin Burjan 12.4 63 (((
64 (% class="key" %)H
Eduard Moraru 13.2 65 )))|Go to page history
Vincent Massol 32.2 66 |(% class="shortcut" %)
Sorin Burjan 12.4 67 (((
Marius Dumitru Florea 13.1 68 (% class="key" %)I
Eduard Moraru 13.2 69 )))|Go to page information
Vincent Massol 32.2 70 |(% class="shortcut" %)
Marius Dumitru Florea 13.1 71 (((
Sorin Burjan 12.4 72 (% class="key" %)D
Eduard Moraru 13.2 73 )))|View page wiki code
Jean-Vincent Drean 1.1 74
Ecaterina Moraru (Valica) 12.1 75 === c) Other Actions ===
Jean-Vincent Drean 1.1 76
Sorin Burjan 12.4 77 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate other actions" %)
Vincent Massol 32.2 78 |(% class="shortcut" %)
Sorin Burjan 12.4 79 (((
80 (% class="key" %)F2
Eduard Moraru 13.2 81 )))|Rename page
Vincent Massol 32.2 82 |(% class="shortcut" %)
Sorin Burjan 12.4 83 (((
84 (% class="key" %)Delete
Eduard Moraru 13.2 85 )))|Delete page
Jean-Vincent Drean 1.1 86
Ecaterina Moraru (Valica) 12.1 87 == Edit Wiki & Edit Inline Mode ==
Jean-Vincent Drean 1.1 88
Thomas Mortagne 8.1 89 {{warning}}
Sorin Burjan 12.4 90 While in Inline Edit mode and focusing on a WYSIWYG edit area, the keyboard shortcuts listed below won't work since the WYSIWYG editor grabs all the key pressed events.
Thomas Mortagne 8.1 91 {{/warning}}
92
Ecaterina Moraru (Valica) 12.1 93 (% class="keyboard" summary="Keyboard Shortcuts for Edit Wiki and Inline Mode" %)
Vincent Massol 32.2 94 |(% class="shortcut" %)
Sorin Burjan 12.4 95 (((
96 (% class="key" %)Alt(%%) + (% class="key" %)C
97 )))|Cancel edition
Vincent Massol 32.2 98 |(% class="shortcut" %)
Sorin Burjan 12.4 99 (((
100 (% class="key" %)Alt(%%) + (% class="key" %)P
101 )))|Preview the page without saving
Vincent Massol 32.2 102 |(% class="shortcut" %)
Sorin Burjan 12.4 103 (((
104 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
105 )))|Save and continue to edit the page
Vincent Massol 32.2 106 |(% class="shortcut" %)
Sorin Burjan 12.4 107 (((
108 (% class="key" %)Alt(%%) + (% class="key" %)S
109 )))|Save and view the page
Jean-Vincent Drean 1.1 110
Ecaterina Moraru (Valica) 12.1 111 == Edit WYSIWYG Mode ==
Jean-Vincent Drean 1.1 112
Vincent Massol 14.3 113 {{include document="platform:Features.WysiwygEditorShortcuts"/}}
Jean-Vincent Drean 1.1 114
Ecaterina Moraru (Valica) 12.1 115 == Preview Mode ==
116
117 (% class="keyboard" summary="Keyboard Shortcuts for Preview Mode" %)
Vincent Massol 32.2 118 |(% class="shortcut" %)
Sorin Burjan 12.4 119 (((
120 (% class="key" %)Alt(%%) + (% class="key" %)C
Eduard Moraru 13.2 121 )))|Cancel edition
Vincent Massol 32.2 122 |(% class="shortcut" %)
Sorin Burjan 12.4 123 (((
124 (% class="key" %)Alt(%%) + (% class="key" %)B
Eduard Moraru 13.2 125 )))|Back to the edition
Vincent Massol 32.2 126 |(% class="shortcut" %)
Sorin Burjan 12.4 127 (((
128 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
Eduard Moraru 13.2 129 )))|Save and continue to edit the page
Vincent Massol 32.2 130 |(% class="shortcut" %)
Sorin Burjan 12.4 131 (((
132 (% class="key" %)Alt(%%) + (% class="key" %)S
Eduard Moraru 13.2 133 )))|Save and view the page
Ecaterina Moraru (Valica) 12.1 134
Silvia Macovei 11.1 135 == Annotations ==
136
Ecaterina Moraru (Valica) 12.1 137 (% class="keyboard" summary="Keyboard Shortcuts for Annotations" %)
Vincent Massol 32.2 138 |(% class="shortcut" %)
Sorin Burjan 12.4 139 (((
Eduard Moraru 13.3 140 (% class="key" %)Ctrl(%%) + (% class="key" %)M(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)M(%%)
141 (% class="key" %)Ctrl(%%) + (% class="key" %)I(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)I
Eduard Moraru 13.2 142 )))|Annotate a piece of text
Vincent Massol 32.2 143 |(% class="shortcut" %)
Ecaterina Moraru (Valica) 29.3 144 (((
145 (% class="key" %)Alt(%%) + (% class="key" %)A
146 )))|Show annotations
Silvia Macovei 11.1 147
Ecaterina Moraru (Valica) 12.1 148 == Navigation ==
Jean-Vincent Drean 7.1 149
Ecaterina Moraru (Valica) 12.1 150 (% class="keyboard" summary="Keyboard Shortcuts for Navigation" %)
Vincent Massol 32.2 151 |(((
152 (% class="shortcut" %)
Sorin Burjan 12.4 153 (((
154 (% class="key" %)Ctrl(%%) + (% class="key" %)G
Vincent Massol 32.2 155 )))(% class="separator" %)or(%%)
156
157 (% class="shortcut" %)
Sorin Burjan 12.4 158 (((
159 (% class="key" %)Meta(%%) + (% class="key" %)G
Vincent Massol 32.2 160 )))
Sorin Burjan 12.4 161 )))|Jump to any page in the wiki
Ecaterina Moraru (Valica) 12.1 162
Clément Aubin 24.1 163 == Developer shortcuts ==
164
Clément Aubin 26.1 165 {{info}}Since 9.11{{/info}}, the following key sequences can be used to toggle specific actions on the current logged in user:
Clément Aubin 24.1 166
167 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
Vincent Massol 32.2 168 |(% class="shortcut" %)
Clément Aubin 24.1 169 (((
170 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)a
171 )))|Toggle advanced user mode for the current user.
172
173 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
Vincent Massol 32.2 174 |(% class="shortcut" %)
Clément Aubin 24.1 175 (((
176 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)h
177 )))|Toggle hidden pages for the current user.
178
Ecaterina Moraru (Valica) 12.1 179 = Configuring keyboard shortcuts =
180
181 == Modifying keyboard shortcuts ==
182
Vincent Massol 29.2 183 * Create a new page in your wiki, for example ##XWiki.KeyboardShortcuts## and paste the following content inside:(((
Sorin Burjan 12.4 184 {{code}}
185 core.shortcuts.view.edit=e
Jean-Vincent Drean 7.1 186 core.shortcuts.view.wiki=k
187 core.shortcuts.view.wysiwyg=g
188 core.shortcuts.view.inline=f
189 core.shortcuts.view.rights=r
190 core.shortcuts.view.objects=o
191 core.shortcuts.view.class=s
192 core.shortcuts.view.comments=c
193 core.shortcuts.view.attachments=a
194 core.shortcuts.view.history=h
195 core.shortcuts.view.information=i
196 core.shortcuts.view.code=d
Clément Aubin 21.2 197 core.shortcuts.view.delete=Delete
198 core.shortcuts.view.rename=F2
199 core.shortcuts.edit.cancel=Alt+C
200 core.shortcuts.edit.backtoedit=Alt+B
201 core.shortcuts.edit.preview=Alt+P
202 core.shortcuts.edit.saveandcontinue=Alt+Shift+S
203 core.shortcuts.edit.saveandview=Alt+S
Sorin Burjan 12.4 204 {{/code}}
205 )))
Jean-Vincent Drean 7.1 206 * Modify entries in this list at your convenience
207 * Save the page
Vincent Massol 29.2 208 * Go to the wiki administration, edit the attached XObject (change the URL to ##/edit/XWiki/XWikiPreferences?editor=object##)
209 * Add ##XWiki.KeyboardShortcuts## to the "Internationalization Document Bundles" field
Jean-Vincent Drean 7.1 210
Ecaterina Moraru (Valica) 12.1 211 == Adding your own shortcuts ==
Jean-Vincent Drean 1.1 212
213 You can add your own keyboard shortcuts in a few javascript lines :
214
Thomas Mortagne 8.1 215 {{code language="html"}}
Jean-Vincent Drean 1.1 216 <script type="text/javascript">
217 //<![CDATA[
Clément Aubin 23.1 218 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
Jean-Vincent Drean 1.1 219 //]]>
220 </script>
Silvia Macovei 2.1 221 {{/code}}
Jean-Vincent Drean 1.1 222
Jean-Vincent Drean 6.1 223 {{html clean="false"}}
Jean-Vincent Drean 1.1 224 <script type="text/javascript">
Clément Aubin 23.1 225 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
Jean-Vincent Drean 1.1 226 </script>
Jean-Vincent Drean 5.1 227 {{/html}}
228
Sorin Burjan 12.4 229 Try the snippet by pressing (% class="key" %)**Ctrl**(%%) + (% class="key" %)**Alt**(%%) + (% class="key" %)**n**(%%).
Jean-Vincent Drean 5.1 230
Clément Aubin 24.1 231 Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]].
Jean-Vincent Drean 1.1 232
Ecaterina Moraru (Valica) 12.1 233 == Removing keyboard shortcuts ==
Jean-Vincent Drean 1.1 234
Vincent Massol 32.1 235 To remove a shortcut adapt the following snippet to your needs and use by putting it in a [[JavaScript StyleSheet Extension>>Documentation.DevGuide.Tutorials.SkinExtensionsTutorial.WebHome]]:
Jean-Vincent Drean 1.1 236
Vincent Massol 32.2 237 {{code language="javascript"}}
Vincent Massol 32.1 238 shortcut.remove("Ctrl+Alt+n");
Silvia Macovei 2.1 239 {{/code}}
Jean-Vincent Drean 1.1 240
Ecaterina Moraru (Valica) 12.1 241 == Removing all shortcuts at once ==
Jean-Vincent Drean 5.1 242
Vincent Massol 32.2 243 {{code language="javascript"}}
Vincent Massol 32.1 244 for (binding in shortcut.all_shortcuts()) {
245 shortcut.remove(binding.keys.join(' '));
246 }
Jean-Vincent Drean 5.1 247 {{/code}}
248
Ecaterina Moraru (Valica) 12.1 249 == Credits ==
Jean-Vincent Drean 1.1 250
Clément Aubin 24.1 251 XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].

Get Connected