Min computer sagde altså også 48 på onkeydown !-)
Du kan jo bruge denne maskine, men der findes også lister ...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Find tastekoder</title>
<meta name="keywords" content="roenving,
http://www.eksperten.dk/spm/508943"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#minTabel td{padding:3px;border:2px inset #333;text-align:center;}
</style>
<script language="javascript" type="text/javascript">
var tast=['0123456789','0123456789','abcdefghijklmnopqrstuvxyzæøå','1-2-3-4-5-6-7-8-9-10-11-12'], nr=0, act=0, actTast='0 (nummerTastatur)', actKey='0';
tast[0] = tast[0].split("");
tast[1] = tast[1].split("");
tast[2] = tast[2].split("");
tast[3] = tast[3].split("-");
function checkKeydown(e){
if(!e)e=event;
key = (e.which)?e.which:e.keyCode;
actKey = key;
return;
}
function checkKeypress(e){
if(!e)e=event;
key = (e.which)?e.which:e.keyCode;
newTr = document.createElement('TR');
document.getElementById('minTabel').appendChild(newTr);
newTd = document.createElement('TD');
newTr.appendChild(newTd);
newTd.innerHTML = actTast;
newTd = document.createElement('TD');
newTr.appendChild(newTd);
newTd.innerHTML = actKey;
newTd = document.createElement('TD');
newTr.appendChild(newTd);
newTd.innerHTML = key;
if(act==tast[nr].length-1){
if(nr==3)return;
nr++;
act = -1;
}
act++;
//alert(nr+"\n"+act+"\n"+tast[nr][act]);
actTast = tast[nr][act] + ((nr==0)?" (nummerTastatur)":"");
document.getElementById("minSpan").innerHTML = "Tryk på " + actTast;
document.getElementById("minInput").value = "";
document.getElementById("minInput").focus();
}
</script>
</head>
<body onload="document.getElementById('minInput').focus();">
<table style="border:3px inset #777;border-collapse:collapse;"><tbody id="minTabel">
<tr><td>Tast</td><td>Keyboard-kode</td><td>Tegnkode</td></tr>
</tbody></table>
<input id="minInput" name="minInput" type="text" value="" onkeydown="checkKeydown(event);" onkeypress="checkKeypress(event)">
<span id="minSpan">Tryk på 0 (nummerTastatur)</span>
</body>
</html>