switch (gameAction) { case Canvas.UP: return KeyEvent.VK_UP; case Canvas.DOWN: return KeyEvent.VK_DOWN; case Canvas.LEFT: return KeyEvent.VK_LEFT; case Canvas.RIGHT: return KeyEvent.VK_RIGHT; case Canvas.FIRE: return KeyEvent.VK_ENTER; case Canvas.GAME_A: return KeyEvent.VK_A; case Canvas.GAME_B: return KeyEvent.VK_B; case Canvas.GAME_C: return KeyEvent.VK_C; case Canvas.GAME_D: return KeyEvent.VK_D;
switch (gameAction) { case Canvas.UP: return KeyEvent.VK_UP;  case Canvas.DOWN: return KeyEvent.VK_DOWN;  case Canvas.LEFT: return KeyEvent.VK_LEFT;  case Canvas.RIGHT: return KeyEvent.VK_RIGHT;  case Canvas.FIRE: return KeyEvent.VK_ENTER;  case Canvas.GAME_A: return KeyEvent.VK_1;  case Canvas.GAME_B: return KeyEvent.VK_3;  case Canvas.GAME_C: return KeyEvent.VK_7;  case Canvas.GAME_D: return KeyEvent.VK_9;
  public int getKeyCode(int gameAction)   {        switch (gameAction) {        case Canvas.UP:            return KeyEvent.VK_UP;        case Canvas.DOWN:            return KeyEvent.VK_DOWN;        case Canvas.LEFT:            return KeyEvent.VK_LEFT;        case Canvas.RIGHT:            return KeyEvent.VK_RIGHT;        case Canvas.FIRE:            return KeyEvent.VK_ENTER;        case Canvas.GAME_A:            return KeyEvent.VK_A;        case Canvas.GAME_B:            return KeyEvent.VK_B;        case Canvas.GAME_C:            return KeyEvent.VK_C;        case Canvas.GAME_D:            return KeyEvent.VK_D;        case Canvas.KEY_NUM0:        case Canvas.KEY_NUM1:        case Canvas.KEY_NUM2:                case Canvas.KEY_NUM3:                case Canvas.KEY_NUM4:        case Canvas.KEY_NUM5:        case Canvas.KEY_NUM6:        case Canvas.KEY_NUM7:                case Canvas.KEY_NUM8:                case Canvas.KEY_NUM9:            int rval = KeyEvent.VK_0 + (gameAction-Canvas.KEY_NUM0);            return rval;        case Canvas.KEY_POUND://            return KeyEvent.VK_NUMBER_SIGN;//        case Canvas.KEY_STAR:            return KeyEvent.VK_MULTIPLY;        default:            return 0;        }  }