Monday, February 7, 2011

Set default half punctuation in IBUS

I usually use half punctuation even when I am typing Chinese character. I should use full punctuations unless I need to type some formal and official documents. Every time, I launch IBUS which these two action "Ctrl+space" to turn on IBUS and then "Ctrl+." to switch to half punctuation mode.

Recently, I take a look of IBUS source code and I found how IBUS determine which mode is turned on by default. It look at the table database file. For me, I use cangjie3. Thus I edit the database with sqlite3 (you can use apt-get to install it)
$ sqlite3 /usr/share/ibus-table/tables/cangjie3.db

Then, you can view your current setting by:
select * from ime;

You can see that by default,def_full_width_punct is set to be TRUE. Thus, I simply set it to be FALSE using sql:
update ime set val='FALSE' where attr='def_half_width_punct';

Finally, you just need to restart IBUS and you will find the default punctuation mode is half.

No comments:

Post a Comment