Changes for page XWiki Keyboard Shortcuts

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

From version 31.1
edited by Ecaterina Moraru (Valica)
on 2020/01/28
Change comment: Migrated property [author] from class [XWiki.XWikiComments]
To version 32.1
edited by Vincent Massol
on 2020/04/05
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.evalica
1 +XWiki.VincentMassol
Content
... ... @@ -6,7 +6,7 @@
6 6  {{toc/}}
7 7  {{/box}}
8 8  
9 -**Since XWiki version 1.4M1**, 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.
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 10  
11 11  = Using keyboard shortcuts =
12 12  
... ... @@ -228,54 +228,21 @@
228 228  
229 229  == Removing keyboard shortcuts ==
230 230  
231 -To remove a shortcut adapt this snippet to your needs :
231 +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]]:
232 232  
233 -{{code language="html"}}
234 -<script type="text/javascript">
235 -//<![CDATA[
236 - shortcut.remove("Ctrl+Alt+n");
237 -//]]>
238 -</script>
233 +{{code language='javascript'}}
234 +shortcut.remove("Ctrl+Alt+n");
239 239  {{/code}}
240 240  
241 -{{html clean="false"}}
242 -<script type="text/javascript">
243 -function removeCtrlAltN() {
244 - shortcut.remove("Ctrl+Alt+n");
245 -}
246 -</script>
247 -<a onclick="removeCtrlAltN(); return false;" href="#">Click here to try the snippet, it will remove the Ctrl+Alt+n shortcut</a>.
248 -{{/html}}
249 -
250 250  == Removing all shortcuts at once ==
251 251  
252 -{{code language="html"}}
253 -<script type="text/javascript">
254 -//<![CDATA[
255 - for (binding in shortcut.all_shortcuts()) {
256 - shortcut.remove(binding.keys.join(' '));
257 - }
258 -//]]>
239 +{{code language='javascript'}}
240 +for (binding in shortcut.all_shortcuts()) {
241 + shortcut.remove(binding.keys.join(' '));
242 +}
259 259  </script>
260 260  {{/code}}
261 261  
262 -{{velocity}}
263 -#if (!$isGuest && $isAdvancedUser)
264 -{{html clean="false"}}
265 -<script type="text/javascript">
266 -//<![CDATA[
267 -function removeAll() {
268 - for (binding in shortcut.all_shortcuts()) {
269 - shortcut.remove(binding.keys.join(' '));
270 - }
271 -}
272 -//]]>
273 -</script>
274 -<a onclick="removeAll(); return false;" href="#">Click here to try the snippet, it will disable all keyboard shortcuts</a>.
275 -{{/html}}
276 -#end
277 -{{/velocity}}
278 -
279 279  == Credits ==
280 280  
281 281  XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].

Get Connected