Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -228,54 +228,21 @@ 228 228 229 229 == Removing keyboard shortcuts == 230 230 231 -To remove a shortcut adapt thi ssnippet to your needs :231 +To remove a shortcut adapt the following snippet to your needs and use by putting it in a [[JavaScript StyleSheet Extension>>Documentation.DevGuide.Tutorials.SkinExtensionsTutorial.WebHome]]: 232 232 233 -{{code language="html"}} 234 -<script type="text/javascript"> 235 -//<![CDATA[ 236 - shortcut.remove("Ctrl+Alt+n"); 237 -//]]> 238 -</script> 233 +{{code language='javascript'}} 234 +shortcut.remove("Ctrl+Alt+n"); 239 239 {{/code}} 240 240 241 -{{html clean="false"}} 242 -<script type="text/javascript"> 243 -function removeCtrlAltN() { 244 - shortcut.remove("Ctrl+Alt+n"); 245 -} 246 -</script> 247 -<a onclick="removeCtrlAltN(); return false;" href="#">Click here to try the snippet, it will remove the Ctrl+Alt+n shortcut</a>. 248 -{{/html}} 249 - 250 250 == Removing all shortcuts at once == 251 251 252 -{{code language="html"}} 253 -<script type="text/javascript"> 254 -//<![CDATA[ 255 - for (binding in shortcut.all_shortcuts()) { 256 - shortcut.remove(binding.keys.join(' ')); 257 - } 258 -//]]> 239 +{{code language='javascript'}} 240 +for (binding in shortcut.all_shortcuts()) { 241 + shortcut.remove(binding.keys.join(' ')); 242 +} 259 259 </script> 260 260 {{/code}} 261 261 262 -{{velocity}} 263 -#if (!$isGuest && $isAdvancedUser) 264 -{{html clean="false"}} 265 -<script type="text/javascript"> 266 -//<![CDATA[ 267 -function removeAll() { 268 - for (binding in shortcut.all_shortcuts()) { 269 - shortcut.remove(binding.keys.join(' ')); 270 - } 271 -} 272 -//]]> 273 -</script> 274 -<a onclick="removeAll(); return false;" href="#">Click here to try the snippet, it will disable all keyboard shortcuts</a>. 275 -{{/html}} 276 -#end 277 -{{/velocity}} 278 - 279 279 == Credits == 280 280 281 281 XWiki keyboard shortcuts are powered by [[Keypress JS shortcut library>>https://dmauro.github.io/Keypress/]].