Does anyone know a way to take a keystroke input and convert it to hex. I know about the hex() and ord() functions, but I don't know if I am using them right. The idea is to take a tn3270 program that doesn't know how to use the F1-F24 function keys as they are and modify the key mapping file so they work. For example, right now they need to do Esc+1 to represent the F1 key and they want to be able to hit the F1 key and have it perform what Esc+1 does.