Home Download Buy Blog Forum Support

Input method support

Re: Input method support

Postby tonytonyjan on Wed Jan 16, 2013 10:13 am

cjacker wrote:This is a dirty fix but at least works. cursor position update also supported.

Use LD_PRELOAD to reimplement gtk_im_context_set_client_window and set im focus in.
use "gdk_region_get_clipbox" to catch the caret position. (It's really difficult to find which function can catch the position....)
...


I've tried your method and got the following result:

Code: Select all
$ gcc -shared -o libsublime-imfix.so sublime_imfix.c  `pkg-config --libs --cflags gtk+-2.0` -fPIC
$ LD_PRELOAD=./libsublime-imfix.so sublime-text
ERROR: ld.so: object './libsublime-imfix.so' from LD_PRELOAD cannot be preloaded: ignored.


Code: Select all
$ uname -ai
Linux tonytonyjan-Latitude-6430U 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


Is there any message I can give you?
tonytonyjan
 
Posts: 2
Joined: Thu Nov 15, 2012 10:54 am

Re: Input method support

Postby RadarNyan on Wed Feb 13, 2013 8:54 pm

cjacker wrote:This is a dirty fix but at least works. cursor position update also supported.

Use LD_PRELOAD to reimplement gtk_im_context_set_client_window and set im focus in.
use "gdk_region_get_clipbox" to catch the caret position. (It's really difficult to find which function can catch the position....)
[/code]


I tried this on Ubuntu 12.04, it works but only work for FCITX not ibus.
I sure get cursor location update, but there still is some problem (actually a big one) - backspace will erase the text before cursor, not character in IME.

So, I guess I just went back to ibus since it makes me feel better :) Anyway, great work.

Another question: is it possible to bring this cursor location update feature to Windows version of sublime?
IME works better on Windows version of sublime, the only problem is cursor location update. If you can fix that, it will be really great.

Enz0 wrote:For Sublime Text 2, there was a nice plugin for supporting input method.


Thanks dude, that works perfect!
Last edited by RadarNyan on Thu Feb 28, 2013 4:00 am, edited 1 time in total.
RadarNyan
 
Posts: 1
Joined: Wed Feb 13, 2013 8:42 pm

Re: Input method support

Postby Enz0 on Tue Feb 26, 2013 1:30 am

For Sublime Text 2, there was a nice plugin for supporting input method.
https://github.com/chikatoike/IMESuppor ... DME_en.org
Now that Sublime Text 3 has threaded plugin system, the plugin no longer works properly, at least in my environment.
Because the plugin hooks the input, there are some side effects like BracketHighlighter becomes unworkable.
Please support the input method correctly, especially with Sublime Text 3 for Windows.
Enz0
 
Posts: 4
Joined: Tue Dec 18, 2012 2:43 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: PangoWarning and 8 guests