Note that you CANNOT use key[] scan codes with Unpress. It only works with button values. Not only that, but the following code will NOT work:
if(key[SCAN_DOWN])
{
//code to move a menu pointer down
unpress(6);
}
Even though key[SCAN_DOWN] and the variable "down" will both get detected by pressing the down arrow key while updatecontrols is in effect, the game will continue to detect that key[SCAN_DOWN] is true even though unpress(6) will set the button variable "down" to false.
Use the button variables whenever possible.