I needed to reinstall Windows on a friend's PC. Didn't have any USB keyboard on hand, so I installed a custom Kernel and ROM on my Xiaomi Mi A1, and had it emulate as a USB Keyboard, and the PC sees it as such. It even works on the BIOS and anything that can recognize an ordinary USB keyboard/mouse.