Press a key and it's ASCII equivalent will be displayed in the box.
This library allows a simple function to use the keyboard as an input source.
Press ENTER to see an alternate function.
function abc(k) {
if(k==ENTER) alert('You pressed: [Enter]')
if(k==UP) alert('You pressed: [up]')
if(k==DOWN) alert('You pressed: [down]')
if(k==LEFT) alert('You pressed: [<-]')
if(k==RIGHT) alert('You pressed: [->]')
}
kb = new lib_Kb(abc)
See how the object implements the method (abc) that can be dynamically
defined. The method is called with the ASCII keyboard stroke "k" as the
first argument to the function. The uppercase constants such as ENTER,
UP, DOWN, etc. are defined in the libarary, they are portable to both
IE and Netscape.