keys.<...>

Return to Introduction  Previous page  Next page

Collection of true/false values representing the state of each keyboard key.  A full list of valid key names can be found here.

 

Syntax

 

keys.<key name>

 

All possible values of <key name> are listed in the 'Collection Members' box in the source editor.

 

Also, a new special key name of 'any' allows you to test whether any key is down.

 

Examples

 

function onKeyChange()

{

       if (keys.space)

       {

               sounds.youpressedspace.play();

       }

}

 

Remarks

 

See Also

 

Key Name Reference

Script Reference

 



Copyright ©2004 Worldweaver Ltd. DX Studio Home