Detect keyboard available or detect if running on Chromebook

Hi,

I have an issue in that whilst our app runs fine with the touchscreen on Chromebook, people want to be able to use the hardware keyboard.

We have our app set up for Mac, so everything is there to run with a keyboard, but I don’t just want to make it available to anyone running Android as plenty (most) Android devices don’t have a keyboard and we have a whole different set of instructions (click rather than tap for example when using a mouse & keyboard).

So my questions are…

  1. Is there a way to check if a hardware keyboard is available?

  2. Is there a way to check a device is any kind of Chromebook?

Thanks in advance,

Ian