Wiki source code of KeyboardShortcuts

Version 3.1 by Jean-Vincent Drean on 2009/12/10

Show last authors
1 = XWiki Keyboard Shortcuts =
2
3 {{toc start=2 depth=6 numbered=false scope=page /}}
4
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.
6
7 == Shortcuts ==
8
9 === View mode ===
10
11 {{info}}View keyboard shortcuts are only available to advanced users, preventing simple users to get unexpected behavior when pressing keyboard keys by mistake{{/info}}
12
13 ==== Edit ====
14
15 {{velocity filter="none"}}
16 (% style="width:400px;"%)
17 |**e** |Edit the page using the default edition mode
18 |**k** |Edit the page in wiki edition mode
19 |**g** |Edit the page using the WYSIWYG editor
20 |**f** |Inline Form
21 |**r** |Edit page access rights
22 |**o** |Edit page objects
23 |**s** |Edit class
24
25 ==== Show ====
26
27 (% style="width:400px;"%)
28 |**c** |Go to page comments
29 |**a** |Go to page attachments
30 |**h** |Go to page history
31 |**d** |View page wiki code
32
33 ==== Actions ====
34
35 (% style="width:400px;"%)
36 |**F2** |Rename page
37 |**Delete** |Delete page
38
39 === Edit & inline mode ===
40
41 {{warning}}Keyboard shortcuts aren't available from the wysiwyg edit mode (since the wysiwyg editor grabs all the key pressed events){{/warning}}
42 (% style="width:400px;"%)
43 |**<Alt> + c** |Cancel edition
44 |**<Alt> + p** |Preview the page without saving
45 |**<Alt> + <Shift> + s** |Save and continue to edit the page
46 |**<Alt> + s** |Save and view the page
47
48 === Preview mode ===
49
50 (% style="width:400px;"%)
51 |**<Alt> + c** |Cancel edition
52 |**<Alt> + b** |Back to the edition
53 |**<Alt> + <Shift> + s** |Save and continue to edit the page
54 |**<Alt> + s** |Save and view the page
55
56 == Adding your own shortcuts ==
57
58 You can add your own keyboard shortcuts in a few javascript lines :
59
60 {{code language="javascript"}}
61 <script type="text/javascript">
62 //<![CDATA[
63 shortcut.add("Ctrl+Alt+Shift+N", function() { alert("Hey there! Congratulations on typing this one ;)"); });
64 //]]>
65 </script>
66 {{/code}}
67
68 {{html}}
69 <script type="text/javascript">
70 shortcut.add("Ctrl+Alt+Shift+N", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
71 </script>
72 {{/html}}
73
74 Try the snippet by pressing Ctrl+Alt+N.
75
76 [[Complete documentation>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].
77
78 == Removing shortcuts ==
79
80 To remove a shortcut adapt this snippet to your needs :
81
82 {{code language="javascript"}}
83 <script type="text/javascript">
84 //<![CDATA[
85 shortcut.remove("Ctrl+Alt+Shift+N");
86 //]]>
87 </script>
88 {{/code}}
89
90 {{html}}
91 <script type="text/javascript">
92 funtion removeCtrlAltShiftN() {
93 shortcut.remove("Ctrl+Alt+Shift+N");
94 }
95 </script>
96 <a onclick="removeCtrlAltShiftN();">Click here to try the snippet, will remove the Ctrl+Alt+Shift+N shortcut</a>.
97 {{/html}}
98
99 == Removing all shortcuts at once ==
100
101 = XWiki Keyboard Shortcuts =
102
103 {{toc start=2 depth=6 numbered=false scope=page /}}
104
105 **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.
106
107 == Shortcuts ==
108
109 === View mode ===
110
111 {{info}}View keyboard shortcuts are only available to advanced users, preventing simple users to get unexpected behavior when pressing keyboard keys by mistake{{/info}}
112
113 ==== Edit ====
114
115 {{velocity filter="none"}}
116 (% style="width:400px;"%)
117 |**e** |Edit the page using the default edition mode
118 |**k** |Edit the page in wiki edition mode
119 |**g** |Edit the page using the WYSIWYG editor
120 |**f** |Inline Form
121 |**r** |Edit page access rights
122 |**o** |Edit page objects
123 |**s** |Edit class
124
125 ==== Show ====
126
127 (% style="width:400px;"%)
128 |**c** |Go to page comments
129 |**a** |Go to page attachments
130 |**h** |Go to page history
131 |**d** |View page wiki code
132
133 ==== Actions ====
134
135 (% style="width:400px;"%)
136 |**F2** |Rename page
137 |**Delete** |Delete page
138
139 === Edit & inline mode ===
140
141 {{warning}}Keyboard shortcuts aren't available from the wysiwyg edit mode (since the wysiwyg editor grabs all the key pressed events){{/warning}}
142 (% style="width:400px;"%)
143 |**<Alt> + c** |Cancel edition
144 |**<Alt> + p** |Preview the page without saving
145 |**<Alt> + <Shift> + s** |Save and continue to edit the page
146 |**<Alt> + s** |Save and view the page
147
148 === Preview mode ===
149
150 (% style="width:400px;"%)
151 |**<Alt> + c** |Cancel edition
152 |**<Alt> + b** |Back to the edition
153 |**<Alt> + <Shift> + s** |Save and continue to edit the page
154 |**<Alt> + s** |Save and view the page
155
156 == Adding your own shortcuts ==
157
158 You can add your own keyboard shortcuts in a few javascript lines :
159
160 {{code language="javascript"}}
161 <script type="text/javascript">
162 //<![CDATA[
163 shortcut.add("Ctrl+Alt+Shift+N", function() { alert("Hey there! Congratulations on typing this one ;)"); });
164 //]]>
165 </script>
166 {{/code}}
167
168 {{html}}
169 <script type="text/javascript">
170 shortcut.add("Ctrl+Alt+Shift+N", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
171 </script>
172 {{/html}}
173
174 Try the snippet by pressing Ctrl+Alt+N.
175
176 [[Complete documentation>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].
177
178 == Removing shortcuts ==
179
180 To remove a shortcut adapt this snippet to your needs :
181
182 {{code language="javascript"}}
183 <script type="text/javascript">
184 //<![CDATA[
185 for (binding in shortcut.all_shortcuts) {
186 shortcut.remove(binding);
187 }
188 //]]>
189 </script>
190 {{/code}}
191
192 {{velocity}}
193 #if (!$isGuest)
194 {{html}}
195 <script type="text/javascript">
196 funtion removeCtrlAltShiftN() {
197 shortcut.remove("Ctrl+Alt+Shift+N");
198 }
199 </script>
200 <a onclick="removeCtrlAltShiftN();">Click here to try the snippet, will remove the Ctrl+Alt+Shift+N shortcut</a>.
201 {{/html}}
202 #end
203 {{velocity}}
204
205 == i18n ==
206
207 All the core XWiki shortcuts can be modified in the xwiki-core application resources (core.shortcuts.*)
208
209 == Credits ==
210
211 XWiki keyboard shortcuts are powered by [[openjs.org shortcut library>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].

Get Connected