Instrumentation inst = new Instrumentation(); inst.sendKeyDownUpSync(KeyCode);KeyCode即为具体的事件代号比如KeyEvent.KEYCODE_DEL键盘删除事件。