Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions) Summary: [Constants](https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#constants) \| [Ctors](https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#pubctors) \| [Methods](https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#inhmethods)

# ButtonCustomizationTrigger

*** ** * ** ***


`
public

final

class
ButtonCustomizationTrigger
`


`


`

`

extends https://developer.android.com/reference/android/hardware/input/CustomizationTrigger


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.hardware.input.CustomizationTrigger](https://developer.android.com/reference/android/hardware/input/CustomizationTrigger) ||
|   | ↳ | android.hardware.input.ButtonCustomizationTrigger |

<br />

*** ** * ** ***

Represents a trigger based on a physical button press on a peripheral (e.g., a mouse).

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_BACK` Customizable Button code: Back button. |
| `int` | `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_EXTRA` Customizable Button code: Extra button. |
| `int` | `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_FORWARD` Customizable Button code: Forward button. |
| `int` | `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_SIDE` Customizable Button code: Side button. |
| `int` | `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_TASK` Customizable Button code: Task button. |
| `int` | `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_TERTIARY` Customizable Button code: Tertiary/Middle button. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#ButtonCustomizationTrigger(int)(int buttonCode) ` Creates a Trigger for a specific button code. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#getButtonCode()() ` Returns the button code associated with this trigger. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#toString()() ` Returns a string representation of the object. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/hardware/input/CustomizationTrigger ` |---|---| | ` boolean` | ` https://developer.android.com/reference/android/hardware/input/CustomizationTrigger#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. | | ` int` | ` https://developer.android.com/reference/android/hardware/input/CustomizationTrigger#hashCode()() ` Returns a hash code value for the object. | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### CUSTOMIZABLE_BUTTON_BACK

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CUSTOMIZABLE_BUTTON_BACK
```

Customizable Button code: Back button.

<br />

Constant Value:

8
(0x00000008)


### CUSTOMIZABLE_BUTTON_EXTRA

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CUSTOMIZABLE_BUTTON_EXTRA
```

Customizable Button code: Extra button.

<br />

Constant Value:

128
(0x00000080)


### CUSTOMIZABLE_BUTTON_FORWARD

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CUSTOMIZABLE_BUTTON_FORWARD
```

Customizable Button code: Forward button.

<br />

Constant Value:

16
(0x00000010)


### CUSTOMIZABLE_BUTTON_SIDE

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CUSTOMIZABLE_BUTTON_SIDE
```

Customizable Button code: Side button.

<br />

Constant Value:

256
(0x00000100)


### CUSTOMIZABLE_BUTTON_TASK

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CUSTOMIZABLE_BUTTON_TASK
```

Customizable Button code: Task button.

<br />

Constant Value:

512
(0x00000200)


### CUSTOMIZABLE_BUTTON_TERTIARY

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CUSTOMIZABLE_BUTTON_TERTIARY
```

Customizable Button code: Tertiary/Middle button.

<br />

Constant Value:

4
(0x00000004)


## Public constructors

### ButtonCustomizationTrigger

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public ButtonCustomizationTrigger (int buttonCode)
```

Creates a Trigger for a specific button code.

<br />

| Parameters ||
|---|---|
| `buttonCode` | `int`: The button code for the trigger. Value is one of the following: - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_TERTIARY` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_BACK` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_FORWARD` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_EXTRA` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_SIDE` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_TASK` |

## Public methods

### getButtonCode

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int getButtonCode ()
```

Returns the button code associated with this trigger.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_TERTIARY` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_BACK` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_FORWARD` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_EXTRA` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_SIDE` - `https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger#CUSTOMIZABLE_BUTTON_TASK` |

### toString

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |