Changes for page XWiki Keyboard Shortcuts

Last modified by Lucas Charpentier (Sereza7) on 2024/06/07

From version 21.2
edited by Clément Aubin
on 2017/11/07
Change comment: There is no comment for this version
To version 23.1
edited by Clément Aubin
on 2017/11/12
Change comment: Rollback to version 14.3

Summary

Details

Page properties
Content
... ... @@ -191,7 +191,7 @@
191 191  {{code language="html"}}
192 192  <script type="text/javascript">
193 193  //<![CDATA[
194 - shortcut.add("Ctrl+Alt+N", function() { alert("Hey there! Congratulations on typing this one ;)"); });
194 + shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); });
195 195  //]]>
196 196  </script>
197 197  {{/code}}
... ... @@ -198,13 +198,13 @@
198 198  
199 199  {{html clean="false"}}
200 200  <script type="text/javascript">
201 - shortcut.add("Ctrl+Alt+N", function() { alert("Hey there! Congratulations on typing this one ;)"); });
201 + shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} );
202 202  </script>
203 203  {{/html}}
204 204  
205 205  Try the snippet by pressing (% class="key" %)**Ctrl**(%%) + (% class="key" %)**Alt**(%%) + (% class="key" %)**n**(%%).
206 206  
207 -Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]].
207 +Also check the [[complete documentation>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].
208 208  
209 209  == Removing keyboard shortcuts ==
210 210  
... ... @@ -213,7 +213,7 @@
213 213  {{code language="html"}}
214 214  <script type="text/javascript">
215 215  //<![CDATA[
216 - shortcut.remove("Ctrl+Alt+N");
216 + shortcut.remove("Ctrl+Alt+n");
217 217  //]]>
218 218  </script>
219 219  {{/code}}
... ... @@ -221,7 +221,7 @@
221 221  {{html clean="false"}}
222 222  <script type="text/javascript">
223 223  function removeCtrlAltN() {
224 - shortcut.remove("Ctrl+Alt+N");
224 + shortcut.remove("Ctrl+Alt+n");
225 225  }
226 226  </script>
227 227  <a onclick="removeCtrlAltN(); return false;" href="#">Click here to try the snippet, it will remove the Ctrl+Alt+n shortcut</a>.
... ... @@ -232,8 +232,8 @@
232 232  {{code language="html"}}
233 233  <script type="text/javascript">
234 234  //<![CDATA[
235 - for (binding in shortcut.all_shortcuts()) {
236 - shortcut.remove(binding.keys.join(' '));
235 + for (binding in shortcut.all_shortcuts) {
236 + shortcut.remove(binding);
237 237   }
238 238  //]]>
239 239  </script>
... ... @@ -245,8 +245,8 @@
245 245  <script type="text/javascript">
246 246  //<![CDATA[
247 247  function removeAll() {
248 - for (binding in shortcut.all_shortcuts()) {
249 - shortcut.remove(binding.keys.join(' '));
248 + for (binding in shortcut.all_shortcuts) {
249 + shortcut.remove(binding);
250 250   }
251 251  }
252 252  //]]>
... ... @@ -258,4 +258,4 @@
258 258  
259 259  == Credits ==
260 260  
261 -XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].
261 +XWiki keyboard shortcuts are powered by [[openjs.com shortcut library>>http://www.openjs.com/scripts/events/keyboard_shortcuts/]].

Get Connected