Universal Control lets you work across multiple devices using a single keyboard and mouse.
----- One way to work across your devices A single keyboard and mouse or trackpad now work seamlessly between your Mac and iPad — they’ll even connect to more than one Mac or iPad. Move your cursor from your Mac to your iPad, type on your Mac and watch the words show up on your iPad, or even drag and drop content from one Mac to another. -----
Under the Displays > Advanced section in System Preferences, users can ● Allow your cursor and keyboard to move between any nearby Mac or iPad ● Push through the edge of a display to connect a nearby Mac or iPad ● Automatically reconnect to any nearby Mac or iPad
On your iPad, you can find a new "Cursor and Keyboard (Beta)" option in the AirPlay & Handoff section under General settings.