Difference between revisions of "IsKeyPressed2"

Jump to navigation Jump to search
187 bytes added ,  15:41, 20 February 2007
no edit summary
imported>DragoonWraith
(putting codes on the bottom, below Notes, because it's long)
imported>Scruggs
Line 11: Line 11:


* As well as the normal DX scancodes, you can use the numbers 256 to 263 to check for mouse button presses, and also 264 and 265 to check for mouse wheel movement.
* As well as the normal DX scancodes, you can use the numbers 256 to 263 to check for mouse button presses, and also 264 and 265 to check for mouse wheel movement.
* This function will return false if a key which was previously disabled using [[disableKey]] is pressed, but will return true if a mouse button is pressed while that button is disabled.
* Bear in mind that this function returns 1 for as long as the key is held down, so it's generally a good idea to trap the key and then wait until it is released, i.e.:
* Bear in mind that this function returns 1 for as long as the key is held down, so it's generally a good idea to trap the key and then wait until it is released, i.e.:
<pre>if ( curKey && isKeyPressed2 curkey ) ; key still being held down
<pre>if ( curKey && isKeyPressed2 curkey ) ; key still being held down
Anonymous user

Navigation menu