基本上就是port ibus-hangul……因为我不懂韩文。 不过额外比起来有quickphrase可以用 🙂
=-=-=-=-=
Powered by Blogilo
基本上就是port ibus-hangul……因为我不懂韩文。 不过额外比起来有quickphrase可以用 🙂
=-=-=-=-=
Powered by Blogilo
虽然精确说来其实都过了好些天了。
http://fcitx.csslayer.info/wiki/History
里面有一个暴长的版本历史,不知道能唤起多少人的回忆呢。
上面是最近整理的一些关于历史的小内容。
曾经做的视频用 Gource 输出的 Fcitx 开发记录。
P. S.
上面的网址打算作为以后的 fcitx.org ,前提是我能把域名搞到……
fcitx 4.2.1
Changes related to API:
1. Cleanup Unused macro and API
2. Some new FcitxInputState series API for get the origin key event for frontend.
3. Portable with custom path, hide two path related API that may break portable.
4. Make FcitxHotkeyGetKey process latin letter and strip shift modifier for them.
5. Ability to bind menu with a status.
6. Ability to update client preedit with formatted string.
Change related to user:
1. Update Taiwan punctuation
2. Quick Phrase can use grave as trigger key.
3. ctrl rshift can switch input method in reverse order.
4. 2nd 3rd candidate choosing key will not conflict with same switch key.
5. AutoEng can accept upper case english key which is not the initial key.
6. Add Zenkaku_Hankaku and Hangul as default trigger key when locale is ja and ko.
7. Add Symbolic icon for gnome-shell’s kimpanel.
fcitx-configtool 0.4.1
1. Tree view for input method choosing
2. Better UI layout, keep focus on last selected input method when move up and down.
3. update gtk3 version to use gtk3 new API.
fcitx-googlepinyin 0.1.5
Portable to run with archive
fcitx-sunpinyin 0.3.4
Portable to run with archive
fcitx-keyboard 0.1.1
1. Use aspell by default, for performance
2. keyboard layout change can be ignored, but force to apply for fcitx-keyboard-series.
fcitx-libpinyin 0.1.1
1. Portable
2. Can use traditional chinese data for pinyin and simplified chinese data for zhuyin
3. Use tone for zhuyin by default
4. When using Zhuyin, Enter for first candidate, Shift+Enter for commit English Character
kcm-fcitx 0.3.1
1. sync with head.
fcitx-chewing 0.1.1
Fix a bug when input is too long
fcitx-table-extra 0.2.0
1. update Traditional Chinese translation
2. Add Quick 3,5 and classic
fcitx-m17n 0.1.0
1. New release, with m17n support.
这次一个比较重要的更新是把可以改成四处运行的输入法都进行了对应修改。以及M17N,和Mozc的支持(由于Mozc的特别原因不太适合直接更新tarball),另外源码压缩格式改为xz。
fcitx 4.2.1
API相关:
1. 清理无用的API和宏
2. 保留原始按键信息
3. fcitx-config中可能导致portable问题的api都已隐藏
4. FcitxHotkeyGetKey 也处理非英语的拉丁字母的shift按键并忽略
5. 状态按钮和菜单绑定。
6. 客户端窗口支持格式
7. 允许使用绝对路径作为图标
用户相关:
1. 更新台湾的标点
2. 快速输入也可以配置成使用反引号
3. ctrl + rshift 反向遍历输入法
4. 二三候选词键不再和快速切换键冲突
5. 自动英文也可以用于处理非大写开头的英文
6. 日语和韩语的locale默认增加另外不同的触发键
7. 为gnome增加symbolic风格的kimpanel图标。
fcitx-configtool 0.4.1
1. 输入法选择使用树状视图
2. 更新界面
3. gtk3部分使用新的gtk3的API
fcitx-googlepinyin 0.1.5
增加Portable支持
fcitx-sunpinyin 0.3.4
增加Portable支持
fcitx-keyboard 0.1.1
1. 由于hunspell的性能问题,默认优先使用 Aspell
2. 键盘布局切换将强制应用于fcitx-keyboard的输入法,对其他输入法可以配置为可忽略。
fcitx-libpinyin 0.1.1
1. 增加Portable支持
2. 可以对拼音/注音分别设置使用简体或繁体数据。
3. 注音默认使用声调
4. 使用注音时用回车确认,Shift Enter直接输入英文。
kcm-fcitx 0.3.1
和主干同步。
fcitx-chewing 0.1.1
修复一个较长输入时清空输入内容的bug
fcitx-table-extra 0.2.0
1. 更新繁体翻译
2. 增加速成系列码表
fcitx-m17n 0.1.0
新组件,提供m17n-lib支持。
感谢 Cheer Xiao 实现的 fcitx-m17n,以及其他帮助测试的人。
http://code.google.com/p/fcitx/issues/detail?id=528
这是起因,当然铺垫还有很多,我就懒得说了。
Glib 使用 C 实现 signal 的一个缺陷。具体来讲就是这么回事,在glib里面,很多时候处理signal,为了通用,以及能够使用同一个函数作为signal_connect,于是所有的函数指针都会转化为 (void*)(G_CALLBACK)
g_signal_connect(context->slave, "commit", G_CALLBACK(_slave_commit_cb), context);
那么问题在于,缺少对 callback 函数的合法性验证,可能会出现各种潜在的问题。在不是有意为之的前提下,程序员仍然会更容易犯错误。
拿pidgin里面的一个问题举例,pidgin的状态输入框,不知道有没有人注意到,在里面用backspace和输入法是很不正常的,会同时删掉输入法这边和pidgin里面两个字符。
为什么?明显是一个按键事件被搞了两次。
我的一个朋友花了一些时间去debug这个问题:
Finally I traced it down to the problem. 我本来是看见这么一行: g_signal_connect(G_OBJECT(gtkconv->entry), "key-release-event", G_CALLBACK(gtk_conv_key_press_cb), NULL); 去掉就没事了。 这个函数如下: static void gtk_conv_key_press_cb(GtkWidget *tv, GdkEventKey *event, gpointer data) { gboolean togglemenus = purple_prefs_get_bool(PREF_TOGGLE_MENUS); gboolean enabled = purple_prefs_get_bool(PREF_ENABLED); if(enabled && togglemenus){ if(event->state & GDK_CONTROL_MASK){ if(event->keyval == GDK_F11){ ToggleConvMenu(); } } } }
好吧,看起来很正常吗?编译器都会很happy的连warning都没有就run过去了。
但是实际上key-release-event的返回值是gboolean。
于是人民群众喜闻乐见的输入法bug来了。这个函数本来应当提供返回值,但是没有提供,在c里面这个指针在注册的时候是没有经过类型检查的,于是出现了一个本不应当注册的函数。但是在调用的时候,其实是预留了返回值的位置(由编译器),所以不会出现导致crash的错误,但是依然会导致这个返回值出于未定义状态。
好吧,那么当年scim和ibus为了从源头干掉这些中低水平程序员问题,于是用了gtk_key_snooper,使得所有gtk程序的按键事件先从im module这边走一圈,然后才会丢回给程序。于是今天我也给fcitx加了key snooper(要不然真没法活了),我本来对于程序和输入法之间的观点是,程序应该保持行为正常,输入法尽量不干预,即使我在最初实现fcitx的gtk的im module的时候可以实现它,我还是没去用,不过gtk程序们抱歉了,如果你们当中连gedit这种货色都敢来惹我,我没理由不相信类似情况是在gtk程序中普遍存在的,是你们先来惹我的。
但输入法本来提供的接口只有imcontext那些,这也就是感谢上苍还肯给输入法个活路。但是一个bug即使workaround掉了,还是一个bug。如同药片裹了糖衣,它还是药片,只不过……嗯,没那么难吃罢了。
Compiling Mozc is a really just as hard as Chromimum, so I don’t recommend to try it now, I haven’t finished doing all the build system related work for Mozc.
fcitx-m17n is quite a lot simple, just use the regular way to compile it:
mkdir build cd build; cmake .. -DCMAKE_INSTALL_PREFIX=`fcitx4-config --prefix` make sudo make install
They are both on github:
http://github.com/fcitx/fcitx-m17n
http://github.com/fcitx/mozc (a pseudo fork, for the reason, check the read me.)
You will need fcitx from git.
Have fun!