KeyboardShortcuts

Version 6.4 by Jean-Vincent Drean on 2009/12/10
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.

XWiki Keyboard Shortcuts

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

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

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

Keyboard shortcuts aren't available from the wysiwyg edit mode (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

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

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 ;)"); }, {'propagate':false} );

Try the snippet by pressing Ctrl+Alt+n. 

Complete documentation.

Removing 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, 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);
  }
//]]>
</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.

Tags:
   

Get Connected