-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathREADME
159 lines (115 loc) · 5.02 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Nimf is an input method framework, it has a module-based client-server
architecture where applications act as clients and communicate with the Nimf
server via toolkit-specific input context modules and one socket per process.
Nimf provides
* Input Method Server
* nimf-daemon including XIM
* Language Engines
* Chinese: nimf-sunpinyin (in alpha stage, based on sunpinyin)
* Japanese: nimf-anthy (not yet, based on anthy)
* Korean: nimf-libhangul (based on libhangul)
* Client Modules
* GTK+2, GTK+3, Qt4, Qt5
* Indicator
* nimf-indicator (based on libappindicator3) for Unity, GNOME Panel, KDE
* Development files
Project Homepage: https://github.com/cogniti/nimf
License
-------
Nimf is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nimf is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; If not, see <http://www.gnu.org/licenses/>.
Install
-------
* Compile
./autogen.sh
make
sudo make install
sudo ldconfig
sudo make update-gtk-im-cache
sudo make update-gtk-icon-cache
* To use symbols in libhangul engine
wget https://raw.githubusercontent.com/choehwanjin/libhangul/master/data/hanja/mssymbol.txt
sudo mv mssymbol.txt /usr/share/libhangul/hanja/
ls /usr/share/libhangul/hanja/mssymbol.txt
Configure
---------
* For GNOME Shell, use 3rd party gnome-shell-extension-appindicator
https://extensions.gnome.org/extension/615/appindicator-support/
https://github.com/rgcjonas/gnome-shell-extension-appindicator
* Configure im-config
Run im-config, then select Nimf, logout and login.
* Configure Hangul/Hanja key if you use a keyboard
without hardware Hangul/Hanja key
Use xkb-data >= 2.14, then
Select "Right Alt as Hangul, right Ctrl as Hanja" or
"Right Ctrl as Hangul, right Alt as Hanja" from gnome-tweak-tool.
Troubleshoot
------------
* Failed to load shared library
Check /etc/ld.so.conf and /etc/ld.so.conf.d/ for /usr/local/lib path
Architecture
------------
+- im modules --+ +-- each process ---+ +- a process --+
| gtk im module | | nimf-indicator | | X server |
| qt im module | +-------------------+ +--------------+
+---------------+ | ^ |
| calls | calls | |
+-----------------+ +--------------------+ | |
| nimf IM library | | nimf agent library | | | communicates
+-----------------+ +--------------------+ | |
^ | ^ | | |
| | communicates | | | |
| | via Unix Socket | | | |
| v | v | v
+---------------------- a process ----------------------+
| nimf-daemon (including XIM) |
+-------------------------------------------------------+
| calls | create instance
| singleton instance | (not module yet)
+---------------+ +------------------+
| engine module | calls | candidate module |
| interface | ---------> | interface |
+---------------+ +------------------+
| |
+- nimf-sunpinyin +- nimf-candidate (gtk3)
+- nimf-anthy
+- nimf-libhangul
Debugging
---------
nimf-daemon --debug
tail -f /var/log/daemon.log
export GTK_IM_MODULE="nimf"
export QT4_IM_MODULE="nimf"
export QT_IM_MODULE="nimf"
export XMODIFIERS="@im=nimf"
export G_MESSAGES_DEBUG=nimf
gedit # or kate for Qt
References
----------
* API
http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html
http://www.w3.org/TR/ime-api/
https://developer.chrome.com/extensions/input_ime
https://docs.enlightenment.org/stable/efl/group__Ecore__IMF__Lib__Group.html
http://doc.qt.io/qt-4.8/qinputcontext.html
http://doc.qt.io/qt-5/qinputmethod.html
https://git.gnome.org/browse/gtk+
* Language Engines
https://github.com/sunpinyin/sunpinyin
https://github.com/choehwanjin/libhangul
* Implementations
https://github.com/choehwanjin/nabi
https://github.com/choehwanjin/imhangul
https://github.com/choehwanjin/ibus-hangul
https://github.com/ibus/ibus
https://github.com/fcitx/fcitx
https://github.com/fcitx/fcitx-qt5
https://github.com/uim/uim