Connect your keyboard to your computer's sound card or audio interface input using MIDI cables. Run a second MIDI cable back to your keyboard from the MIDI output port on your sound card or interface.
Launch Logic and add your keyboard to the program's list of control surfaces. Click "Logic Pro" on the main menu, select "Control Surfaces" and click "Setup." Click "New," click "Install" and then select your MIDI keyboard on the list of devices. Click "Scan" and close the window once Logic finishes installing the keyboard as a control surface.
Click the "+" icon at the top of the Tracks column to open the track-creation dialog.
Click "Software Instrument" and click "Create" to create a new track for your keyboard.
Click an empty plugin slot on the track, highlight "External Instrument" and click "Stereo."
Configure your plugin options. Click the "MIDI Device/Instrument" drop-down menu and select your MIDI keyboard from the list of available devices. Click the "MIDI Channel" drop-down menu and select "All." Click the "Input" drop-down menu and select "1,2."
Click the "R" icon on the track to arm it for recording. You will know the track is armed when the "R" button changes color.
Click the "Record" button on the main interface in Logic to begin recording audio sent to your computer from your MIDI keyboard. Press the space bar when you are finished.