iBus input method in Linux

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:

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,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。