The functions used in the Dashboard to read the keyboard are in the Connectivity -> Input Device Control function palette.
Use the Initialize Keyboard function to get a "device ID" output, and pass that into the loop that reads the keyboard using the Acquire Input Data function. The result will be an array of keys being pressed. If the length of the array is zero, no keys are pressed. If you don't want to be able to handle multiple keys pressed at the same time, just use an Index Array function to pick out the first element of the array.
The Smart Dashboard functions used to send data to the robot are in the WPI Robotics Library -> Dashboard function palette.
Use the SD Write String function to put the value of the key being pressed (or a null string if no keys are pressed) into a Smart Dashboard variable.
In the C++ code, use the NetworkTables support to read the value of the variable out of the SmartDashboard table.
http://wpilib.screenstepslive.com/s/...client-pc-side gives a lot of information and some example code for using NetworkTables.