selecting multable weapons

I have a 5 or 6 weapons that the player can use. each is assigned to a different button but i would like to be able to select a weapon with only only a single button or two buttons for cycling through from weapon one to weapon six etc.

Something like this?

var currentWeapon : int = 0;

function Update ()
{
    if (Input.GetKeyDown(KeyCode.LeftArrow))
        currentWeapon--;
    if (Input.GetKeyDown(KeyCode.RightArrow))
        currentWeapon++;
    if (currentWeapon<0)
        currentWeapon = 5;
    else if (currentWeapon>5)
        currentWeapon = 0;
}