And you know what's worse? Some of these APIs conflate different concepts together: it's a tablet so it doesn't have a keyboard... no wait, it's detachable, the user can plug it in. Oh no, we were joking, it's a foldable laptop so when it turns into a tablet it still has a keyboard attached, but it's disabled! You need a different API to query that! Also you should check the registry, there's firmware hooks updating it. But the firmware is buggy and lies to you. 5/13