XWiki Keyboard Shortcuts

Version 22.2 by Clément Aubin on 2017/11/07
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Documentation.UserGuide.Features.KeyboardShortcuts]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

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.

Using keyboard shortcuts

View Mode

View keyboard shortcuts are only available to advanced users, preventing simple users to get unexpected behavior when pressing keyboard keys by mistake

a) Edit Actions

 

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

b) View Actions

 

C

Go to page comments
 

A

Go to page attachments
 

H

Go to page history
 

I

Go to page information
 

D

View page wiki code

c) Other Actions

 

F2

Rename page
 

Delete

Delete page

Edit Wiki & Edit Inline Mode

While in Inline Edit mode and focusing on a WYSIWYG edit area, the keyboard shortcuts listed below  won't work since the WYSIWYG editor grabs all the key pressed events.

 

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

Edit WYSIWYG Mode

Failed to execute the [include] macro. Cause: [Error number 2 in 0: No wiki with id [platform] could be found]. Click on this message for details.

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

Annotations

 

Ctrl + M or Meta + M
Ctrl + I or Meta + I

Annotate a piece of text

Navigation

 

Ctrl + G

or 

Meta + G

Jump to any page in the wiki 

Developer shortcuts

The following key sequences can be used to toggle specific actions on the current logged in user:

 

x x x a

Toggle advanced user mode for the current user.
 

x x x h

Toggle hidden pages for the current user.

Configuring keyboard shortcuts

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>
  shortcut.add("Ctrl+Alt+N", function() { alert("Hey there! Congratulations on typing this one ;)"); });

Try the snippet by pressing Ctrl + Alt + n.

Also check the complete documentation.

Removing keyboard shortcuts

To remove a shortcut adapt this snippet to your needs :

<script type="text/javascript">
//<![CDATA[
 shortcut.remove("Ctrl+Alt+N");
//]]>
</script>
function removeCtrlAltN() {
  shortcut.remove("Ctrl+Alt+N");
}

Click here to try the snippet, it will remove the Ctrl+Alt+n shortcut.

Removing all shortcuts at once

<script type="text/javascript">
//<![CDATA[
 for (binding in shortcut.all_shortcuts()) {
    shortcut.remove(binding.keys.join(' '));
  }
//]]>
</script>

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Documentation.UserGuide.Features.KeyboardShortcuts]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Credits

XWiki keyboard shortcuts are powered by Keypress JS shortcut library.

Tags:
   

Get Connected