Difference between revisions of "IsKeyPressed2"
Jump to navigation
Jump to search
messed up Note
imported>DragoonWraith (OBSE) |
imported>DragoonWraith (messed up Note) |
||
Line 65: | Line 65: | ||
==Notes== | ==Notes== | ||
* 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 && | * 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 | |||
return ; wait until it's released | return ; wait until it's released | ||
else | else | ||
Line 71: | Line 72: | ||
endif | endif | ||
if ( | if ( isKeyPressed2 <keyCode> ) | ||
; do stuff | ; do stuff | ||
set curKey to <keyCode> | set curKey to <keyCode> |