How do I connect a locked keyboard to my iMac?

How do I connect a locked keyboard to my iMac?
Question: Q: How to pair a keyboard when the iMac is locked

Connect the USB keyboard and mouse to the computer.
Open System Preferences – Bluetooth.
Un-pair the wireless keyboard and mouse.
Turn off Bluetooth.
Restart the computer in Safe Mode per the directions in https://support.apple.com/en-us/HT201262.

Question: Q: How to pair a keyboard when the iMac is locked
  1. Connect the USB keyboard and mouse to the computer.
  2. Open System Preferences – Bluetooth.
  3. Un-pair the wireless keyboard and mouse.
  4. Turn off Bluetooth.
  5. Restart the computer in Safe Mode per the directions in https://support.apple.com/en-us/HT201262.