
Why the Numpad Stopped Working in English Mode on Waydroid: Reading the Android and Waydroid Source
Inside Waydroid, which runs Android on Linux, the numpad stopped typing digits. With Gboard set to Japanese, it worked. With “English (US)”, it did not. The digit row above the letters worked in both. On the host (Arch Linux, sway), the numpad typed digits normally. Adding input * xkb_numlock enabled to the sway config did not help. I looked into why, using the source code and measurements. Summary The host’s NumLock state is not passed to the Android inside Waydroid. The sway setting has no effect on Waydroid. Android’s own NumLock state is probably being cleared right after it is set. The source and the measurements agree, but I did not observe the value that does the clearing. Adding a keyboard layout through an Android app, one that maps the numpad to digits, made the numpad type digits in English mode. What the source says I read Waydroid’s HWC (hwcomposer/wayland-hwc.cpp in android_hardware_waydroid), the input code of Android 13 (android13-release), and the patches Waydroid applies (android_vendor_waydroid). ...
