stage.addEventListener(KeyboardEvent.KEY_DOWN, Function_1); Function_1(event:KeyboardEvent) { if (event.keyCode == Keyboard.ENTER) trace("Enter the matrix."); }