A MIDlet can define what kind of on-screen keypad is available
for game actions in Canvas
applications. There
are three possible on-screen keypad settings. In full screen mode Canvas
applications a keypad also includes two softkey
buttons (left softkey and right softkey). The setting can be one of
the following:
no keypad
navigation keypad keys: UP
, DOWN
, LEFT
, RIGHT
and FIRE
game actions keypad keys: UP
, DOWN
, LEFT
, RIGHT
, FIRE
, GAME_A
, GAME_B
, GAME_C
and GAME_D
.
The on-screen keypad is set with the Nokia-MIDlet-On-Screen-Keypad
JAD attribute.
Canvas
game actions map to the keypad keys
as following:
Canvas game action |
Keypad key |
---|---|
Arrow UP |
|
Arrow DOWN |
|
Arrow LEFT |
|
Arrow RIGHT |
|
FIRE (middle key) |
|
GAME_A |
|
GAME_B |
|
GAME_C |
|
GAME_D |
Note: FIRE
key in on-screen keypad behaves
mostly the same way as Selection key in physical keypad. Thus if there
is no on-screen keypad defined for a full screen mode Canvas
application, then there are no softkeys available for mapping possible
application commands. Also Canvas
(normal mode
and full screen mode with Command
s and CommandListener
defined) does not get the low-level key
event from Selection key unless this is explicitly enabled. For enabling
low-level key event triggering from Selection key, see Canvas
.
The user cannot change the on-screen keypad setting if it has been defined in the JAD file. The on-screen keypad setting is valid for entire MIDlet suite. If no keypad setting has been defined, a keypad is displayed and the user is able to change the keypad appearance via MIDlet settings.
See the following examples of different on-screen keypads for full
screen mode Canvas
and normal mode Canvas
.
Canvas mode and keypad setting |
Portrait |
Landscape |
---|---|---|
Full screen mode No on-screen keypad |
||
Full screen mode Navigation keys on-screen keypad setting |
||
Full screen mode Game actions on-screen keypad setting |
||
Normal mode No on-screen keypad |
||
Normal mode Navigation keys on-screen keypad setting |
||
Normal mode Game actions on-screen keypad setting |