fscommand("trapallkeys", "true"); Key.addListener(this); this.onKeyDown = function():Void { if (Key.getCode() == Key.ESCAPE) { trace("привет"); } };