Vladimir Pavlov wrote:
> I use vim-7.2.441 and I use vim's great langmap feature when writing
> russian texts.
>
> But when I try pressing ^[ to exit insert mode (or ^O to exit it
> temporarily) in russian xkb layout I got `È' (the russian character
> placed at the same key as `[') inserted instead of exiting.
>
> The following patch fixes the issue (besides Control it also processes
> Alt and Win keys in similar way).
>
> Can it be commited to vim repository?
>
> diff -Napur vim72.orig/src/gui_gtk_x11.c vim72/src/gui_gtk_x11.c
> --- vim72.orig/src/gui_gtk_x11.c 2010-06-01 13:43:45.000000000 +0400
> +++ vim72/src/gui_gtk_x11.c 2010-06-01 13:45:59.000000000 +0400
> @@ -878,6 +878,9 @@ keyval_to_string(unsigned int keyval, un
> uc = gdk_keyval_to_unicode(keyval);
> if (uc != 0)
> {
> + if (state & (GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK))
> + LANGMAP_ADJUST(uc, TRUE);
> +
> /* Check for CTRL-foo */
> if ((state & GDK_CONTROL_MASK) && uc >= 0x20 && uc < 0x80)
> {
I don't think this is the right solution. Any key typed with CTRL would
be affected. I think you need to find a way to produce Esc in your
russian layout.
--
hundred-and-one symptoms of being an internet addict:
197. Your desk collapses under the weight of your computer peripherals.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php