Wiki source code of XWiki Keyboard Shortcuts

Last modified by Lucas Charpentier (Sereza7) on 2024/02/27

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
Marius Dumitru Florea 36.1 78 (% class="keyboard" summary="Keyboard Shortcuts for Edit Mode" %)
Vincent Massol 33.1 79 |(% class="shortcut" %)(((
Sorin Burjan 12.4 80 (% class="key" %)Alt(%%) + (% class="key" %)C
81 )))|Cancel edition
Vincent Massol 33.1 82 |(% class="shortcut" %)(((
Sorin Burjan 12.4 83 (% class="key" %)Alt(%%) + (% class="key" %)P
84 )))|Preview the page without saving
Vincent Massol 33.1 85 |(% class="shortcut" %)(((
Sorin Burjan 12.4 86 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
87 )))|Save and continue to edit the page
Vincent Massol 33.1 88 |(% class="shortcut" %)(((
Sorin Burjan 12.4 89 (% class="key" %)Alt(%%) + (% class="key" %)S
90 )))|Save and view the page
Jean-Vincent Drean 1.1 91
Vincent Massol 36.2 92 === WYSIWYG Edit Mode ===
Jean-Vincent Drean 1.1 93
Vincent Massol 36.2 94 See the [[WYSIWYG Editor keyboard shortcuts>>extensions:Extension.CKEditor Integration#HKeyboardShortcuts]].
95
Ecaterina Moraru (Valica) 12.1 96 == Preview Mode ==
97
98 (% class="keyboard" summary="Keyboard Shortcuts for Preview Mode" %)
Vincent Massol 33.1 99 |(% class="shortcut" %)(((
Sorin Burjan 12.4 100 (% class="key" %)Alt(%%) + (% class="key" %)C
Eduard Moraru 13.2 101 )))|Cancel edition
Vincent Massol 33.1 102 |(% class="shortcut" %)(((
Sorin Burjan 12.4 103 (% class="key" %)Alt(%%) + (% class="key" %)B
Eduard Moraru 13.2 104 )))|Back to the edition
Vincent Massol 33.1 105 |(% class="shortcut" %)(((
Sorin Burjan 12.4 106 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
Eduard Moraru 13.2 107 )))|Save and continue to edit the page
Vincent Massol 33.1 108 |(% class="shortcut" %)(((
Sorin Burjan 12.4 109 (% class="key" %)Alt(%%) + (% class="key" %)S
Eduard Moraru 13.2 110 )))|Save and view the page
Ecaterina Moraru (Valica) 12.1 111
Silvia Macovei 11.1 112 == Annotations ==
113
Ecaterina Moraru (Valica) 12.1 114 (% class="keyboard" summary="Keyboard Shortcuts for Annotations" %)
Vincent Massol 33.1 115 |(% class="shortcut" %)(((
Eduard Moraru 13.3 116 (% class="key" %)Ctrl(%%) + (% class="key" %)M(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)M(%%)
117 (% class="key" %)Ctrl(%%) + (% class="key" %)I(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)I
Eduard Moraru 13.2 118 )))|Annotate a piece of text
Vincent Massol 33.1 119 |(% class="shortcut" %)(((
Ecaterina Moraru (Valica) 29.3 120 (% class="key" %)Alt(%%) + (% class="key" %)A
121 )))|Show annotations
Silvia Macovei 11.1 122
Ecaterina Moraru (Valica) 12.1 123 == Navigation ==
Jean-Vincent Drean 7.1 124
Ecaterina Moraru (Valica) 12.1 125 (% class="keyboard" summary="Keyboard Shortcuts for Navigation" %)
Lucas Charpentier (Sereza7) 40.1 126 |(% class="shortcut" %)(((
127 (% class="key" %)Ctrl(%%) + (% class="key" %)G(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)G(%%)
128 (% class="key" %)Ctrl(%%) + (% class="key" %)/(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)/(%%)
Sorin Burjan 12.4 129 )))|Jump to any page in the wiki
Ecaterina Moraru (Valica) 12.1 130
Clément Aubin 24.1 131 == Developer shortcuts ==
132
Clément Aubin 26.1 133 {{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 134
135 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
Vincent Massol 33.1 136 |(% class="shortcut" %)(((
Clément Aubin 24.1 137 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)a
138 )))|Toggle advanced user mode for the current user.
139
140 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
Vincent Massol 33.1 141 |(% class="shortcut" %)(((
Clément Aubin 24.1 142 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)h
143 )))|Toggle hidden pages for the current user.
144
Ecaterina Moraru (Valica) 12.1 145 = Configuring keyboard shortcuts =
146
147 == Modifying keyboard shortcuts ==
148
Vincent Massol 29.2 149 * Create a new page in your wiki, for example ##XWiki.KeyboardShortcuts## and paste the following content inside:(((
slauriere 37.1 150 {{code language="text"}}
Sorin Burjan 12.4 151 core.shortcuts.view.edit=e
Jean-Vincent Drean 7.1 152 core.shortcuts.view.wiki=k
153 core.shortcuts.view.wysiwyg=g
154 core.shortcuts.view.inline=f
155 core.shortcuts.view.rights=r
156 core.shortcuts.view.objects=o
157 core.shortcuts.view.class=s
158 core.shortcuts.view.comments=c
159 core.shortcuts.view.attachments=a
160 core.shortcuts.view.history=h
161 core.shortcuts.view.information=i
162 core.shortcuts.view.code=d
Clément Aubin 21.2 163 core.shortcuts.view.delete=Delete
164 core.shortcuts.view.rename=F2
165 core.shortcuts.edit.cancel=Alt+C
166 core.shortcuts.edit.backtoedit=Alt+B
167 core.shortcuts.edit.preview=Alt+P
168 core.shortcuts.edit.saveandcontinue=Alt+Shift+S
169 core.shortcuts.edit.saveandview=Alt+S
Sorin Burjan 12.4 170 {{/code}}
171 )))
Jean-Vincent Drean 7.1 172 * Modify entries in this list at your convenience
173 * Save the page
Vincent Massol 34.1 174 * Edit the page in [[object mode>>Documentation.UserGuide.Features.PageEditing#HObjectseditingmode]] and add an ## XWiki.TranslationDocumentClass## xobject
175 ** 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 176
Ecaterina Moraru (Valica) 12.1 177 == Adding your own shortcuts ==
Jean-Vincent Drean 1.1 178
Vincent Massol 35.1 179 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 180
Vincent Massol 35.1 181 {{code language="javascript"}}
182 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
Silvia Macovei 2.1 183 {{/code}}
Jean-Vincent Drean 1.1 184
Clément Aubin 24.1 185 Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]].
Jean-Vincent Drean 1.1 186
Ecaterina Moraru (Valica) 12.1 187 == Removing keyboard shortcuts ==
Jean-Vincent Drean 1.1 188
Vincent Massol 32.1 189 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 190
Vincent Massol 32.2 191 {{code language="javascript"}}
Vincent Massol 32.1 192 shortcut.remove("Ctrl+Alt+n");
Silvia Macovei 2.1 193 {{/code}}
Jean-Vincent Drean 1.1 194
Ecaterina Moraru (Valica) 12.1 195 == Removing all shortcuts at once ==
Jean-Vincent Drean 5.1 196
Vincent Massol 32.2 197 {{code language="javascript"}}
Vincent Massol 32.1 198 for (binding in shortcut.all_shortcuts()) {
199 shortcut.remove(binding.keys.join(' '));
200 }
Jean-Vincent Drean 5.1 201 {{/code}}
202
Ecaterina Moraru (Valica) 12.1 203 == Credits ==
Jean-Vincent Drean 1.1 204
Clément Aubin 24.1 205 XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].

Get Connected