Wiki source code of XWiki Keyboard Shortcuts
Last modified by Eleni Cojocariu on 2026/06/02 15:58
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
12.4 | 1 | {{velocity}} |
| 2 | $xwiki.ssx.use("Features.KeyboardShortcuts") | ||
| 3 | {{/velocity}} | ||
| |
12.1 | 4 | |
![]() |
8.1 | 5 | {{box cssClass="floatinginfobox" title="**Contents**"}} |
| 6 | {{toc/}} | ||
| 7 | {{/box}} | ||
| |
1.1 | 8 | |
| |
12.1 | 9 | = Using keyboard shortcuts = |
| |
1.1 | 10 | |
![]() |
47.41 | 11 | See [[Keyboard Shortcuts Available when Viewing a Page (for Users)>>xwiki:documentation.xs.user.base.page.view-page.keyboard-shortcuts-viewing-page.WebHome]]. |
![]() |
47.42 | 12 | See [[Keyboard Shortcuts Available when Viewing a Page (for Administrators)>>xwiki:documentation.xs.admin.base.page.keyboard-shortcuts-viewing-page.WebHome]]. |
| |
1.1 | 13 | |
![]() |
43.1 | 14 | {{id name="WYSIWYGEditMode"/}} |
![]() |
46.2 | 15 | |
![]() |
36.1 | 16 | == Edit Mode == |
| |
1.1 | 17 | |
![]() |
47.39 | 18 | See [[Keyboard Shortcuts Available when Editing a Page>>xwiki:documentation.xs.user.base.page.edit-page.keyboard-shortcuts-editing-page.WebHome]] |
![]() |
41.1 | 19 | |
| |
12.1 | 20 | == Preview Mode == |
| 21 | |||
![]() |
47.40 | 22 | See [[Keyboard Shortcuts Available when Previewing a Page>>xwiki:documentation.xs.user.base.page.edit-page.keyboard-shortcuts-previewing-page.WebHome]]. |
![]() |
41.1 | 23 | |
![]() |
11.1 | 24 | == Annotations == |
| 25 | |||
![]() |
47.41 | 26 | See [[Keyboard Shortcuts Available when Viewing a Page (for Users)>>xwiki:documentation.xs.user.base.page.view-page.keyboard-shortcuts-viewing-page.WebHome]]. |
![]() |
11.1 | 27 | |
| |
12.1 | 28 | == Navigation == |
| |
7.1 | 29 | |
![]() |
47.30 | 30 | See [[Keyboard Shortcuts for Navigation>>xwiki:documentation.xs.user.base.page.all-ways-navigate-page.keyboard-shortcuts-navigation.WebHome]]. |
| |
12.1 | 31 | |
| |
24.1 | 32 | == Developer shortcuts == |
| 33 | |||
![]() |
47.33 | 34 | See [[Global Keyboard Shortcuts>>xwiki:documentation.xs.user.base.page.global-keyboard-shortcurts.WebHome]]. |
| |
24.1 | 35 | |
| |
12.1 | 36 | = Configuring keyboard shortcuts = |
| 37 | |||
| 38 | == Modifying keyboard shortcuts == | ||
| 39 | |||
![]() |
29.2 | 40 | * Create a new page in your wiki, for example ##XWiki.KeyboardShortcuts## and paste the following content inside:((( |
![]() |
37.1 | 41 | {{code language="text"}} |
| |
12.4 | 42 | core.shortcuts.view.edit=e |
| |
7.1 | 43 | core.shortcuts.view.wiki=k |
| 44 | core.shortcuts.view.wysiwyg=g | ||
| 45 | core.shortcuts.view.inline=f | ||
| 46 | core.shortcuts.view.rights=r | ||
| 47 | core.shortcuts.view.objects=o | ||
| 48 | core.shortcuts.view.class=s | ||
| 49 | core.shortcuts.view.comments=c | ||
| 50 | core.shortcuts.view.attachments=a | ||
| 51 | core.shortcuts.view.history=h | ||
| 52 | core.shortcuts.view.information=i | ||
| 53 | core.shortcuts.view.code=d | ||
![]() |
47.43 | 54 | core.shortcuts.view.annotations=n |
| |
21.2 | 55 | core.shortcuts.view.delete=Delete |
| 56 | core.shortcuts.view.rename=F2 | ||
| 57 | core.shortcuts.edit.cancel=Alt+C | ||
| 58 | core.shortcuts.edit.backtoedit=Alt+B | ||
| 59 | core.shortcuts.edit.preview=Alt+P | ||
| 60 | core.shortcuts.edit.saveandcontinue=Alt+Shift+S | ||
| 61 | core.shortcuts.edit.saveandview=Alt+S | ||
| |
12.4 | 62 | {{/code}} |
| 63 | ))) | ||
| |
7.1 | 64 | * Modify entries in this list at your convenience |
| 65 | * Save the page | ||
![]() |
34.1 | 66 | * Edit the page in [[object mode>>Documentation.UserGuide.Features.PageEditing#HObjectseditingmode]] and add an ## XWiki.TranslationDocumentClass## xobject |
| 67 | ** 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}} | ||
| |
7.1 | 68 | |
| |
12.1 | 69 | == Adding your own shortcuts == |
| |
1.1 | 70 | |
![]() |
35.1 | 71 | 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: |
| |
1.1 | 72 | |
![]() |
35.1 | 73 | {{code language="javascript"}} |
| 74 | shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }); | ||
![]() |
2.1 | 75 | {{/code}} |
| |
1.1 | 76 | |
| |
24.1 | 77 | Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]]. |
| |
1.1 | 78 | |
| |
12.1 | 79 | == Removing keyboard shortcuts == |
| |
1.1 | 80 | |
![]() |
32.1 | 81 | 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]]: |
| |
1.1 | 82 | |
![]() |
32.2 | 83 | {{code language="javascript"}} |
![]() |
32.1 | 84 | shortcut.remove("Ctrl+Alt+n"); |
![]() |
2.1 | 85 | {{/code}} |
| |
1.1 | 86 | |
| |
12.1 | 87 | == Removing all shortcuts at once == |
| |
5.1 | 88 | |
![]() |
32.2 | 89 | {{code language="javascript"}} |
![]() |
32.1 | 90 | for (binding in shortcut.all_shortcuts()) { |
| 91 | shortcut.remove(binding.keys.join(' ')); | ||
| 92 | } | ||
| |
5.1 | 93 | {{/code}} |
| 94 | |||
| |
12.1 | 95 | == Credits == |
| |
1.1 | 96 | |
| |
24.1 | 97 | XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]]. |






