Interface InputManagerListener
public interface InputManagerListener
{
// Fields
public static final int ALT;
public static final int CONTROL;
public static final int DOWN;
public static final int LBUTTON;
public static final int MBUTTON;
public static final int RBUTTON;
public static final int SHIFT;
public static final int UP;
public static final int UPDOWN;
// Methods
public InputMethodListener getCurrentInputMethod() ;
public InputMethodListener getCurrentInputMethod() ;
public InputMethodListener getInputMethod(int idx);
public int getNumberInputMethods();
public boolean handledKey( InputMethodCallback imeCallback,
long when, int keyCode, int keyChar, int state ) ;
public void removeInputMethod(InputMethodListener ime);
public void setInputMethod(InputMethodListener ime);
}
This interface receives messages from a system input and distributes those messages to designated Input Method Editors (IMEs) and other Components. This interface must be implemented by any object designated as the system Input Method Manager (IMM).
Also see com.ms.util.InputMethod.InputMethodListener, com.ms.util.InputMethod.InputMethodCallback
public InputMethodListener getCurrentInputMethod() ;
Retrieves the current IME from an Input Method Manager-maintained list.
Return Value:
Returns the current InputMethodListener.
public InputMethodListener getCurrentInputMethod() ;
Retrieves the current IME from an Input Method Manager-maintained list.
Return Value:
Returns the InputMethodListener at a specific index interface.
public InputMethodListener getInputMethod(int idx);
Retrieves an IME from an Input Method Manager-maintained list.
Return Value:
Returns the InputMethodListener at a specific index interface.
Parameter | Description |
idx
| An index of an IME on the list.
|
public int getNumberInputMethods();
Retrieves the current number of registered Input Methods in an Input Method Manager-maintained list.
Return Value:
Returns the number of input methods on the list.
public boolean handledKey( InputMethodCallback imeCallback, long when,
int keyCode, int keyChar, int state ) ;
Called by an IME class that handles the keystrokes from the native system.
Return Value:
Returns true if InputManagerListener processes the keystroke; otherwise, returns false.
Parameter | Description |
imeCallback
| The InputMethodCallback object that receives keystrokes from the native system.
|
when
| The time that the composed character is generated at.
|
keyCode
| The ASCII key code of the character.
|
keyChar
| The key character of the composed character.
|
state
| The state when the event occurred.
|
public void removeInputMethod(InputMethodListener ime);
Removes a registered IME from the IMM-maintained list.
Return Value:
No return value.
Parameter | Description |
ime
| The IME removed from the list.
|
public void setInputMethod(InputMethodListener ime);
Sets the given InputMethodListener object as the current IME.
Return Value:
No return value.
Parameter | Description |
ime
| The IME object to set the current input method as. If ime is null, all IMEs are deactivated, and the standard system keyboard input is used.
|
- ALT
- Indicates that the Alt key was depressed when this message was generated.
- CONTROL
- Indicates that the CTRL key was depressed when this message was generated.
- DOWN
- Indicates that either a key or mouse button was depressed.
- LBUTTON
- Indicates that the left mouse button was depressed when this message was generated.
- MBUTTON
- Indicates that the third mouse button was depressed when this message was generated.
- RBUTTON
- Indicates that the second (right) mouse button was depressed when this message was generated.
- SHIFT
- Indicates that the Shift key was depressed when this message was generated.
- UP
- Indicates that either a key or mouse button was released.
- UPDOWN
- Indicates that either a key or mouse button was depressed and released.