I was thinking of implementing shortcut keys in a pet web application, I am developing for me. I am using c# and asp.net.
I have seen very few web-sites( frankly I reme
use this javascript on your master page this work using keycode.........
------------------------------------------
var isfocused=false;
document.onkeydown = overrideKeyboardEvent;
document.onkeyup = overrideKeyboardEvent;
var keyIsDown = {};
var get_focused="";
function overrideKeyboardEvent(e){
switch(e.type){
case "keydown":
if(!keyIsDown[e.keyCode]){
keyIsDown[e.keyCode] = true;
// do key down stuff here
if (e.keyCode == 40) {
var t = new Array;
t = document.getElementsByTagName("input");
var n = "1";
for (var r = 0; r < t.length; r++) {
if (t[r].type == "checkbox") {
var i = document.cookie.split(";");
var s = y = i[0].substr(i[0].indexOf("=") + 1);
if (s.toLowerCase().indexOf("active") != -1) {
if (n == "2") {
document.getElementById(t[r].id).focus();
document.cookie = "aa" + "=" + t[r].id;
return false
}
if (t[r].id == s) {
n = "2"
}
} else {
document.getElementById(t[r].id).focus();
document.cookie = "aa" + "=" + t[r].id;
return false
}
}
}
}
if( e.keyCode==115)
{ e.preventDefault();
var c = new Array();
c = document.getElementsByTagName('input');
for (var i=0;i