Wiki source code of KeyboardShortcuts

Version 1.2 by Silvia Macovei on 2009/09/25

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

Get Connected