There are two ways you can do a button press at the same time as pressing Shift or Alt:
■Map the buttons to the keyboard, as in the previous section, and press the key associated with the button at the same time as the Shift or Alt keys
■Press the button
For example:
keyboard.handler.qwerty.A = 'a' 'A' '?'
Assigning Abstract Commands to Buttons
Abstract commands are provided in the MIDP specification in order to allow an application to issue a screen command without having to take into account how the user selects that command on a specific
The semantics of an abstract command include:
■
■
■
In the MIDP Reference Implementation, which underlies the J2ME Wireless Toolkit, there is an implicit order of precedence among the command types. This command precedence also impacts on the assignment of a command to a preferred button. If two commands of different types are vying for the same button, the command whose type has higher precedence prevails.
TABLE 3 shows the abstract command types in order of precedence in the J2ME Wireless Toolkit and the MIDP Reference Implementation:
TABLE 3 Abstract Command Types in Order of Precedence
Command Type | Description |
|
|
BACK | Returns the user to the logically previous screen |
EXIT | Exits from the application |
CANCEL | Standard negative answer to a dialog implemented by the |
| current screen |
STOP | Stop some currently running process or operation |
|
|
Chapter 3 Examining Device Property Files 33