A quick workaround is to briefly plug each one into USB port. That does an immediate forced Bluetooth pairing and then you can unplug the cable.
Maybe other solutions, but that is easiest/fastest one I use occassionally.
(I confess that I ended up just buying a second set of mouse/keyboard; prefer “buy once, cry once” than constantly battling the pairing/re-pairing hassle.)
If you’re happy to give up wireless, plug them into your hub / monitor (if it’s a USB connected monitor), then they’ll be available to whatever device is plugged into the hub / monitor.
That’s not doable with the Magic Mouse due to Apple’s ‘brilliant’ product design (with possibly one of the most user-unfriendly designs ever in the tech sector).
As mentioned before I keep a short lighting cable attached to my Studio Display - the short length lets me hide it rather easily.
In the morning when I attach my work Macbook Pro to my SD I quickly plug my Magic Keyboard and Magic Trackpad to that cable and unplug again after 2-3 seconds which forces a Bluetooth connect. I can do it while my Mac opens the necessary apps so no big deal.
In the evening I repeat the process with my private MacBook Pro if I want to use it stationary.
While not an ideal solution it’s less enough friction and annoyance for me before buying a second pair … and I don’t want any other hardware (burnt by too many ).
I used a TV tray table to make my desk into an “L” shape. My home Mac stayed on my desk and my work PC, which I brought home every night, was placed on the TV tray. I just swivled my desk chair 90 degrees when I wanted to work on the other computer. Kept me from typing the wrong thing on the wrong computer, too, which I think you may find is a problem when you share input devices between two computers.
I also use a Logitech keyboard and mouse, both of which let me switch between devices with the push of a button. But unlike @pantulis, I use bluetooth rather than the unifying receivers so I don’t need to plug anything into my devices.
The workarounds to use Apple keyboards and mice with multiple devices don’t sound worth the hassle to me, and buying separate ones for each device seems like a waste of desk space and money.
Not sure I made my point: Just plug in briefly, 2-3 seconds, unplug, and then the wireless keyboard, mouse, and/or trackpad is paired.
Fastest, easiest, free solution.
But to the avoid “typing on the wrong system” if you are using both at the same time, having a duplicate mouse/keyboard is worth the cost (to me) to avoid accidentally sending the wrong email to personal vs work contacts, for example.
If we don’t see the ability to pair and quickly transfer keyboards and mice between devices the same way AirPods work when the new Magic Keyboard and Magic Mouse are launched — hopefully soon with the new M4 iMacs — then that means Apple simply does not care about this product category very much. The Magic Mouse, while beautiful, is a relic of Jony Ive’s era in terms of design and needs a major rethink.
FWIW, when I am using my AirPods and have my iPhone close to my Mac Studio, the AirPods will jump between systems at exactly the wrong time and to the wrong system that I want.
I definitely hope Apple doesn’t make keyboard/mouse/trackpad auto-switch between two computers the same way
(I always end up disabling Apple’s auto-switching and using AirBuddy menu bar utility to control it myself.)