Event Flex


    creationComplete="initApp()">
    
    private function initApp():void {
        application.addEventListener(KeyboardEvent.KEY_UP,keyHandler);
        myCanvas.setFocus();
    }
    private function keyHandler(event:KeyboardEvent):void {
        var bShiftPressed:Boolean = event.shiftKey;
        if (bShiftPressed) {
            var curKeyCode:int = event.keyCode;
            if (curKeyCode == 80) {
                trace("hi");
            }
        }
    }