Keyboard control using bluetooth module HC-05

You receive the Bluetooth commands by a serial interface. Conveniently the Leonardo has a second serial interface separate from the USB serial interface.

Having received the Bluetooth commands you interpret them and use the Keyboard library functions to send the appropriate keyboard commands to the PC via the USB serial interface