iBus input method in Linux

时间:2014-06-30 13:14:49   收藏:0   阅读:455

The following packages should be installed:

Because at present I‘m using the default Gnome environment accessed from gdm3, the configuration for ibus should be put into 95xinput, which is similar to those for scim:

export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
ibus-daemon -xd

One of the benefit of ibus is up to now, it seems like it will not capture the keyboard input in Nautilus, which is quite useful for fast jumping to desired files or folders.

For using ibus in Emacs, ibus.el should be downloaded and then copy ibus.el and ibus-el-agent to Emacs load path. In ~/.emacs, add the following, then ibus input method will be integrated into Emacs.

;; ibus
(require ‘ibus)
(add-hook ‘after-init-hook ‘ibus-mode-on)
(add-hook ‘after-make-frame-functions   ; For server client mode
      (lambda (new-frame)
        (select-frame new-frame)
        (or ibus-mode (ibus-mode-on))))

;; Use C-SPC for Set Mark command
(ibus-define-common-key ?\C-\s nil)
;; Use C-\ to toggle ibus input method
(ibus-define-common-key ?\C-\\ nil)
(global-set-key (kbd "C-\\") ‘ibus-toggle)
;; Use C-/ for Undo command
(ibus-define-common-key ?\C-/ nil)
;; Change cursor color depending on IBus status
(setq ibus-cursor-color ‘("red" "yellow" "limegreen"))

 Available fastkeys for ibus are as follows:

The floating bar looks like this with single char and auto-commit modes enabled:

bubuko.com,布布扣

After installing the ibus-m17n package, latn-post input method is available, which is very convenient to input French and German characters using postfix modifiers. The list of postfixes are as follows:

   | mark       | postfix | examples 
   |------------+---------+---------- 
   | acute      |    ‘    | a‘ -> á 
   | grave      |    `    | a` -> à 
   | circumflex |    ^    | a^ -> â 
   | diaeresis  |    "    | a" -> ä 
   | tilde      |    ~    | a~ -> ã 
   | cedilla    |    ,    | c, -> ç 
   | ogonek     |    ,    | a, -> ? 
   | breve      |    ~    | g~ -> ? 
   | caron      |    ~    | c~ -> ? 
   | dbl. acute |    :    | o: -> ? 
   | ring       |    .    | u. -> ? 
   | dot        |    .    | z. -> ? 
   | stroke     |    /    | l/ -> ? 
   | others     | /, etc. | d/ -> ð   t/ -> þ   a/ -> å   o/ -> ø 
   |            |         | ae/ -> æ  ij -> ?   oe/ -> œ  s/ -> ß 
   |            |         | ?/ -> ¿   !/ -> ¡   // -> ° 
   |            |         | << -> «   >> -> »   o_ -> º   a_ -> ª

Repeating the postfix changes ambiguous combining marks: 
  Ex: A~ -> Ã, A~~ -> ?, A~~~ -> A~

Now, let‘s try some French:

On ne voit bien qu‘avec le cœur.

iBus input method in Linux,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!