Universal Control
With Universal Control, you can use a single keyboard and mouse, or trackpad to control multiple devices. When you move the pointer to the edge of your iMac screen, the pointer moves to your iPad or another Mac, so you can work across up to three devices.
Note: To use Universal Control, you must have macOS version 12.3 or later on your Mac and iPadOS 15.4 or later on your iPad.
Check your connections. Universal Control on your Mac uses Bluetooth to detect another device and Wi-Fi to connect it. Make sure each device has Bluetooth turned on and is connected to Wi-Fi. Also make sure Handoff is turned on in the General settings on your iMac and in Settings > General > AirPlay & Handoff on your iPad. You must also be signed in with the same Apple ID on both devices, and have two-factor authentication turned on. When these settings are correct, you can use Control Center to connect your devices. On your Mac, click Control Center in the menu bar, click Screen Mirroring, then choose a device below Link Keyboard and Mouse.
Move between screens. On your Mac, use your mouse or trackpad to move the pointer to the right or left edge of the screen closest to your iPad, pause, then move the pointer slightly past the edge of the screen. When a border appears at the edge of the iPad screen, continue moving the pointer to the iPad screen.
Drag and drop. Select the text, image, or other object you want to move, then drag it to where you want it on your other device. For example, you can drag a sketch you drew with Apple Pencil from your iPad to the Keynote app on your iMac. You can also copy something on one device and paste it on the other.
Share a keyboard. When the pointer is in a document or anywhere that you can enter text and the insertion point is blinking, begin typing.
Learn more. See Use your keyboard, mouse, and trackpad across devices with Universal Control on Mac in the macOS User Guide.