How can I tell if a tablet keyboard is detached?

I have a tablet that has a detachable keyboard. (CHUWI Hi10 Max)

The tablet has a working accelerometer and can tell when it is rotated.

cat /sys/class/dmi/id/chassis_type returns 32 which is the correct chassis_type for a “detachable”.

However, it doesn’t seem to respond to the keyboard being removed. Is there a utility or item is /dev or /sys that will give me the status of the keyboard being attached or not?