XWiki Keyboard Shortcuts
Contents
Since XWiki Enterprise 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.
Shortcuts
View mode
Edit
| e | Edit the page using the default edition mode |
| k | Edit the page in wiki edition mode |
| g | Edit the page using the WYSIWYG editor |
| f | Inline Form |
| r | Edit page access rights |
| o | Edit page objects |
| s | Edit class |
Show
| c | Go to page comments |
| a | Go to page attachments |
| h | Go to page history |
| d | View page wiki code |
Actions
| F2 | Rename page |
| Delete | Delete page |
Edit & inline mode
| <Alt> + c | Cancel edition |
| <Alt> + p | Preview the page without saving |
| <Alt> + <Shift> + s | Save and continue to edit the page |
| <Alt> + s | Save and view the page |
Preview mode
| <Alt> + c | Cancel edition |
| <Alt> + b | Back to the edition |
| <Alt> + <Shift> + s | Save and continue to edit the page |
| <Alt> + s | Save and view the page |
Modifying keyboard shortcuts
- Create a new page in your wiki, for example XWiki.KeyboardShortcuts and paste the following content inside:
core.shortcuts.view.edit=e
core.shortcuts.view.wiki=k
core.shortcuts.view.wysiwyg=g
core.shortcuts.view.inline=f
core.shortcuts.view.rights=r
core.shortcuts.view.objects=o
core.shortcuts.view.class=s
core.shortcuts.view.comments=c
core.shortcuts.view.attachments=a
core.shortcuts.view.history=h
core.shortcuts.view.information=i
core.shortcuts.view.code=d
core.shortcuts.view.delete=Delete
core.shortcuts.view.rename=F2
core.shortcuts.edit.cancel=Alt+C
core.shortcuts.edit.backtoedit=Alt+B
core.shortcuts.edit.preview=Alt+P
core.shortcuts.edit.saveandcontinue=Alt+Shift+S
core.shortcuts.edit.saveandview=Alt+S - Modify entries in this list at your convenience
- Save the page
- Go to the wiki administration into the "Programming" category
- At the bottom, add XWiki.KeyboardShortcuts to the "Internationalization Document Bundles" list
Adding your own shortcuts
You can add your own keyboard shortcuts in a few javascript lines :
<script type="text/javascript">
//<![CDATA[
shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
//]]>
</script>
//<![CDATA[
shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
//]]>
</script>
Try the snippet by pressing Ctrl+Alt+n.
Removing shortcuts
To remove a shortcut adapt this snippet to your needs :
<script type="text/javascript">
//<![CDATA[
shortcut.remove("Ctrl+Alt+n");
//]]>
</script>
Click here to try the snippet, it will remove the Ctrl+Alt+n shortcut.//<![CDATA[
shortcut.remove("Ctrl+Alt+n");
//]]>
</script>
Removing all shortcuts at once
<script type="text/javascript">
//<![CDATA[
for (binding in shortcut.all_shortcuts) {
shortcut.remove(binding);
}
//]]>
</script>
//<![CDATA[
for (binding in shortcut.all_shortcuts) {
shortcut.remove(binding);
}
//]]>
</script>
Credits
XWiki keyboard shortcuts are powered by openjs.org shortcut library.