Cómo agregar accesos directos (keyboard shortcuts) a un sitio web

Iconiza TeamUncategorizedLeave a Comment

The following javascript code will allow you to add keyboard shortcuts to any webpage.

The

code

(put this on any page where you want keyboard shortcuts)






(put this in a file called shortcut.js and upload to the same directory as the webpage with the

above code). This example will display an alert message when the escape key is pressed.

function keyShortcut() { var e = window.event; var code = e.keyCode; if (code == 112) {

//checks for the escape key alert('escape key pressed'); }}

Vía: Justin Silverton http://www.whenpenguinsattack.com/

Leave a Reply