首先就是键的名称
安卓底部有三个键,返回键,home键,菜单键(?)
返回键,home键的说明没有争议。
菜单键就有很多说法了:
recent apps list,Task Switcher,Recent Tasks button,Overview,多任务键。(戻る,ホーム,マルチタスク)
API 11之后KeyCode就变成了KEYCODE_APP_SWITCH,
确实在adb里输入adb shell input keyevent KEYCODE_APP_SWITCH,反应跟按下菜单键一样。
参考Android菜单键的前世今生https://www.jianshu.com/p/c54897f2924cThe overview button is the square button in the black bar along the bottom of your device screen
button navigation: Three buttons for Home, Back, and App Overview.
he Recents screen (also referred to as the Overview screen, recent task list, or recent apps)
返回键 onKeyDown里就可以捕捉到keyCode是 KEYCODE_BACK
home键可以通过注册一个BroadcastReceiver来捕捉。参考