# How to bind melee with special options

**URL:** <https://discourse.ioquake.org/t/how-to-bind-melee-with-special-options/972>\
**Category:** support\
**Created:** [September 8, 2017, 12:45am UTC](https://discourse.ioquake.org/t/how-to-bind-melee-with-special-options/972 "2017-09-08T00:45:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spaceman1980](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@spaceman1980](https://discourse.ioquake.org/u/spaceman1980)\
**Post date:** [September 8, 2017, 12:45am UTC](https://discourse.ioquake.org/t/how-to-bind-melee-with-special-options/972/1 "2017-09-08T00:45:30Z")

</div>

Hi ioquake3 forums,  
I was wondering if there is any possible way to bind my ‘Q’ key to melee. Of course I can make it switch to the gauntlet, but I want it to switch to Gauntlet when I press it, when I have ‘Q’ held down, the gauntlet is spinning (as if I’m using primary fire) and when I release ‘Q’ it switches back to (hopefully) the previous weapon. Even if thats not possible, and it would have to switch to a specific weapon, that would be fine. I know the buttons on the keyboard have specific events for press and release, but I have no experience binding these in Quake. Thanks so much if any of you answer.

P.S. Ioquake3 is awesome! The only problem I have is no botfiles, I have to figure that out ☹

---

<div class="post-metadata">

**Author:** ![zturtleman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/zturtleman/32/718_2.png) [@zturtleman](https://discourse.ioquake.org/u/zturtleman)\
**Post date:** [September 8, 2017, 4:25am UTC](https://discourse.ioquake.org/t/how-to-bind-melee-with-special-options/972/2 "2017-09-08T04:25:08Z")

</div>

The Quake 3 bind system does not allow for executing separate commands on key press and release. I don’t think anything similar to what you’re looking for can be done.

However, the OSP mod has a +vstr command which allows separate press/release commands. This will on key press switch to gauntlet and attack, then on release stop attacking and switch to Machine Gun.

```auto
set q_down "weapon 1; wait 2; +attack"
set q_up "-attack; weapon 2"
bind q +vstr q_down q_up

```

Regarding botfiles; make sure you have baseq3 pak1 through pak8 and a ioquake3 test build. Check out the [players guide](http://wiki.ioquake3.org/Players_Guide#Windows).
