Wiki source code of XWiki Keyboard Shortcuts

Last modified by Lucas Charpentier (Sereza7) on 2024/06/07

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
Vincent Massol 36.2 19 === 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 33.1 22 |(% class="shortcut" %)(((
Sorin Burjan 12.4 23 (% class="key" %)E
Eduard Moraru 13.2 24 )))|Edit the page using the default edition mode
Vincent Massol 33.1 25 |(% class="shortcut" %)(((
Sorin Burjan 12.4 26 (% class="key" %)K
Eduard Moraru 13.2 27 )))|Edit the page in wiki edition mode
Vincent Massol 33.1 28 |(% class="shortcut" %)(((
Sorin Burjan 12.4 29 (% class="key" %)G
Eduard Moraru 13.2 30 )))|Edit the page using the WYSIWYG editor
Vincent Massol 33.1 31 |(% class="shortcut" %)(((
Sorin Burjan 12.4 32 (% class="key" %)F
Eduard Moraru 13.2 33 )))|Inline Form
Vincent Massol 33.1 34 |(% class="shortcut" %)(((
Sorin Burjan 12.4 35 (% class="key" %)R
Eduard Moraru 13.2 36 )))|Edit page access rights
Vincent Massol 33.1 37 |(% class="shortcut" %)(((
Sorin Burjan 12.4 38 (% class="key" %)O
Eduard Moraru 13.2 39 )))|Edit page objects
Vincent Massol 33.1 40 |(% class="shortcut" %)(((
Sorin Burjan 12.4 41 (% class="key" %)S
Eduard Moraru 13.2 42 )))|Edit class
Jean-Vincent Drean 1.1 43
Vincent Massol 36.2 44 === View Actions ===
Jean-Vincent Drean 1.1 45
Sorin Burjan 12.4 46 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate view actions" %)
Vincent Massol 33.1 47 |(% class="shortcut" %)(((
Sorin Burjan 12.4 48 (% class="key" %)C
Eduard Moraru 13.2 49 )))|Go to page comments
Vincent Massol 33.1 50 |(% class="shortcut" %)(((
Lucas Charpentier (Sereza7) 38.1 51 (% class="key" %)N
52 )))|Go to page annotations {{warning}} This shortcut might be used for creating a new page instead. See the evolution of the discussion on [[this forum topic>>https://forum.xwiki.org/t/adding-a-shortcut-for-the-create-action/]]{{/warning}}
53 |(% class="shortcut" %)(((
Sorin Burjan 12.4 54 (% class="key" %)A
Eduard Moraru 13.2 55 )))|Go to page attachments
Vincent Massol 33.1 56 |(% class="shortcut" %)(((
Sorin Burjan 12.4 57 (% class="key" %)H
Eduard Moraru 13.2 58 )))|Go to page history
Vincent Massol 33.1 59 |(% class="shortcut" %)(((
Marius Dumitru Florea 13.1 60 (% class="key" %)I
Eduard Moraru 13.2 61 )))|Go to page information
Vincent Massol 33.1 62 |(% class="shortcut" %)(((
Sorin Burjan 12.4 63 (% class="key" %)D
Eduard Moraru 13.2 64 )))|View page wiki code
Jean-Vincent Drean 1.1 65
Vincent Massol 36.2 66 === Other Actions ===
Jean-Vincent Drean 1.1 67
Sorin Burjan 12.4 68 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate other actions" %)
Vincent Massol 33.1 69 |(% class="shortcut" %)(((
Sorin Burjan 12.4 70 (% class="key" %)F2
Eduard Moraru 13.2 71 )))|Rename page
Vincent Massol 33.1 72 |(% class="shortcut" %)(((
Sorin Burjan 12.4 73 (% class="key" %)Delete
Eduard Moraru 13.2 74 )))|Delete page
Jean-Vincent Drean 1.1 75
Marius Dumitru Florea 36.1 76 == Edit Mode ==
Jean-Vincent Drean 1.1 77
Lucas Charpentier (Sereza7) 41.1 78 {{warning}}
79 In the following shortcuts, macOS users should use the ##Option## or ##⌥## button instead of ##Alt##.
80 {{/warning}}
81
Marius Dumitru Florea 36.1 82 (% class="keyboard" summary="Keyboard Shortcuts for Edit Mode" %)
Vincent Massol 33.1 83 |(% class="shortcut" %)(((
Sorin Burjan 12.4 84 (% class="key" %)Alt(%%) + (% class="key" %)C
85 )))|Cancel edition
Vincent Massol 33.1 86 |(% class="shortcut" %)(((
Sorin Burjan 12.4 87 (% class="key" %)Alt(%%) + (% class="key" %)P
88 )))|Preview the page without saving
Vincent Massol 33.1 89 |(% class="shortcut" %)(((
Sorin Burjan 12.4 90 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
91 )))|Save and continue to edit the page
Vincent Massol 33.1 92 |(% class="shortcut" %)(((
Sorin Burjan 12.4 93 (% class="key" %)Alt(%%) + (% class="key" %)S
94 )))|Save and view the page
Jean-Vincent Drean 1.1 95
Vincent Massol 36.2 96 === WYSIWYG Edit Mode ===
Jean-Vincent Drean 1.1 97
Vincent Massol 36.2 98 See the [[WYSIWYG Editor keyboard shortcuts>>extensions:Extension.CKEditor Integration#HKeyboardShortcuts]].
99
Ecaterina Moraru (Valica) 12.1 100 == Preview Mode ==
101
Lucas Charpentier (Sereza7) 41.1 102 {{warning}}
103 In the following shortcuts, macOS users should use the ##Option## or ##⌥## button instead of ##Alt##.
104 {{/warning}}
105
Ecaterina Moraru (Valica) 12.1 106 (% class="keyboard" summary="Keyboard Shortcuts for Preview Mode" %)
Vincent Massol 33.1 107 |(% class="shortcut" %)(((
Sorin Burjan 12.4 108 (% class="key" %)Alt(%%) + (% class="key" %)C
Eduard Moraru 13.2 109 )))|Cancel edition
Vincent Massol 33.1 110 |(% class="shortcut" %)(((
Sorin Burjan 12.4 111 (% class="key" %)Alt(%%) + (% class="key" %)B
Eduard Moraru 13.2 112 )))|Back to the edition
Vincent Massol 33.1 113 |(% class="shortcut" %)(((
Sorin Burjan 12.4 114 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
Eduard Moraru 13.2 115 )))|Save and continue to edit the page
Vincent Massol 33.1 116 |(% class="shortcut" %)(((
Sorin Burjan 12.4 117 (% class="key" %)Alt(%%) + (% class="key" %)S
Eduard Moraru 13.2 118 )))|Save and view the page
Ecaterina Moraru (Valica) 12.1 119
Silvia Macovei 11.1 120 == Annotations ==
121
Ecaterina Moraru (Valica) 12.1 122 (% class="keyboard" summary="Keyboard Shortcuts for Annotations" %)
Vincent Massol 33.1 123 |(% class="shortcut" %)(((
Eduard Moraru 13.3 124 (% class="key" %)Ctrl(%%) + (% class="key" %)M(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)M(%%)
125 (% class="key" %)Ctrl(%%) + (% class="key" %)I(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)I
Eduard Moraru 13.2 126 )))|Annotate a piece of text
Vincent Massol 33.1 127 |(% class="shortcut" %)(((
Ecaterina Moraru (Valica) 29.3 128 (% class="key" %)Alt(%%) + (% class="key" %)A
Lucas Charpentier (Sereza7) 41.1 129 )))|Show annotations {{warning}}In this shortcut, macOS users should use the ##Option## or ##⌥## button instead of ##Alt##.{{/warning}}
Silvia Macovei 11.1 130
Lucas Charpentier (Sereza7) 41.1 131
Ecaterina Moraru (Valica) 12.1 132 == Navigation ==
Jean-Vincent Drean 7.1 133
Ecaterina Moraru (Valica) 12.1 134 (% class="keyboard" summary="Keyboard Shortcuts for Navigation" %)
Lucas Charpentier (Sereza7) 40.1 135 |(% class="shortcut" %)(((
136 (% class="key" %)Ctrl(%%) + (% class="key" %)G(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)G(%%)
137 (% class="key" %)Ctrl(%%) + (% class="key" %)/(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)/(%%)
Sorin Burjan 12.4 138 )))|Jump to any page in the wiki
Ecaterina Moraru (Valica) 12.1 139
Clément Aubin 24.1 140 == Developer shortcuts ==
141
Clément Aubin 26.1 142 {{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 143
144 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
Vincent Massol 33.1 145 |(% class="shortcut" %)(((
Clément Aubin 24.1 146 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)a
147 )))|Toggle advanced user mode for the current user.
148
149 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
Vincent Massol 33.1 150 |(% class="shortcut" %)(((
Clément Aubin 24.1 151 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)h
152 )))|Toggle hidden pages for the current user.
153
Ecaterina Moraru (Valica) 12.1 154 = Configuring keyboard shortcuts =
155
156 == Modifying keyboard shortcuts ==
157
Vincent Massol 29.2 158 * Create a new page in your wiki, for example ##XWiki.KeyboardShortcuts## and paste the following content inside:(((
slauriere 37.1 159 {{code language="text"}}
Sorin Burjan 12.4 160 core.shortcuts.view.edit=e
Jean-Vincent Drean 7.1 161 core.shortcuts.view.wiki=k
162 core.shortcuts.view.wysiwyg=g
163 core.shortcuts.view.inline=f
164 core.shortcuts.view.rights=r
165 core.shortcuts.view.objects=o
166 core.shortcuts.view.class=s
167 core.shortcuts.view.comments=c
168 core.shortcuts.view.attachments=a
169 core.shortcuts.view.history=h
170 core.shortcuts.view.information=i
171 core.shortcuts.view.code=d
Clément Aubin 21.2 172 core.shortcuts.view.delete=Delete
173 core.shortcuts.view.rename=F2
174 core.shortcuts.edit.cancel=Alt+C
175 core.shortcuts.edit.backtoedit=Alt+B
176 core.shortcuts.edit.preview=Alt+P
177 core.shortcuts.edit.saveandcontinue=Alt+Shift+S
178 core.shortcuts.edit.saveandview=Alt+S
Sorin Burjan 12.4 179 {{/code}}
180 )))
Jean-Vincent Drean 7.1 181 * Modify entries in this list at your convenience
182 * Save the page
Vincent Massol 34.1 183 * Edit the page in [[object mode>>Documentation.UserGuide.Features.PageEditing#HObjectseditingmode]] and add an ## XWiki.TranslationDocumentClass## xobject
184 ** Select the ##wiki## scope for the new translations (i.e. the new keyboard shortcuts) to apply to the whole wiki. {{warning}}You'll need to have Admin permissions for it to work{{/warning}}
Jean-Vincent Drean 7.1 185
Ecaterina Moraru (Valica) 12.1 186 == Adding your own shortcuts ==
Jean-Vincent Drean 1.1 187
Vincent Massol 35.1 188 You can add your own keyboard shortcuts in a few javascript lines. You can do that, for example, by adding a [[JavaScript StyleSheet Extension>>Documentation.DevGuide.Tutorials.SkinExtensionsTutorial.WebHome]] and putting the following content:
Jean-Vincent Drean 1.1 189
Vincent Massol 35.1 190 {{code language="javascript"}}
191 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
Silvia Macovei 2.1 192 {{/code}}
Jean-Vincent Drean 1.1 193
Clément Aubin 24.1 194 Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]].
Jean-Vincent Drean 1.1 195
Ecaterina Moraru (Valica) 12.1 196 == Removing keyboard shortcuts ==
Jean-Vincent Drean 1.1 197
Vincent Massol 32.1 198 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 199
Vincent Massol 32.2 200 {{code language="javascript"}}
Vincent Massol 32.1 201 shortcut.remove("Ctrl+Alt+n");
Silvia Macovei 2.1 202 {{/code}}
Jean-Vincent Drean 1.1 203
Ecaterina Moraru (Valica) 12.1 204 == Removing all shortcuts at once ==
Jean-Vincent Drean 5.1 205
Vincent Massol 32.2 206 {{code language="javascript"}}
Vincent Massol 32.1 207 for (binding in shortcut.all_shortcuts()) {
208 shortcut.remove(binding.keys.join(' '));
209 }
Jean-Vincent Drean 5.1 210 {{/code}}
211
Ecaterina Moraru (Valica) 12.1 212 == Credits ==
Jean-Vincent Drean 1.1 213
Clément Aubin 24.1 214 XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].

Get Connected