Wiki source code of Change the Default Keyboard Shortcuts
Last modified by Eleni Cojocariu on 2026/10/05 14:00
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
![]() |
5.1 | 1 | Rebind any [[keyboard shortcut>>doc:documentation.xs.user.base.page.view.keyboard-shortcuts.WebHome]] of your wiki by overriding the translation keys that define it, which needs the Admin right on the wiki. |
| 2 | |||
| 3 | 1. Create a page, for example ##XWiki.KeyboardShortcuts##, and paste the default keys into its content:((( | ||
| 4 | {{code language="properties"}} | ||
| 5 | core.shortcuts.view.edit=e | ||
| 6 | core.shortcuts.view.wiki=k | ||
| 7 | core.shortcuts.view.wysiwyg=g | ||
| 8 | core.shortcuts.view.inline=f | ||
| 9 | core.shortcuts.view.rights=r | ||
| 10 | core.shortcuts.view.objects=o | ||
| 11 | core.shortcuts.view.class=s | ||
| 12 | core.shortcuts.view.comments=c | ||
| 13 | core.shortcuts.view.attachments=a | ||
| 14 | core.shortcuts.view.history=h | ||
| 15 | core.shortcuts.view.information=i | ||
| 16 | core.shortcuts.view.code=d | ||
| 17 | core.shortcuts.view.annotations=n | ||
| 18 | core.shortcuts.view.delete=Delete | ||
| 19 | core.shortcuts.view.rename=F2 | ||
| 20 | core.shortcuts.edit.cancel=Alt+C | ||
| 21 | core.shortcuts.edit.backtoedit=Alt+B | ||
| 22 | core.shortcuts.edit.preview=Alt+P | ||
| 23 | core.shortcuts.edit.save=Alt+Shift+S | ||
| 24 | core.shortcuts.edit.saveandview=Alt+S | ||
| 25 | core.shortcuts.developer.user.type=x+x+x+a | ||
| 26 | core.shortcuts.developer.user.displayHiddenDocs=x+x+x+h | ||
| 27 | {{/code}} | ||
| 28 | ))) | ||
| 29 | 1. Change the value of each shortcut you want to rebind, for example ##core.shortcuts.view.comments=m## to reach the "Comments" tab with ##M## instead of ##C##. | ||
| 30 | 1. Click "Save". | ||
| 31 | 1. Edit the page [[with the Object editor>>doc:documentation.xs.user.base.page.edit.edit-object-editor.WebHome]] and add an ##XWiki.TranslationDocumentClass## object:((( | ||
| 32 | {{image reference="add-translation-object.png" size="large" alt="The object editor's New object field, with XWiki.TranslationDocumentClass selected in the open list"/}} | ||
| 33 | ))) | ||
| 34 | 1. Set the object's "Scope" to ##WIKI##, so that the new keys apply to every user of the wiki:((( | ||
| 35 | {{image reference="translation-scope-wiki.png" size="large" alt="The Scope field of the translation object, set to WIKI"/}} | ||
| 36 | ))) | ||
| 37 | 1. Click "Save". | ||
| 38 | 1. Press a key you rebound. It works straight away, with no cache to flush, and in this example ##M## opens the "Comments" tab:((( | ||
| 39 | {{image reference="comments-tab-opened.png" size="large" alt="The page extra area with the Comments tab active next to the Attachments, History and Information tabs"/}} | ||
| 40 | ))) |
