KeyboardShortcutInfo
class KeyboardShortcutInfo : Parcelable
| kotlin.Any | |
| ↳ | android.view.KeyboardShortcutInfo |
Information about a Keyboard Shortcut.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
KeyboardShortcutInfo(label: CharSequence!, baseCharacter: Char, modifiers: Int) |
|
KeyboardShortcutInfo(label: CharSequence!, keycode: Int, modifiers: Int) |
|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Char |
Returns the base character that, combined with the modifiers, triggers this shortcut. |
| Int |
Returns the base keycode that, combined with the modifiers, triggers this shortcut. |
| CharSequence? |
getLabel()Returns the label to be used to describe this shortcut. |
| Int |
Returns the set of modifiers that, combined with the key, trigger this shortcut. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<KeyboardShortcutInfo!> | |
Public constructors
KeyboardShortcutInfo
KeyboardShortcutInfo(
label: CharSequence!,
baseCharacter: Char,
modifiers: Int)
| Parameters | |
|---|---|
label |
CharSequence!: The label that identifies the action performed by this shortcut. |
baseCharacter |
Char: The character that triggers the shortcut. |
modifiers |
Int: The set of modifiers that, combined with the key, trigger the shortcut. These should be a combination of KeyEvent.META_CTRL_ON, KeyEvent.META_SHIFT_ON, KeyEvent.META_META_ON, KeyEvent.META_ALT_ON, KeyEvent.META_FUNCTION_ON and KeyEvent.META_SYM_ON. |
KeyboardShortcutInfo
KeyboardShortcutInfo(
label: CharSequence!,
keycode: Int,
modifiers: Int)
| Parameters | |
|---|---|
label |
CharSequence!: The label that identifies the action performed by this shortcut. |
keycode |
Int: The keycode that triggers the shortcut. This should be a valid constant defined in KeyEvent. |
modifiers |
Int: The set of modifiers that, combined with the key, trigger the shortcut. These should be a combination of KeyEvent.META_CTRL_ON, KeyEvent.META_SHIFT_ON, KeyEvent.META_META_ON, KeyEvent.META_ALT_ON, KeyEvent.META_FUNCTION_ON and KeyEvent.META_SYM_ON. |
Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getBaseCharacter
fun getBaseCharacter(): Char
Returns the base character that, combined with the modifiers, triggers this shortcut. If the keycode was set instead, returns Character.MIN_VALUE.
getKeycode
fun getKeycode(): Int
Returns the base keycode that, combined with the modifiers, triggers this shortcut. If the base character was set instead, returns KeyEvent.KEYCODE_UNKNOWN. Valid keycodes are defined as constants in KeyEvent.
getLabel
fun getLabel(): CharSequence?
Returns the label to be used to describe this shortcut.
| Return | |
|---|---|
CharSequence? |
This value may be null. |
getModifiers
fun getModifiers(): Int
Returns the set of modifiers that, combined with the key, trigger this shortcut. These can be a combination of KeyEvent.META_CTRL_ON, KeyEvent.META_SHIFT_ON, KeyEvent.META_META_ON, KeyEvent.META_ALT_ON, KeyEvent.META_FUNCTION_ON and KeyEvent.META_SYM_ON.
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|