public class

KeyActionMapping

extends MappingObject
java.lang.Object
   ↳ com.datalogic.device.input.MappingObject
     ↳ com.datalogic.device.input.KeyActionMapping

Class Overview

Represents a key action.

Summary

Constants
int ACTION_PRESS_DOWN Action of key pressing
int ACTION_RELEASE Action of key releasing
[Expand]
Inherited Constants
From class com.datalogic.device.input.MappingObject
From interface android.os.Parcelable
Fields
public static final Creator<KeyActionMapping> CREATOR
[Expand]
Inherited Fields
From class com.datalogic.device.input.MappingObject
Public Constructors
KeyActionMapping(KeyCodeEntry key, int action)
Constructs a key action with a KeyCodeEntry.
KeyActionMapping(int keyCode, int metaState, int action)
Constructs a key action with key code and meta state.
Public Methods
int getAction()
Gets the key action of this class.
KeyCodeEntry getKeyCode()
Gets the KeyCodeEntry object stored in this class.
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class com.datalogic.device.input.MappingObject
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int ACTION_PRESS_DOWN

Added in revision 35

Action of key pressing

Constant Value: 0 (0x00000000)

public static final int ACTION_RELEASE

Added in revision 35

Action of key releasing

Constant Value: 1 (0x00000001)

Fields

public static final Creator<KeyActionMapping> CREATOR

Added in revision 35

Public Constructors

public KeyActionMapping (KeyCodeEntry key, int action)

Added in revision 35

Constructs a key action with a KeyCodeEntry.

Parameters
key a KeyCodeEntry object
action either ACTION_PRESS_DOWN or ACTION_RELEASE

public KeyActionMapping (int keyCode, int metaState, int action)

Added in revision 35

Constructs a key action with key code and meta state.

Parameters
keyCode int Android standard keycode
metaState int flags of meta key states
action either ACTION_PRESS_DOWN or ACTION_RELEASE

Public Methods

public int getAction ()

Added in revision 35

Gets the key action of this class.

Returns

public KeyCodeEntry getKeyCode ()

Added in revision 35

Gets the KeyCodeEntry object stored in this class.

Returns

public void writeToParcel (Parcel out, int flags)

Added in revision 35