Universal Control: Use a single keyboard and mouse between Mac and iPad
Use the keyboard, mouse, or trackpad of your Mac to control up to two other nearby Mac or iPad devices, and work seamlessly between them.
When using Universal Control, each device shows its own screen and apps, but you can use a single keyboard, mouse, or trackpad to move the pointer, type, and even copy content between them.