我想访问键盘上的按键而不按该按钮,我想不使用键盘按 ctrl + alt + del 。
我找到了此代码,但是它不起作用:
dispatchKeyEvent(new KeyEvent(KeyEvent.KEYCODE_CTRL_LEFT, KeyEvent.KEYCODE_CTRL_LEFT));
dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_MULTIPLE, KeyEvent.KEYCODE_ALT_LEFT));
dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_MULTIPLE, KeyEvent.KEYCODE_FORWARD_DEL));
我要发送同时按住这三个按钮的动作。