<
From version < 4.1 >
edited by Jean-Vincent Drean
on 2009/12/10
To version < 5.1 >
edited by Jean-Vincent Drean
on 2009/12/10
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -12,7 +12,6 @@
12 12  
13 13  ==== Edit ====
14 14  
15 -{{velocity filter="none"}}
16 16  (% style="width:400px;"%)
17 17  |**e** |Edit the page using the default edition mode
18 18  |**k** |Edit the page in wiki edition mode
... ... @@ -65,15 +65,14 @@
65 65  </script>
66 66  {{/code}}
67 67  
68 -## commented since XWiki.org version < 1.4
69 -#*
70 -{pre}
67 +{{html}}
71 71  <script type="text/javascript">
72 72   shortcut.add("Ctrl+Alt+Shift+N", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
73 73  </script>
74 -{/pre}
71 +{{/html}}
72 +
75 75  Try the snippet by pressing Ctrl+Alt+N.
76 -*#
74 +
77 77  [[Complete documentation>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].
78 78  
79 79  == Removing shortcuts ==
... ... @@ -88,20 +88,41 @@
88 88  </script>
89 89  {{/code}}
90 90  
91 -## commented since XWiki.org version < 1.4
92 -#*
93 -{pre}
89 +{{html}}
94 94  <script type="text/javascript">
95 95  funtion removeCtrlAltShiftN() {
96 96   shortcut.remove("Ctrl+Alt+Shift+N");
97 97  }
98 98  </script>
99 -{/pre}
100 -
101 101  <a onclick="removeCtrlAltShiftN();">Click here to try the snippet, will remove the Ctrl+Alt+Shift+N shortcut</a>.
102 -*#
103 -{{/velocity}}
96 +{{/html}}
104 104  
98 +== Removing all shortcuts at once ==
99 +
100 +{{code language="javascript"}}
101 +<script type="text/javascript">
102 +//<![CDATA[
103 + for (binding in shortcut.all_shortcuts) {
104 + shortcut.remove(binding);
105 + }
106 +//]]>
107 +</script>
108 +{{/code}}
109 +
110 +{{velocity}}
111 +#if (!$isGuest)
112 +{{html}}
113 +<script type="text/javascript">
114 +//<![CDATA[
115 + for (binding in shortcut.all_shortcuts) {
116 + shortcut.remove(binding);
117 + }
118 +//]]>
119 +</script>
120 +{{/html}}
121 +#end
122 +{{velocity}}
123 +
105 105  == i18n ==
106 106  
107 107  All the core XWiki shortcuts can be modified in the xwiki-core application resources (core.shortcuts.*)

Get Connected