This discussion is archived
3 Replies Latest reply: Jul 3, 2010 10:05 AM by DarrylBurke RSS

key listener in Canvas

843851 Newbie
Currently Being Moderated
hi all... i m a novice in J2ME world. while practicing with canvas i used the following code for softkey listening

protected void keyPressed(int key)
{
          if( key == -7)
          {
               // do something
          }
          else if( key == -6)
          {
               //do something
          }
}

my code works fine in Wireless Tollkit. but it doesn't work in my nokia phone. someone please give me an insight about the problem. thanks