An interesting new commit has been found in the Android code review Gerrit that could allow your phone to become a Bluetooth keyboard or mouse for your computer. There commit has two parts to it. The first enables the HID (Human Interface Device) Profile in the Bluetooth stack while the second adds Profile Proxy to the HID stack.
In theory, by enabling these features, your Android phone becomes another HID and allows it to perform functions of those devices. Any Bluetooth keyboard, mouse or trackpad that you connect to your computer or phone is a HID. This commit turns your phone into one.
The use case for this is pretty straightforward. You could setup your phone as a keyboard on your Chromebook and use it as a keyboard device for that Chromebook while you are say projecting it in a meeting.
The question is practicality. It is unlikely you would want to use your phone as a keyboard for long but in a pinch, it could be really handy.
There is no indication of when or if this code will actually make it into Android. That said, there is a fair amount of activity on both of these commit statements which could indicate we will see it in Android P. The first Developer Preview of P is expected this month, perhaps as soon as next week.