Wiki source code of XWiki Keyboard Shortcuts

Version 11.2 by Eduard Moraru on 2010/07/14

Hide last authors
Thomas Mortagne 8.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
Jean-Vincent Drean 1.1 4
Silvia Macovei 2.1 5 **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.
Jean-Vincent Drean 1.1 6
Silvia Macovei 7.2 7 = Shortcuts =
Jean-Vincent Drean 1.1 8
Silvia Macovei 7.2 9 == View mode ==
Jean-Vincent Drean 1.1 10
Thomas Mortagne 8.1 11 {{info}}
12 View keyboard shortcuts are only available to advanced users, preventing simple users to get unexpected behavior when pressing keyboard keys by mistake
13 {{/info}}
Jean-Vincent Drean 1.1 14
Silvia Macovei 7.2 15 === Edit ===
Jean-Vincent Drean 1.1 16
Thomas Mortagne 8.1 17 (% style="width:400px;" %)
Silvia Macovei 2.3 18 |**e** |Edit the page using the default edition mode
19 |**k** |Edit the page in wiki edition mode
20 |**g** |Edit the page using the WYSIWYG editor
21 |**f** |Inline Form
22 |**r** |Edit page access rights
23 |**o** |Edit page objects
24 |**s** |Edit class
Jean-Vincent Drean 1.1 25
Thomas Mortagne 8.1 26 === Show ===
Jean-Vincent Drean 1.1 27
Thomas Mortagne 8.1 28 (% style="width:400px;" %)
Silvia Macovei 2.3 29 |**c** |Go to page comments
30 |**a** |Go to page attachments
31 |**h** |Go to page history
32 |**d** |View page wiki code
Jean-Vincent Drean 1.1 33
Silvia Macovei 7.2 34 === Actions ===
Jean-Vincent Drean 1.1 35
Thomas Mortagne 8.1 36 (% style="width:400px;" %)
Silvia Macovei 2.3 37 |**F2** |Rename page
38 |**Delete** |Delete page
Jean-Vincent Drean 1.1 39
Silvia Macovei 7.2 40 == Edit & inline mode ==
Jean-Vincent Drean 1.1 41
Thomas Mortagne 8.1 42 {{warning}}
43 Keyboard shortcuts aren't available from the wysiwyg edit mode (since the wysiwyg editor grabs all the key pressed events)
44 {{/warning}}
45
46 (% style="width:400px;" %)
Silvia Macovei 2.3 47 |**<Alt> + c** |Cancel edition
48 |**<Alt> + p** |Preview the page without saving
49 |**<Alt> + <Shift> + s** |Save and continue to edit the page
50 |**<Alt> + s** |Save and view the page
Jean-Vincent Drean 1.1 51
Silvia Macovei 7.2 52 == Preview mode ==
Jean-Vincent Drean 1.1 53
Thomas Mortagne 8.1 54 (% style="width:400px;" %)
Silvia Macovei 2.3 55 |**<Alt> + c** |Cancel edition
56 |**<Alt> + b** |Back to the edition
57 |**<Alt> + <Shift> + s** |Save and continue to edit the page
58 |**<Alt> + s** |Save and view the page
Jean-Vincent Drean 1.1 59
Silvia Macovei 11.1 60 == Annotations ==
61
62 (% style="width:400px;" %)
63 |**<Ctrl> + m** |Annotate a piece of text
64
Silvia Macovei 7.2 65 = Modifying keyboard shortcuts =
Jean-Vincent Drean 7.1 66
67 * Create a new page in your wiki, for example //XWiki.KeyboardShortcuts// and paste the following content inside:
Thomas Mortagne 8.1 68 {{code}}core.shortcuts.view.edit=e
Jean-Vincent Drean 7.1 69 core.shortcuts.view.wiki=k
70 core.shortcuts.view.wysiwyg=g
71 core.shortcuts.view.inline=f
72 core.shortcuts.view.rights=r
73 core.shortcuts.view.objects=o
74 core.shortcuts.view.class=s
75 core.shortcuts.view.comments=c
76 core.shortcuts.view.attachments=a
77 core.shortcuts.view.history=h
78 core.shortcuts.view.information=i
79 core.shortcuts.view.code=d
80 core.shortcuts.view.delete=Delete
81 core.shortcuts.view.rename=F2
82 core.shortcuts.edit.cancel=Alt+C
83 core.shortcuts.edit.backtoedit=Alt+B
84 core.shortcuts.edit.preview=Alt+P
85 core.shortcuts.edit.saveandcontinue=Alt+Shift+S
Thomas Mortagne 8.1 86 core.shortcuts.edit.saveandview=Alt+S{{/code}}
Jean-Vincent Drean 7.1 87 * Modify entries in this list at your convenience
88 * Save the page
89 * Go to the wiki administration into the "//Programming//" category
90 * At the bottom, add //XWiki.KeyboardShortcuts// to the "//Internationalization Document Bundles//" list
91
Silvia Macovei 7.2 92 = Adding your own shortcuts =
Jean-Vincent Drean 1.1 93
94 You can add your own keyboard shortcuts in a few javascript lines :
95
Thomas Mortagne 8.1 96 {{code language="html"}}
Jean-Vincent Drean 1.1 97 <script type="text/javascript">
98 //<![CDATA[
Jean-Vincent Drean 6.2 99 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
Jean-Vincent Drean 1.1 100 //]]>
101 </script>
Silvia Macovei 2.1 102 {{/code}}
Jean-Vincent Drean 1.1 103
Jean-Vincent Drean 6.1 104 {{html clean="false"}}
Jean-Vincent Drean 1.1 105 <script type="text/javascript">
Jean-Vincent Drean 6.2 106 shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
Jean-Vincent Drean 1.1 107 </script>
Jean-Vincent Drean 5.1 108 {{/html}}
109
Jean-Vincent Drean 6.2 110 Try the snippet by pressing Ctrl+Alt+n.
Jean-Vincent Drean 5.1 111
Silvia Macovei 2.1 112 [[Complete documentation>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].
Jean-Vincent Drean 1.1 113
Silvia Macovei 7.2 114 = Removing shortcuts =
Jean-Vincent Drean 1.1 115
116 To remove a shortcut adapt this snippet to your needs :
117
Thomas Mortagne 9.1 118 {{code language="html"}}
Jean-Vincent Drean 1.1 119 <script type="text/javascript">
120 //<![CDATA[
Jean-Vincent Drean 6.2 121 shortcut.remove("Ctrl+Alt+n");
Jean-Vincent Drean 1.1 122 //]]>
123 </script>
Silvia Macovei 2.1 124 {{/code}}
Jean-Vincent Drean 1.1 125
Jean-Vincent Drean 6.1 126 {{html clean="false"}}
Jean-Vincent Drean 1.1 127 <script type="text/javascript">
Jean-Vincent Drean 6.4 128 function removeCtrlAltN() {
Jean-Vincent Drean 6.2 129 shortcut.remove("Ctrl+Alt+n");
Jean-Vincent Drean 1.1 130 }
131 </script>
Jean-Vincent Drean 6.6 132 <a onclick="removeCtrlAltN(); return false;" href="#">Click here to try the snippet, it will remove the Ctrl+Alt+n shortcut</a>.
Jean-Vincent Drean 5.1 133 {{/html}}
Jean-Vincent Drean 1.1 134
Silvia Macovei 7.2 135 = Removing all shortcuts at once =
Jean-Vincent Drean 5.1 136
Thomas Mortagne 10.1 137 {{code language="html"}}
Jean-Vincent Drean 5.1 138 <script type="text/javascript">
139 //<![CDATA[
140 for (binding in shortcut.all_shortcuts) {
141 shortcut.remove(binding);
142 }
143 //]]>
144 </script>
145 {{/code}}
146
147 {{velocity}}
Jean-Vincent Drean 6.5 148 #if (!$isGuest && $isAdvancedUser)
Jean-Vincent Drean 6.1 149 {{html clean="false"}}
Jean-Vincent Drean 5.1 150 <script type="text/javascript">
151 //<![CDATA[
Jean-Vincent Drean 6.6 152 function removeAll() {
Jean-Vincent Drean 5.1 153 for (binding in shortcut.all_shortcuts) {
154 shortcut.remove(binding);
155 }
Jean-Vincent Drean 6.6 156 }
Jean-Vincent Drean 5.1 157 //]]>
158 </script>
Jean-Vincent Drean 6.6 159 <a onclick="removeAll(); return false;" href="#">Click here to try the snippet, it will disable all keyboard shortcuts</a>.
Jean-Vincent Drean 5.1 160 {{/html}}
161 #end
Silvia Macovei 7.3 162 {{/velocity}}
Jean-Vincent Drean 5.1 163
Silvia Macovei 7.2 164 = Credits =
Jean-Vincent Drean 1.1 165
Silvia Macovei 7.3 166 XWiki keyboard shortcuts are powered by [[openjs.org shortcut library>>http://www.openjs.com/scripts/events/keyboard_shortcuts]].

Get Connected