Difference between revisions of "IsKeyPressed"
no edit summary
imported>JOG (More Keys) |
imported>Scruggs |
||
Line 76: | Line 76: | ||
* This function doesn't return a value while a [[MessageBox]] is being displayed, presumably because input is switched over to the MessageBox. | * This function doesn't return a value while a [[MessageBox]] is being displayed, presumably because input is switched over to the MessageBox. | ||
* To convert DX scan codes to values usable by this function, use [[DX2VK]]. | |||
* 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 && isKeyPressed curkey ) ; key still being held down | <pre>if ( curKey && isKeyPressed curkey ) ; key still being held down |