xterm-color key issues fixed
xterm-color blows as a TERM. Even vt100/200, xterm (and xterm-256color) send proper values for F1..F4 and backtab. xterm-color sends a 27,79,80 for F1 (i.e., three keys). So I spent the wee hours of last night hacking some ugly lines into
window.getchar() to trap these combinations.
Then i found that backtab is 27,79,81. Added more ugly code for that. But that’s about it.
What is problematic is that xterm-color sends 27,79 for M-O (Meta or Alt O). I checked manver’s VER::keyboard.rb and for xterm-color it (incorrectly) sends “M-O” followed by the character “P”, although the code appears to check for this combination (See SPECIAL_KEYS in his code).
So now my
getchar() will send a M-O or F1 correctly for xterm-color, although the M-O takes a little longer to be passed to your program since it waits for getch to return -1.
I suggest avoiding xterm-color since other keys could also bomb at some time. Please tell me if there are fixes for it. I like “screen” the best, although it doesn’t show underlines.