Can't connect Apple Wireless Keyboard using Bluetooth
I turn on Bluetooth on the keyboard, then on my MacBook Pro. The keyboard appears in the list of devices, with a 'Connect' button. I hit connect. Nothing happens until I hit 'return' on the keyboard (no other key produces any activity), at which point a popup displays with the 6-digit challenge code displayed; the popup disappears (since I've just hit 'return') but because no passcode was entered, the connection fails. How can I get this computer to recognize this keyboard? The same problematic behavior occurs on an older Mac mini.
MacBook Pro 13″, macOS 13.5