Struct ndk::event::KeyEvent [−][src]
pub struct KeyEvent { /* fields omitted */ }
Expand description
A key event.
For general discussion of key events in Android, see the relevant javadoc.
Implementations
Constructs a KeyEvent from a pointer to a native AInputEvent
Safety
By calling this method, you assert that the pointer is a valid, non-null pointer to an
AInputEvent
, and that that AInputEvent
is an AKeyEvent
.
Returns a pointer to the native AInputEvent
Returns the key action represented by this event.
See the NDK docs
Get the source of the event.
See the NDK docs
Get the device id associated with the event.
See the NDK docs
Returns the last time the key was pressed. This is on the scale of
java.lang.System.nanoTime()
, which has nanosecond precision, but no defined start time.
See the NDK docs
Returns the time this event occured. This is on the scale of
java.lang.System.nanoTime()
, which has nanosecond precision, but no defined start time.
See the NDK docs
Returns the keycode associated with this key event
See the NDK docs
Returns the number of repeats of a key.
See the NDK docs
Returns the hardware keycode of a key. This varies from device to device.
See the NDK docs
Flags associated with this KeyEvent
.
See the NDK docs
Returns the state of the modifiers during this key event, represented by a bitmask.
See the NDK docs