Difference between revisions of "GetAltControl"

Jump to navigation Jump to search
266 bytes added ,  18:09, 17 October 2006
Converting return value to DX scancode
imported>JOG
imported>Scruggs
(Converting return value to DX scancode)
Line 18: Line 18:
* If there is no button bound to the requested control, or if the requested control is not valid, this function will return 65535. (-1, if read as a short)
* If there is no button bound to the requested control, or if the requested control is not valid, this function will return 65535. (-1, if read as a short)
* If you want to know which keyboard key, if any, is bound to a control, use [[GetControl]].
* If you want to know which keyboard key, if any, is bound to a control, use [[GetControl]].
* To convert the value returned by [[GetAltControl]] to a DX scancode usable with [[IsKeyPressed2]], do something like this:
<pre>short button
set button to getAltControl 4 ; attack button
if ( button != -1 )
  set button to ( button - 255 ) / 256 + 256
endif</pre>


==Control IDs==
==Control IDs==
Anonymous user

Navigation menu