How to disable hardware keyboard?

290 views
Skip to first unread message

Nathan

unread,
May 29, 2014, 3:37:53 PM5/29/14
to android...@googlegroups.com
My device does not have a hardware keyboard, but for some reason Android still thinks it does.  The hardware keyboard appears in the Settings/Input Methods menu, and I have to manually disable it to get the software keyboards to appear.  Do I have to set a system property? or a build property? to disable the keyboard?  I am using Qualcomm's MSM8074 processor, and their default build for the MSM8974.

Nathan

unread,
May 29, 2014, 5:21:18 PM5/29/14
to android...@googlegroups.com

Problem solved!

There is no configuration that defines this.  It actually happens at runtime when a keyboard is plugged in.  I did not know that the wireless mouse I was using identified itself also as a keyboard.  I used evtest_arm to look at all the /dev/input/eventX devices and found this out.  If this mouse was not plugged in, and I used a wired mouse, the hardware keyboard option was gone.

shridutt kothari

unread,
Jun 9, 2014, 3:10:46 AM6/9/14
to android...@googlegroups.com
Good to know that fact.  

Thanks, Shridutt

郭崇鑫

unread,
Jul 3, 2017, 11:03:06 PM7/3/17
to shridut...@gmail.com, android-porting
You can do this to make SoftIME show in Android6.0 when hardware keyboard plugin:

diff --git a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index d75b742edf..287fe505fb 100755
--- a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -166,6 +166,10 @@
     <!-- Development settings -->
     <bool name="def_stay_on_while_plugged_in">false</bool>
 
+    <bool name="def_show_ime_with_hard_keyboard">true</bool>

     <!-- Number of retries for connecting to DHCP.
          Value here is the same as WifiStateMachine.DEFAULT_MAX_DHCP_RETRIES -->
     <integer name="def_max_dhcp_retries">9</integer>
diff --git a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 0b122a412b..78ce05e6c1 100755
--- a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2532,6 +2532,11 @@ class DatabaseHelper extends SQLiteOpenHelper {
             loadBooleanSetting(stmt, Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
                     R.bool.def_lock_screen_allow_private_notifications);

+            loadBooleanSetting(stmt, Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD,
+                    R.bool.def_show_ime_with_hard_keyboard);

             loadIntegerSetting(stmt, Settings.Secure.SLEEP_TIMEOUT,
                     R.integer.def_sleep_timeout);
 

2014-06-09 15:10 GMT+08:00 shridutt kothari <shridut...@gmail.com>:
Good to know that fact.  

Thanks, Shridutt

--
--
unsubscribe: android-porting+unsubscribe@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages