On Tue, Mar 31, 2009 at 7:52 PM, John Beckett <[email protected]> wrote:
>
> MisterW wrote:
> > Gvim 72 on XP won't let me map certain ctrl key combinations.
> > Specifically it won't map any of CTRL 1 through to 10. If I
> > type
> >
> > CTRL-V CTRL-1
> >
> > I get nothing. Only 2 and 6 actually print anything. Other
> > applications make use of these keys, and vim itself uses
> > CTRL-6. Is there something that can be done to make this work?
>
> No. The problem is that Vim is designed to be portable; it works
> on many operating systems and tries to minimise the amount of
> special code used for dealing with a particular OS.
>
> It's not Ctrl-6, it is Ctrl-^ which is part of the venerable
> ASCII system. There is a lot more than you want to know at
> http://en.wikipedia.org/wiki/ASCII
If you look at process_message() in gui_w48.c (Windows Gvim) and
decode_key_event() in os_win32.c (Win32 console Vim), you'll find some
special-case handling:
/* Ctrl-6 is Ctrl-^ */
/* Ctrl-2 is Ctrl-@ */
/* Ctrl-- is Ctrl-_ */
I added the remapping hack for console Vim nearly 15 years ago, mostly
because I couldn't stand typing Ctrl-Shift-6 to toggle between
buffers.
The other Ctrl-<numeral> combinations are discarded, presumably
because they have no ASCII equivalent.
--
/George V. Reilly [email protected]
http://www.georgevreilly.com/blog http://blogs.cozi.com/tech
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---