How to use a custom keybind to run a custom function.

I am trying to make a bow which has special ability to shoot a fireball every 30seconds using the Q key.
Continue to help post