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: 5
Joined: Tue Dec 18, 2012 2:43 pm

Re: Input method support

Postby dmikalova on Tue May 21, 2013 10:51 pm

I wasn't able to use my compose key at all on Arch Linux running KDE with xim in ST2, I tried scim but it didn't supposed custom compose keys from ~/.XCompose, but I was able to fix this for Linux by changing to scim-uim

To enable this for all GTK apps, put this into your ~/.xprofile after installing scim-uim, and then restart X:
Code: Select all
    GTK_IM_MODULE=uim-scim

Note that there are other ways to do this that make this work for all users on the computer and whatnot.
To run it just for ST2, or test it out without restarting, run this in your preferred console, set it as a bash alias, etc:
Code: Select all
    export GTK_IM_MODULE=uim-scim subl

Compose, and ~/.XCompose should now work.
dmikalova
 
Posts: 4
Joined: Tue May 21, 2013 10:43 pm

Re: Input method support

Postby bodaShandis on Thu Oct 10, 2013 6:31 pm

Sublime text used to be my favorite. Now due to this problem I've had to switch editors. So upsettting.
bodaShandis
 
Posts: 1
Joined: Thu Oct 10, 2013 6:28 pm

Re: Input method support

Postby whitequark on Mon Apr 14, 2014 3:05 am

whitequark
 
Posts: 6
Joined: Wed Aug 29, 2012 6:03 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 6 guests