Monkeyrunner 常用按键
MonkeyRunner常用的按键介绍
Home键:KEYCOD_HOME
Back键:KEYCODE_BACK
send键:KEYCODE_CALL
end键:KEYCODE_ENDCALL
上导航键:KEYCODE_DPAD_UP(现在手机已经没有这个键)
下导航键:KEYCODE_DPAD_DOWN(现在手机已经没有这个键)
左导航:KEYCODE_DPAD_LEFT 现在手机已经没有这个键
右导航键:KEYCODE_DPAD_RIGHT 现在手机已经没有这个键
ok键:KEYCODE_DPAD_CENTER
上音量键:KEYCODE_VOLUME_UP
下音量键:KEYCODE_VOLUME_DOWN
power键:KEYCODE_POWER
camera键:KEYCODE_CAMERA
menu键:KEYCODE_MENU
search键:KEYCODE_SEARCH
call键:KEYCODE_CALL
按下HOME键 device.press('KEYCODE_HOME',MonkeyDevice.DOWN_AND_UP)
按下BACK键 device.press('KEYCODE_BACK',MonkeyDevice.DOWN_AND_UP)
按下下导航键 device.press('KEYCODE_DPAD_DOWN',MonkeyDevice.DOWN_AND_UP)
按下上导航键 device.press('KEYCODE_DPAD_UP',MonkeyDevice.DOWN_AND_UP)
按下OK键 device.press('KEYCODE_DPAD_CENTER',MonkeyDevice.DOWN_AND_UP)
device.press('KEYCODE_ENTER',MonkeyDevice.DOWN_AND_UP)#输入回车 device.press('KEYCODE_BACK',MonkeyDevice.DOWN_AND_UP)#点击返回