switch (keyCode) { case KeyEvent.VK_UP: return Canvas.UP; case KeyEvent.VK_DOWN: return Canvas.DOWN; case KeyEvent.VK_LEFT: return Canvas.LEFT; case KeyEvent.VK_RIGHT: return Canvas.RIGHT; case KeyEvent.VK_ENTER: return Canvas.FIRE; case KeyEvent.VK_A: return Canvas.GAME_A; case KeyEvent.VK_B: return Canvas.GAME_B; case KeyEvent.VK_C: return Canvas.GAME_C; case KeyEvent.VK_D: return Canvas.GAME_D;  case KeyEvent.VK_0: case KeyEvent.VK_1: case KeyEvent.VK_2: case KeyEvent.VK_3: case KeyEvent.VK_4: case KeyEvent.VK_5: case KeyEvent.VK_6: case KeyEvent.VK_7: case KeyEvent.VK_8: case KeyEvent.VK_9: int rval = Canvas.KEY_NUM0 + (keyCode-KeyEvent.VK_0); return rval; case KeyEvent.VK_MULTIPLY: return Canvas.KEY_STAR;   default: return 0;
switch (keyCode) { case KeyEvent.VK_UP: return Canvas.UP;  case KeyEvent.VK_DOWN: return Canvas.DOWN;  case KeyEvent.VK_LEFT: return Canvas.LEFT;  case KeyEvent.VK_RIGHT: return Canvas.RIGHT;  case KeyEvent.VK_ENTER: return Canvas.FIRE;  case KeyEvent.VK_1: case KeyEvent.VK_A: return Canvas.GAME_A;  case KeyEvent.VK_3: case KeyEvent.VK_B: return Canvas.GAME_B;  case KeyEvent.VK_7: case KeyEvent.VK_C: return Canvas.GAME_C;  case KeyEvent.VK_9: case KeyEvent.VK_D: return Canvas.GAME_D;  default: return 0;
  public int getGameAction(int keyCode)   {        switch (keyCode) {        case KeyEvent.VK_UP:            return Canvas.UP;        case KeyEvent.VK_DOWN:            return Canvas.DOWN;        case KeyEvent.VK_LEFT:      return Canvas.LEFT;        case KeyEvent.VK_RIGHT:      return Canvas.RIGHT;        case KeyEvent.VK_ENTER:      return Canvas.FIRE;       case KeyEvent.VK_A:            return Canvas.GAME_A;        case KeyEvent.VK_B:            return Canvas.GAME_B;        case KeyEvent.VK_C:            return Canvas.GAME_C;        case KeyEvent.VK_D:            return Canvas.GAME_D;        case KeyEvent.VK_0:        case KeyEvent.VK_1:        case KeyEvent.VK_2:        case KeyEvent.VK_3:        case KeyEvent.VK_4:        case KeyEvent.VK_5:        case KeyEvent.VK_6:        case KeyEvent.VK_7:        case KeyEvent.VK_8:        case KeyEvent.VK_9:            int rval = Canvas.KEY_NUM0 + (keyCode-KeyEvent.VK_0);            return rval;        case KeyEvent.VK_MULTIPLY:            return Canvas.KEY_STAR;//        case KeyEvent.VK_NUMBER_SIGN://            return Canvas.KEY_POUND;        default:      return 0;    }  }