I just had a look through Xtro's CTF cfg file and remembered how he does the grappling hook (grapple) binding. He binds the shift key to it in a momentary fashion so that he has to hold the shift key down to retain the grapple, then fire with his mouse button to extend. When he wants to drop off the wall, he just releases the button, and to return to his previous weapon, he then releases the shift key. Here's how you do that:
alias +grapple "use grapple"
alias -grapple "weaplast"
bind SHIFT +grapple
I prefer to use the toggle action. When I hit shift, I switch to grapple until I hit shift again. While activated, I can use the grapple by firing with the mouse button. Here's how:
alias grap1 "weaplast;use grapple"
bind SHIFT grap1
That one's a bit strange with the weaplast in the front there, but it works!
Ok, for those of you who want a key to do EVERYTHING for you, i.e. change to grapple, fire, stop firing and change back (like commonly in the original Quake CTF), here it is:
alias +grapple "use grapple;+attack"
alias -grapple "-attack;weaplast"
bind SHIFT +grapple
There ya go! If you have any other ideas, why not email em to me.