Director
Keyboard Events
The director object can receive keyboard events. In fact, it is not a director object's property, but a CAAT environment property.
Simply by calling:
CAAT.registerKeyListener( function(key,action) { if ( key==68 && action=='up') { director.debug= !director.debug; } });