#[repr(transparent)]
pub struct KeyEvent<'a> { /* private fields */ }
Expand description

A key event

For general discussion of key events in Android, see the relevant javadoc.

Implementations

Get the source of the event.

Get the class of the event source.

Get the device id associated with the event.

Returns the key action associated with the event.

See the KeyEvent 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

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.