PuTTY issues

Question
Strange things happen when I use c3270 with PuTTY. For example:
 * Line-drawing characters are wrong (they just seem to be a bunch of q's).
 * PF keys generate garbage on the screen or are simply wrong

Answer
First, you need to make sure that your TERM environment variable is set correctly. It needs to be putty, not xterm or vt100. That usually takes care of both of the above issues.

There is a more subtle issue with PF keys and PuTTY, however. PuTTY has some odd ideas about function keys. F1 generates an escape sequence consistent with F1 in the terminfo definition, and so does F1, F2, etc., all the way to F12.

However, Shift-F1, which should (from a 3270 perspective) generate F13, generates F10 instead. Shift-F2 generates F11, etc., all the way to Shift-F10, which generates F19. Shift-F11 generates F11, and Shift-F12 generates F12. There do not appear to be any keys that generate F20, F21, F22 or F23.

The workaround for this is simple. c3270's default keymap maps Ctrl-a, F1 into PF(13), Ctrl-a, F2 onto PF(14), etc., all the way to Ctrl-a, F12 mapping onto PF(24). So if you don't mind a two-key sequence, the problem is solved.