Android
android.view
public static interface

android.view.KeyEvent.Callback

android.view.KeyEvent.Callback
Known Indirect Subclasses

Summary

Public Methods

          boolean  onKeyDown(int keyCode, KeyEvent event)
Called when a key down event has occurred.
          boolean  onKeyMultiple(int keyCode, int count, KeyEvent event)
Called when multiple down/up pairs of the same key have occurred in a row.
          boolean  onKeyUp(int keyCode, KeyEvent event)
Called when a key up event has occurred.

Details

Public Methods

public boolean onKeyDown(int keyCode, KeyEvent event)

Called when a key down event has occurred.

Parameters

keyCode The value in event.getKeyCode().
event Description of the key event.

Returns

  • If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

public boolean onKeyMultiple(int keyCode, int count, KeyEvent event)

Called when multiple down/up pairs of the same key have occurred in a row.

Parameters

keyCode The value in event.getKeyCode().
count Number of pairs as returned by event.getRepeatCount().
event Description of the key event.

Returns

  • If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

public boolean onKeyUp(int keyCode, KeyEvent event)

Called when a key up event has occurred.

Parameters

keyCode The value in event.getKeyCode().
event Description of the key event.

Returns

  • If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56