pour les fonctions ku et kd, il faut les remplir avec ca :
kd : key[event.keyCode]=1;
ku : key[event.keyCode]=0;
il faut initialiser le tableau : for (var i=0;i<256;i++) key[i]=0;
dans la fonction action, c'est a toi de faire ce que tu veux en fonction des touches pressées.
listes des touches :
Remarks
As of Microsoft® Internet Explorer 4.0, the onkeydown event fires for the following keys:
Editing: DELETE, INSERT
Function: F1 - F12
Letters: A - Z (uppercase and lowercase)
Navigation: HOME, END, LEFT ARROW, RIGHT ARROW, UP ARROW, DOWN ARROW
Numerals: 0 - 9
Symbols: ! @ # $ % ^ & * ( ) _ - + = < [ ] { } , . / ? \ | ' ` " ~
System: ESC, SPACEBAR, SHIFT, TAB
As of Internet Explorer 5, the event also fires for the following keys:
Editing: BACKSPACE
Navigation: PAGE UP, PAGE DOWN
System: SHIFT+TAB
As of Internet Explorer 5, this event can be canceled for the following keys and key combinations by specifying event.returnValue=false:
Editing: BACKSPACE, DELETE
Letters: A - Z (uppercase and lowercase)
Navigation: PAGE UP, PAGE DOWN, END, HOME, LEFT ARROW, RIGHT ARROW, UP ARROW, DOWN ARROW
Numerals: 0 - 9
Symbols: ! @ # $ % ^ & * ( ) _ - + = < [ ] { } , . / ? \ | ' ` " ~
System: SPACEBAR, ESC, TAB, SHIFT+TAB