Difference between revisions of "IsKeyPressed2"
note about checking mouse buttons
imported>DragoonWraith (DX scancode list) |
imported>Timeslip (note about checking mouse buttons) |
||
Line 97: | Line 97: | ||
==Notes== | ==Notes== | ||
* 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. | |||
* 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 |