# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

# DialogInterface.OnKeyListener

`public static interface DialogInterface.OnKeyListener`
``

android.content.DialogInterface.OnKeyListener

Interface definition for a callback to be invoked when a key event is dispatched to this dialog. The callback will be invoked before the key event is given to the dialog.

## Summary

### Public methods
`abstract boolean` | `onKey(DialogInterface dialog, int keyCode, KeyEvent event)` Called when a key is dispatched to a dialog.

## Public methods

### onKey

    public abstract boolean onKey (DialogInterface dialog,
                    int keyCode,
                    KeyEvent event)

Called when a key is dispatched to a dialog. This allows listeners to get a chance to respond before the dialog.

Parameters
`dialog` | `DialogInterface`: the dialog the key has been dispatched to
`keyCode` | `int`: the code for the physical key that was pressed
`event` | `KeyEvent`: the KeyEvent object containing full information about the event

Returns
`boolean` | `true` if the listener has consumed the event, `false` otherwise

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*