@Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case 键值: // 事件 } return false; } @Override public boolean onKeyUp(int keyCode, KeyEvent event) { switch (keyCode) { case 键值: // 事件 } return false; }