First, make sure the local Bluetooth controller (e.g. a Bluetooth dongle the built in Bluetooth radio) is recognized:
lsusb
bluetoothctl
[bluetooth]# power on
power on
[bluetooth]# agent on
agent on
[bluetooth]# pairable on
pairable on
[bluetooth]# scan on
scan on
[bluetooth]# pair 01:02:03:04:05:06
pair 01:02:03:04:05:06
[bluetooth]# trust 01:02:03:04:05:06
trust 01:02:03:04:05:06
[bluetooth]# connect 01:02:03:04:05:06
connect 01:02:03:04:05:06
[bluetooth]# quit
quit
details: https://wiki.archlinux.org/title/bluetooth_keyboard