You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: plug in a hardware keyboard for one session #4786
Android emulators have no hardware keyboard (hw.keyboard=no). Tests that need one cannot run: physical-keyboard text entry, keyboard shortcuts, tablet layouts with the on-screen keyboard hidden.
Changing hw.keyboard in config.ini applies to every emulator on the machine and needs a new snapshot. See callstackincubator/simlock#1082.
Proposal
Add a per-session hardware keyboard for Android:
Register a virtual USB keyboard with adb shell hid (a register command carrying a boot-keyboard HID descriptor). am get-config then reports qwerty.
Optional: hide the on-screen keyboard with settings put secure show_ime_with_hard_keyboard 0, and restore the old value afterwards.
Unplug the keyboard when the session ends by ending the hid process.
Tested on Android 35 with hw.keyboard=no: keys typed into the focused field, Shift included. No reboot and no new snapshot were needed.
Activity