you need to reset the keyboard so that it's no longer paired to any other mac and is discoverable. bluetooth is on by default so it can locate discoverable devices such as keyboard/mouse.
Turn the Apple Wireless Keyboard off.
For an aluminum Apple Wireless Keyboard, hold the keyboard's power button for more than 3 seconds.
For a white Apple Wireless Keyboard, turn over the keyboard, and turn the power switch to the off position.
----------
that's not a link to the thread.
Turn the Apple Wireless Keyboard off.
For an aluminum Apple Wireless Keyboard, hold the keyboard's power button for more than 3 seconds.
For a white Apple Wireless Keyboard, turn over the keyboard, and turn the power switch to the off position.
----------
There is a separate thread on this issue here ...
https://forums.macrumors.com/forums/146/
that's not a link to the thread.