Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -186,24 +186,12 @@ 186 186 187 187 == Adding your own shortcuts == 188 188 189 -You can add your own keyboard shortcuts in a few javascript lines : 189 +You can add your own keyboard shortcuts in a few javascript lines. You can do that, for example, by adding a [[JavaScript StyleSheet Extension>>Documentation.DevGuide.Tutorials.SkinExtensionsTutorial.WebHome]] and putting the following content: 190 190 191 -{{code language="html"}} 192 -<script type="text/javascript"> 193 -//<![CDATA[ 194 - shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }); 195 -//]]> 196 -</script> 191 +{{code language="javascript"}} 192 +shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }); 197 197 {{/code}} 198 198 199 -{{html clean="false"}} 200 -<script type="text/javascript"> 201 - shortcut.add("Ctrl+Alt+n", function() { alert("Hey there! Congratulations on typing this one ;)"); }, {'propagate':false} ); 202 -</script> 203 -{{/html}} 204 - 205 -Try the snippet by pressing (% class="key" %)**Ctrl**(%%) + (% class="key" %)**Alt**(%%) + (% class="key" %)**n**(%%). 206 - 207 207 Also check the [[complete documentation>>https://dmauro.github.io/Keypress/]]. 208 208 209 209 == Removing keyboard shortcuts ==