Question: how to connect a wireless keyboard to raspberry pi 3?
Answer: From the Raspberry Pi desktop, open a new Terminal window.
Type sudo bluetoothctl then press enter and input the administrator password (the default password is raspberry).
Next, enter agent on and press enter. ... 
Type scan on and press enter one more time. ... 
To pair the device, type pair [device Bluetooth address].