let km =context.getSystemService("keyguard");
if (!km.inKeyguardRestrictedInputMode()) {
log("键盘已锁")

}else{
log("键盘锁定")
}