Getting special keys

Does anyone know how to get the "backspace" and "delete" key into a program so that they can be separated for editing strings?