# EspressoKey

Summary:[Nested Classes](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#nestedclasses)\|[Methods](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#)  

# EspressoKey

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
EspressoKey
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|--------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.action.EspressoKey |

<br />

*** ** * ** ***

Class that wraps the key code and meta state of the desired key press.

## Summary

|                                                                          ### Nested classes                                                                          ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [EspressoKey.Builder](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey.Builder) Builder for the EspressoKey class. |

|                                                                                             ### Public methods                                                                                              ||
|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                     | ` `[getKeyCode](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#getKeyCode())`() `     |
| ` int`                                                                     | ` `[getMetaState](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#getMetaState())`() ` |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[toString](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#toString())`() `         |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public methods

### getKeyCode

```
int getKeyCode ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getMetaState

```
int getMetaState ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### toString

```
String toString ()
```

<br />

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

-

  ## Interfaces

  - [AdapterViewProtocol](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol)
  - [AdapterViewProtocol.DataFunction](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol.DataFunction)
  - [CoordinatesProvider](https://developer.android.com/reference/android/support/test/espresso/action/CoordinatesProvider)
  - [PrecisionDescriber](https://developer.android.com/reference/android/support/test/espresso/action/PrecisionDescriber)
  - [Swiper](https://developer.android.com/reference/android/support/test/espresso/action/Swiper)
  - [Tapper](https://developer.android.com/reference/android/support/test/espresso/action/Tapper)
-

  ## Classes

  - [AdapterDataLoaderAction](https://developer.android.com/reference/android/support/test/espresso/action/AdapterDataLoaderAction)
  - [AdapterViewProtocol.AdaptedData](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData)
  - [AdapterViewProtocol.AdaptedData.Builder](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.Builder)
  - [AdapterViewProtocols](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocols)
  - [CloseKeyboardAction](https://developer.android.com/reference/android/support/test/espresso/action/CloseKeyboardAction)
  - [EditorAction](https://developer.android.com/reference/android/support/test/espresso/action/EditorAction)
  - [EspressoKey](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey)
  - [EspressoKey.Builder](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey.Builder)
  - [GeneralClickAction](https://developer.android.com/reference/android/support/test/espresso/action/GeneralClickAction)
  - [GeneralSwipeAction](https://developer.android.com/reference/android/support/test/espresso/action/GeneralSwipeAction)
  - [KeyEventAction](https://developer.android.com/reference/android/support/test/espresso/action/KeyEventAction)
  - [MotionEvents](https://developer.android.com/reference/android/support/test/espresso/action/MotionEvents)
  - [MotionEvents.DownResultHolder](https://developer.android.com/reference/android/support/test/espresso/action/MotionEvents.DownResultHolder)
  - [OpenLinkAction](https://developer.android.com/reference/android/support/test/espresso/action/OpenLinkAction)
  - [PressBackAction](https://developer.android.com/reference/android/support/test/espresso/action/PressBackAction)
  - [RepeatActionUntilViewState](https://developer.android.com/reference/android/support/test/espresso/action/RepeatActionUntilViewState)
  - [ReplaceTextAction](https://developer.android.com/reference/android/support/test/espresso/action/ReplaceTextAction)
  - [ScrollToAction](https://developer.android.com/reference/android/support/test/espresso/action/ScrollToAction)
  - [TypeTextAction](https://developer.android.com/reference/android/support/test/espresso/action/TypeTextAction)
  - [ViewActions](https://developer.android.com/reference/android/support/test/espresso/action/ViewActions)
-

  ## Enums

  - [GeneralLocation](https://developer.android.com/reference/android/support/test/espresso/action/GeneralLocation)
  - [Press](https://developer.android.com/reference/android/support/test/espresso/action/Press)
  - [Swipe](https://developer.android.com/reference/android/support/test/espresso/action/Swipe)
  - [Swiper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Swiper.Status)
  - [Tap](https://developer.android.com/reference/android/support/test/espresso/action/Tap)
  - [Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status)