Wiki source code of KeyboardShortcuts

Version 2.5 by Silvia Macovei on 2009/10/08

Hide last authors
Silvia Macovei 2.1 1 = XWiki Keyboard Shortcuts =
Jean-Vincent Drean 1.1 2
Silvia Macovei 2.4 3 {{toc start=2 depth=6 numbered=false scope=page /}}
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 2.1 7 == Shortcuts ==
Jean-Vincent Drean 1.1 8
Silvia Macovei 2.1 9 === View mode ===
Jean-Vincent Drean 1.1 10
Silvia Macovei 2.1 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}}
Jean-Vincent Drean 1.1 12
Silvia Macovei 2.1 13 ==== Edit ====
Jean-Vincent Drean 1.1 14
Silvia Macovei 2.1 15 {{velocity filter="none"}}
Silvia Macovei 2.3 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
Jean-Vincent Drean 1.1 24
Silvia Macovei 2.1 25 ==== Show ====
Jean-Vincent Drean 1.1 26
Silvia Macovei 2.3 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
Jean-Vincent Drean 1.1 32
Silvia Macovei 2.1 33 ==== Actions ====
Jean-Vincent Drean 1.1 34
Silvia Macovei 2.3 35 (% style="width:400px;"%)
36 |**F2** |Rename page
37 |**Delete** |Delete page
Jean-Vincent Drean 1.1 38
Silvia Macovei 2.1 39 === Edit & inline mode ===
Jean-Vincent Drean 1.1 40
Silvia Macovei 2.1 41 {{warning}}Keyboard shortcuts aren't available from the wysiwyg edit mode (since the wysiwyg editor grabs all the key pressed events){{/warning}}
Silvia Macovei 2.3 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
Jean-Vincent Drean 1.1 47
Silvia Macovei 2.1 48 === Preview mode ===
Jean-Vincent Drean 1.1 49
Silvia Macovei 2.3 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
Jean-Vincent Drean 1.1 55
Silvia Macovei 2.1 56 == Adding your own shortcuts ==
Jean-Vincent Drean 1.1 57
58 You can add your own keyboard shortcuts in a few javascript lines :
59
Silvia Macovei 2.1 60 {{code language="javascript"}}
Jean-Vincent Drean 1.1 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>
Silvia Macovei 2.1 66 {{/code}}
Jean-Vincent Drean 1.1 67
68 ## commented since XWiki.org version < 1.4
69 #*
70 {pre}
71 <script type="text/javascript">
72 shortcut.add("Ctrl+Alt+Shift+N", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
73 </script>
74 {/pre}
75 Try the snippet by pressing Ctrl+Alt+N.
76 *#
Silvia Macovei 2.1 77 [[Complete documentation>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].
Jean-Vincent Drean 1.1 78
Silvia Macovei 2.1 79 == Removing shortcuts ==
Jean-Vincent Drean 1.1 80
81 To remove a shortcut adapt this snippet to your needs :
82
Silvia Macovei 2.1 83 {{code language="javascript"}}
Jean-Vincent Drean 1.1 84 <script type="text/javascript">
85 //<![CDATA[
86 shortcut.remove("Ctrl+Alt+Shift+N");
87 //]]>
88 </script>
Silvia Macovei 2.1 89 {{/code}}
Jean-Vincent Drean 1.1 90
91 ## commented since XWiki.org version < 1.4
92 #*
93 {pre}
94 <script type="text/javascript">
95 funtion removeCtrlAltShiftN() {
96 shortcut.remove("Ctrl+Alt+Shift+N");
97 }
98 </script>
99 {/pre}
100
101 <a onclick="removeCtrlAltShiftN();">Click here to try the snippet, will remove the Ctrl+Alt+Shift+N shortcut</a>.
102 *#
Silvia Macovei 2.1 103 {{/velocity}}
Jean-Vincent Drean 1.1 104
Silvia Macovei 2.1 105 == i18n ==
Jean-Vincent Drean 1.1 106
107 All the core XWiki shortcuts can be modified in the xwiki-core application resources (core.shortcuts.*)
108
Silvia Macovei 2.1 109 == Credits ==
Jean-Vincent Drean 1.1 110
Silvia Macovei 2.1 111 XWiki keyboard shortcuts are powered by [[openjs.org shortcut library>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].

Get Connected