Wiki source code of XWiki Keyboard Shortcuts

Version 37.1 by slauriere on 2023/12/20

Show last authors
1 {{velocity}}
2 $xwiki.ssx.use("Features.KeyboardShortcuts")
3 {{/velocity}}
4
5 {{box cssClass="floatinginfobox" title="**Contents**"}}
6 {{toc/}}
7 {{/box}}
8
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.
10
11 = Using keyboard shortcuts =
12
13 == View Mode ==
14
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}}
18
19 === Edit Actions ===
20
21 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate edit actions" %)
22 |(% class="shortcut" %)(((
23 (% class="key" %)E
24 )))|Edit the page using the default edition mode
25 |(% class="shortcut" %)(((
26 (% class="key" %)K
27 )))|Edit the page in wiki edition mode
28 |(% class="shortcut" %)(((
29 (% class="key" %)G
30 )))|Edit the page using the WYSIWYG editor
31 |(% class="shortcut" %)(((
32 (% class="key" %)F
33 )))|Inline Form
34 |(% class="shortcut" %)(((
35 (% class="key" %)R
36 )))|Edit page access rights
37 |(% class="shortcut" %)(((
38 (% class="key" %)O
39 )))|Edit page objects
40 |(% class="shortcut" %)(((
41 (% class="key" %)S
42 )))|Edit class
43
44 === View Actions ===
45
46 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate view actions" %)
47 |(% class="shortcut" %)(((
48 (% class="key" %)C
49 )))|Go to page comments
50 |(% class="shortcut" %)(((
51 (% class="key" %)A
52 )))|Go to page attachments
53 |(% class="shortcut" %)(((
54 (% class="key" %)H
55 )))|Go to page history
56 |(% class="shortcut" %)(((
57 (% class="key" %)I
58 )))|Go to page information
59 |(% class="shortcut" %)(((
60 (% class="key" %)D
61 )))|View page wiki code
62
63 === Other Actions ===
64
65 (% class="keyboard" summary="Keyboard Shortcuts for View Mode in order to activate other actions" %)
66 |(% class="shortcut" %)(((
67 (% class="key" %)F2
68 )))|Rename page
69 |(% class="shortcut" %)(((
70 (% class="key" %)Delete
71 )))|Delete page
72
73 == Edit Mode ==
74
75 (% class="keyboard" summary="Keyboard Shortcuts for Edit Mode" %)
76 |(% class="shortcut" %)(((
77 (% class="key" %)Alt(%%) + (% class="key" %)C
78 )))|Cancel edition
79 |(% class="shortcut" %)(((
80 (% class="key" %)Alt(%%) + (% class="key" %)P
81 )))|Preview the page without saving
82 |(% class="shortcut" %)(((
83 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
84 )))|Save and continue to edit the page
85 |(% class="shortcut" %)(((
86 (% class="key" %)Alt(%%) + (% class="key" %)S
87 )))|Save and view the page
88
89 === WYSIWYG Edit Mode ===
90
91 See the [[WYSIWYG Editor keyboard shortcuts>>extensions:Extension.CKEditor Integration#HKeyboardShortcuts]].
92
93 == Preview Mode ==
94
95 (% class="keyboard" summary="Keyboard Shortcuts for Preview Mode" %)
96 |(% class="shortcut" %)(((
97 (% class="key" %)Alt(%%) + (% class="key" %)C
98 )))|Cancel edition
99 |(% class="shortcut" %)(((
100 (% class="key" %)Alt(%%) + (% class="key" %)B
101 )))|Back to the edition
102 |(% class="shortcut" %)(((
103 (% class="key" %)Alt(%%) + (% class="key" %)Shift(%%) + (% class="key" %)S
104 )))|Save and continue to edit the page
105 |(% class="shortcut" %)(((
106 (% class="key" %)Alt(%%) + (% class="key" %)S
107 )))|Save and view the page
108
109 == Annotations ==
110
111 (% class="keyboard" summary="Keyboard Shortcuts for Annotations" %)
112 |(% class="shortcut" %)(((
113 (% class="key" %)Ctrl(%%) + (% class="key" %)M(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)M(%%)
114 (% class="key" %)Ctrl(%%) + (% class="key" %)I(%%) (% class="separator" %)or(%%) (% class="key" %)Meta(%%) + (% class="key" %)I
115 )))|Annotate a piece of text
116 |(% class="shortcut" %)(((
117 (% class="key" %)Alt(%%) + (% class="key" %)A
118 )))|Show annotations
119
120 == Navigation ==
121
122 (% class="keyboard" summary="Keyboard Shortcuts for Navigation" %)
123 |(((
124 (% class="shortcut" %)
125 (((
126 (% class="key" %)Ctrl(%%) + (% class="key" %)G
127 )))
128
129 (% class="separator" %)or
130
131 (% class="shortcut" %)
132 (((
133 (% class="key" %)Meta(%%) + (% class="key" %)G
134 )))
135 )))|Jump to any page in the wiki
136
137 == Developer shortcuts ==
138
139 {{info}}Since 9.11{{/info}}, the following key sequences can be used to toggle specific actions on the current logged in user:
140
141 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
142 |(% class="shortcut" %)(((
143 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)a
144 )))|Toggle advanced user mode for the current user.
145
146 (% class="keyboard" summary="Keyboard Shortcuts for developers" %)
147 |(% class="shortcut" %)(((
148 (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)x(%%) (% class="key" %)h
149 )))|Toggle hidden pages for the current user.
150
151 = Configuring keyboard shortcuts =
152
153 == Modifying keyboard shortcuts ==
154
155 * Create a new page in your wiki, for example ##XWiki.KeyboardShortcuts## and paste the following content inside:(((
156 {{code language="text"}}
157 core.shortcuts.view.edit=e
158 core.shortcuts.view.wiki=k
159 core.shortcuts.view.wysiwyg=g
160 core.shortcuts.view.inline=f
161 core.shortcuts.view.rights=r
162 core.shortcuts.view.objects=o
163 core.shortcuts.view.class=s
164 core.shortcuts.view.comments=c
165 core.shortcuts.view.attachments=a
166 core.shortcuts.view.history=h
167 core.shortcuts.view.information=i
168 core.shortcuts.view.code=d
169 core.shortcuts.view.delete=Delete
170 core.shortcuts.view.rename=F2
171 core.shortcuts.edit.cancel=Alt+C
172 core.shortcuts.edit.backtoedit=Alt+B
173 core.shortcuts.edit.preview=Alt+P
174 core.shortcuts.edit.saveandcontinue=Alt+Shift+S
175 core.shortcuts.edit.saveandview=Alt+S
176 {{/code}}
177 )))
178 * Modify entries in this list at your convenience
179 * Save the page
180 * Edit the page in [[object mode>>Documentation.UserGuide.Features.PageEditing#HObjectseditingmode]] and add an ## XWiki.TranslationDocumentClass## xobject
181 ** 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}}
182
183 == Adding your own shortcuts ==
184
185 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:
186
187 {{code language="javascript"}}
188 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
189 {{/code}}
190
191 Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]].
192
193 == Removing keyboard shortcuts ==
194
195 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]]:
196
197 {{code language="javascript"}}
198 shortcut.remove("Ctrl+Alt+n");
199 {{/code}}
200
201 == Removing all shortcuts at once ==
202
203 {{code language="javascript"}}
204 for (binding in shortcut.all_shortcuts()) {
205 shortcut.remove(binding.keys.join(' '));
206 }
207 {{/code}}
208
209 == Credits ==
210
211 XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].

Get Connected