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

Get Connected