2009/8/20 Kazuki Sakamoto:
>
> I made a patch of TIS handling for cooperation with iminsert/imsearch.
>
>
> Explanation of this patch:
>
>  > NOTE: Check IM state _before_ key has been interpreted or we'll pick up
>  > the old IM state when it has been switched via a keyboard shortcut that
>  > MacVim cannot handle.
>
> A keyboard shortcut for switching IM state (link Command-Space) does
> not reach MacVim. So MacVim checks IM state when keyDown: called. I
> modified the timing of checking IM state in keyDown: method.
>
> Case of checking IM state before/after ESC key:
> before: IM switch(off>on) > check IM state(on) > handle key > save 
> iminsert(on)
> after : IM switch(off>on) > handle key > save iminsert(off) > check IM 
> state(on)
>
> I expected _before_ behavior.
>
> BTW, I tried to use CFNotificationCenterAddObserver with
> kTISNotifySelectedKeyboardInputSourceChanged for handling when IM is
> enabled/disabled, but I couldn't.
>
> http://developer.apple.com/documentation/TextFonts/Reference/TextInputSourcesReference/Reference/reference.html#//apple_ref/doc/uid/TP40006199-CH4-SW1
>
>
>  > HACK!  interpretKeyEvents: does not call doCommandBySelector:
>  > with Ctrl-6 or Ctrl-^ when IM is active.
>
> Ctrl-^ switches IM state in Vim, it works properly on MacVim when IM
> is not active. So I hacked handling Ctrl-6 and Ctrl-^ when IM is
> active.
>
>
>  > Save current locale input source for use when IM is active and
>  > get an ASCII source for use when IM is deactivated (by Vim).
>
> Ctrl-^ could not switch IM state without it.

Thanks, I'll take a look at the patch as soon as I get a chance.  I
was hoping there would be a solution to this problem that didn't
resort to hackery...but for some reason the Kotoeri manager "eats"
Ctrl-6 and translates it to "6".  *sigh*.

Björn

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to