Android输入法扩展之外接键盘显示虚拟键盘修改

//文件 :WindowManagerService.java

 

 

boolean computeScreenConfigurationLocked(Configuration config, boolean forceRotate) {

-------------------------

 

if (device.getKeyboardType() == InputDevice.KEYBOARD_TYPE_ALPHABETIC) {        

          //检测到外接键盘           

           config.keyboard = Configuration.KEYBOARD_QWERTY;   

           keyboardPresence |= presenceFlag;       

      }   

     }

     -----------------------------

}

 

把  config.keyboard = Configuration.KEYBOARD_QWERTY;  

修改成 Configuration.KEYBOARD_NOKEYS;

即可见效果

你可能感兴趣的:(Android输入法扩展之外接键盘显示虚拟键盘修改)