How to connect wireless keyboard on login screen [duplicate]

See if this works:

Unplug ALL USB devices, have your wireless keyboard and mouse turned on, and restart. The system sees that there are no input devices and searches for them. Then asks you to type a passcode and hit return.

If you have the Apple Keyboard 2 which has the Lightning port on the back of the keyboard, all you need to do is connect the USB -> Lightning cord to the computer and it will just like a normal wired keyboard.


Found the solution by pure luck.

When you are unable to login he lets you restart into a limited recovery mode where you can use forgot password or reset password. I've also had disk encryption and he didn't let me use terminal or anything fancy.

When you get into that mode without anything connected to the mac he asks you to turn on the keyboard and mouse before continuing. I disconnected everything as the entire internet suggests but he wouldn't connect to keyboard.

I use a non-apple mouse and when I give up and connect the mouse it lets me "next" wireless mouse has been detected which closed the dialog.

The catch: Use Apple mouse instead of your regular mouse!

If you use Apple mouse the "next" button no longer close the menu but move you into keyboard pairing where he offers you to enter the 6-digit code and connect the keyboard!

If you do not have Apple mouse - good luck.

Edit: A moderator tried to change my response to imply that the solution does work without Apple mouse if you wait longer. It does not. I waited for almost an hour. If you disagree, write a comment. Don't try to put words in my mouth.