This is designed to make it really easy to support physical devices in your projects. Broadcasts are used to detect functions, and it covers ALL devices available as extensions to normal scratch, and has the keyboard as a backup too. If it does not work, ask me in the comments. I don't have any of the devices physically, so it may not work, as I can't test it. TO ADD TO YOUR PROJECT: Just backpack the Real-World Connections Helper. Use the Show/hide broadcasts to show an info page. Then use the broadcasts.
Put this in your project: Devices such as micro: bit can use this project with Real-World connections helper by thr565ono. https://scratch.mit.edu/projects/409547072/. Supported Devices: micro: bit keyboard LEGO EV3 LEGO BOOST WeDo 2.0 Force and Acceleration.