Checks whether a certain mouse button is down.

This function does not detect mouse wheel scrolling; you must use the [[love.wheelmoved]] (or [[love.mousepressed]] in version [[0.9.2]] and older) callback for that. 

== Function ==
{{newin|[[0.10.0]]|100|type=variant}}
=== Synopsis ===
<source lang="lua">
down = love.mouse.isDown( button, ... )
</source>
=== Arguments ===
{{param|number|button|The index of a button to check. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant.}}
{{param|number|...|Additional button numbers to check.}}

=== Returns ===
{{param|boolean|down|True if any specified button is down.}}

== Function ==
{{oldin|[[0.10.0]]|100|type=variant}}
=== Synopsis ===
<source lang="lua">
down = love.mouse.isDown( button )
</source>
=== Arguments ===
{{param|MouseConstant|button|The button to check.}}
=== Returns ===
{{param|boolean|down|True if the specified button is down.}}
== Function ==
{{newinoldin|[[0.7.2]]|072|[[0.10.0]]|100|type=variant}}
=== Synopsis ===
<source lang="lua">
anyDown = love.mouse.isDown( button1, button2, button3, ... )
</source>
=== Arguments ===
{{param|MouseConstant|buttonN|A button to check.}}
=== Returns ===
{{param|boolean|anyDown|True if any specified button is down, false otherwise.}}

== Example ==
=== Increase a value while the right mouse button is held ===
<source lang="lua">
val = 0   -- establish a variable for later use
function love.update(dt)
	if love.mouse.isDown(2) then
		val = val + dt   -- we will increase the variable by 1 for every second the button is held down
	end	
end
</source>

== See Also ==
* [[MouseConstant|Mouse Constant / buttons]]
* [[parent::love.mouse]]
* [[love.mousepressed]]
* [[love.mousereleased]]
* [[love.keyboard.isDown]]
[[Category:Functions]]
{{#set:Description=Checks whether a certain button is down.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.mouse.isDown}}