码迷,mamicode.com
首页 > 系统相关 > 详细

iBus input method in Linux

时间:2014-06-30 13:14:49      阅读:455      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   strong   width   

The following packages should be installed:

  • python-ibus

  • ibus

  • ibus-clutter

  • ibus-gtk

  • ibus-m17n: input many non-latin characters

  • ibus-pinyin

  • ibus-qt4

  • ibus-table

  • ibus-table-wubi

  • python-xlib: will be used by Emacs ibus.el

  • ibus-m17n: input many non-latin characters. French and German characters can be input using this method very conveniently compared to the standard French input method.

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:

  • Ctrl+.: toggle between half and full punctuation.

  • Ctrl+,: toggle between single char and phrase modes.

  • Shift+space: toggle between full letter and half letter (全角与半角)

  • Left shift: toggle between English and Chinese input.

  • Right shift: toggle between Pinyin and Wubi.

  • Ctrl+/: enable or disable auto-commit mode (自动上屏). This fastkey is disabled by LibreOffice.

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

iBus input method in Linux

标签:des   style   blog   color   strong   width   

原文地址:http://www.cnblogs.com/quantumman/p/3813838.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!