In prog:

window.onload = function() {
document.getElementsByTagName('body')[0].onkeyup = function(e) {
var ev = e || event;

if (ev.keyCode)
keycode=ev.keyCode;
else
keycode=ev.which;

console.log(keycode);

// http://tinyurl.com/y8jjah3
if (keycode==113 && (ev.charCode ? ev.charCode : 0) == 0) {
console.log("hello F2");
}
}
};

Labels: , ,