How do you tell if a mouse button is currently down?

For touch events you can use GetInputTouchState which checks if the touch cursor is down or not.

However, for mouse input it superficially appears that the only thing you can query is position, using GetMousePosition.

Is there any API that allows you to check the ‘downness’ of the various mouse buttons?

You use the key bindings for this:

        FKey key;
        switch (id) {
          case 0:
            key = EKeys::LeftMouseButton;
          case 1:
            key = EKeys::RightMouseButton;
          case 2:
            key = EKeys::MiddleMouseButton;
          case 3:
            key = EKeys::ThumbMouseButton;
          case 4:
            key = EKeys::ThumbMouseButton2;
          default:
            key = EKeys::LeftMouseButton;
        }
        *down = player->IsInputKeyDown(key);