KeyboardInputLogger
I get
"charCode: 0 ctrlKey: false keyCode: 255 keyLocation: 0 shiftKey: false"
every 1sec
what's wrong with my WindowsXP !!!?!?
♥0 |
Line 19 |
Modified 2010-01-12 21:14:18 |
MIT License
archived:2017-03-09 22:53:49
ActionScript3 source code
/**
* Copyright mash ( http://wonderfl.net/user/mash )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/vK7H
*/
// I get
// "charCode: 0 ctrlKey: false keyCode: 255 keyLocation: 0 shiftKey: false"
// every 1sec
// what's wrong with my WindowsXP !!!?!?
package {
import com.bit101.components.Text;
import flash.display.Sprite;
import flash.events.KeyboardEvent;
public class KeyboardInputLogger extends Sprite {
private var logger :Text;
public function KeyboardInputLogger() {
logger = new Text( this, 0, 20 );
logger.width = 465;
logger.height = 465;
addEventListener( KeyboardEvent.KEY_DOWN, function(e :KeyboardEvent) :void {
log( "charCode: "+e.charCode+ " ctrlKey: "+e.ctrlKey+" keyCode: "+e.keyCode+" keyLocation: "+e.keyLocation+" shiftKey: "+e.shiftKey);
});
}
private function log( str :String ) :void {
logger.text += str + "\n";
}
}
}