Loading ...
Sorry, an error occurred while loading the content.

7969KeyListener problems

Expand Messages
  • itsallaboutyui
    Dec 29, 2006
    • 0 Attachment
      I have an object containing the following code

      var kl2 = new YAHOO.util.KeyListener(document, {
      keys:[74,175,170,171,172,174,176] },
      {
      fn:this.kp},correctScope:true } );
      kl2.enable();

      //this.kp is a function within the object which calls
      kp : function(e){

      YAHOO.log('pressed: ' + $E.getCharCode(e));
      }




      but the charCode is always 0. I'm stumped. 74 is a keypress for J.
    • Show all 7 messages in this topic