Chris Frederick wrote:
> <snipped>
> 
> But none of the shift function keys are doing what I want.  If I open 
> vim and do Ctrl-K and then a Shift-F5, instead of a "<S-F5>" I get 
> "<HELP>", and when I try it with F6 I get "[29~".
> 
> Does anyone here know what's going on?  I'm running gentoo, fluxbox, and 
> Eterm, all with mostly default settings, so I don't think they would 
> be messing with any key mappings or anything, xev shows everything 
> working ok.  Any help would be great.
> 
> <snipped>

Why is it that when you spend hours looking for something and ask for 
help, you find it yourself in an hour or so?

I tried different terminals and found that xterm works perfectly.  So it 
must be a problem with eterm, and sure enough:

http://www.eterm.org/docs/view.php?doc=ref

Looks like eterm (and several others btw) are mapping <S-F1-10> to 
<F11-20>.  This seems kind of odd.  This makes <S-F1>=<F11>, and 
<S-F2>=<F12>.  So instead of 24 function key combinations, I'm cut down 
to 20.  I'm not seeing anything obvious available to change this 
"feature" (commenting out the code in term.c and recompiling didn't do 
what I want), but I'm still looking.

For now though ':help :map' to the rescue.  I've remapped the <S-Fx> 
keys to the key codes being given by eterm.  Just added this to my .vimrc:

set <S-F3>=[25~
set <S-F4>=[26~
set <S-F5>=<xHelp>
set <S-F6>=[29~
set <S-F7>=[31~
set <S-F8>=[32~
set <S-F9>=[33~
set <S-F10>=[34~
set <S-F11>=[23$
set <S-F12>=[24$
"F15 is apparently the help key, so undo it's mapping so I can use it.
map <Help> <Nop>
map! <Help> <Nop>

If anyone knows a quick and easy way to make eterm/rxvt/etc.. work more 
like xterm for key bindings, please let me know.  Something tells me I 
cant just swap out term.c and expect everything to work, but I'll keep 
digging.

Thanks again for any help.
Chris Frederick