Portable applications that need arrow key events and gaming-related events should use game actions in preference to key codes and key names. MIDP defines the following game actions: UP, DOWN, LEFT, RIGHT, FIRE, GAME_A, GAME_B, GAME_C, and GAME_D.
Each key code may be mapped to at most game action. However, a game action may be associated with more than one key code. The application can translate a key code into a game action using the getGameAction(int keyCode) method, and it can translate a key code into a game action using the getKeyCode(int gameAction) method. The implementation is not allowed to change the mapping of game actions and key codes during execution of the application.