How to connect Wireless Keyboard when new hdd on imac 27
Since the OS is not installed on the new HDD the Bluetooth is not operational.

Get a USB keyboard.

Push and hold the power button for 5 seconds!

Then release the power button and push and hold the option key to get the select the os to boot from (having the DVD with OS in the drive).

Alternatively press and hold the C key to boot from the DVD.