GetGameAction

From J2me wiki

Be cafeful with getGameAction, on some phones it will throw an exception when pressing certain keys (for instance on SE K700 passing the key code for the softkey).

It's a good idea to always wrap it in a try block:

	protected void keyPressed(int keyCode) 
	{
		int gameCode = -1;
		try
		{
			gameCode = getGameAction(keyCode);
		} catch (Exception e) {}
...
	}

Also on certain phones (e.g. some Samsungs) getGameAction doesn't automatically convert the 2,4,6,8 and 5 keys into direction and fire actions, so you have to check for these being pressed manually too. Do not rely on getgameaction doing it for you just because it does so in most emulators!