SWEPs & buttons.

How can I make something happen when you have the SWEP out and you press alt for example?

[lua]
function SWEP:AltPressed()

–alt was presed, do shit
end

function SWEP:Think()

if self.Owner:KeyDown(IN_WALK) and !self.Owner:KeyDownLast(IN_WALK) then
    self:AltPressed()
end

end
[/lua]

Also IN_KEYS if you want to use other keys.