On Wed, Apr 19, 2006 at 10:57:44PM +0200, Bram Moolenaar wrote: > Gautam Iyer wrote: > > > I was wondering if it would be possible to add the termcap entries > > <kLeft>, <kRight>, <kUp> and <kDown> and <kInsert> to Vim 7 (for keypad > > keys)? > > > > I really like the '*' form of entering key codes. I hacked mrxvt so that > > modified cursor, function or keypad keys produce escape sequences > > consistent with Vim 7's "*" form modifier termcap sequences. (Now most > > modified keypad / function keys work out of the box with mrxvt-0.5.0 and > > vim 7. Call me biased, but I really don't care so much if these keys > > don't work with other text editors ...) > > > > Unfortunately Vim 7 has termcap sequences for all keypad keys EXCEPT the > > five listed above. Thus I can get my keypad home/end to work, but not > > left/right, up/down and insert. > > > > Additionally, would it also be possible to change the default termcap > > sequences of the keypad keys to use Vim7's wonderful "*" form? > > > > E.g. <kPageUp> should be "^[O*y" and not "^[Oy" by default. > > > > Finally, I notice that <kHome> on my system is '^[[1;*~' by default and > > not '^[Ow'. The remainder of the keypad keys produce a '^[Ox' escape > > sequence (where x is some lower case letter), so shouldn't <kHome> be > > '^[Ow' by default? The '^[Ow' is the sequence produced by all rxvt > > forks, and xterm with the VT220 keyboard (with numlock on while pressing > > shift). > > > > I'd recommend setting <kHome> and <kEnd> to '^[O*w' and '^[O*q' > > respectively, and adding <yHome> and <yEnd> for the sequences '^[[1;*~' > > and '^[[4;*~' respectively. (On some system I think that the linux > > console generates theses sequences by default, so you can call them > > <lHome> and <lEnd> if you like :) > > > > Just one of my pipe dreams to get all my keypad keys *with* modifiers > > working perfectly under Vim 7 & mrxvt-0.5. I don't really use the keypad > > keys too much though, so it's not crucial. However every once in a while > > I attempt moving using the keypad keys and get strange characters > > entered into my buffer ... :) > > I think it's too close to the Vim 7 release to risc breaking something > with the termcap codes. In the past there have been problems with > some combinations of escape sequences. I'll add a remark to the todo > list.
That's too bad. I'll be sure to ask you about it after Vim 7 is released. However, will *adding* the <kLeft> etc sequences be possible? I've a feeling this won't conflict with anything else ... Once added, I can set them to whatever I please in my .vimrc, and happily use my fully functional keypad ;). Thanks, GI -- 'Bachelor' -- One who treats all women as sequels.