libfep and a replacement of skkfep

I’ve recently spent some time to create an input method front-end running on text terminals, where users cannot use XIM or gtk immodule. Though there were similar programs like skkfep, canfep, and canuum back in 1990′s, they no longer work properly on modern terminal emulators. Fortunately, there is a still maintained program: uim-fep. So I borrowed some code from it and tried to make something “reusable”.

The outcome is a project called libfep, which provides a server rendering screen (with a status line and preedit), and a client library to access the server through Unix domain socket.

As a proof-of-concept, I integrated it into libskk as a program named “skkfep” (the name is reused)

Since libfep is general purpose, it could grow into a more generic program which allows other input methods than SKK.

Anyway, I would appreciate the previous works including uim-fep and vt100.net.

ibus-skk now rewritten in Vala

ibus-skk is an IBus IME implementing SKK (abbrev of Simple Kana Kanji), an alternative Japanese input-method popular for geeks. ibus-skk was originally developed in Python in 2009 and recently had become an unmaintainable mess because the SKK algorithm was not that simple as I thought.

I decided to rewrite it in Vala to separate out reusable component into a GObject-based library called libskk. Today I released the first Vala version of ibus-skk, it is still experimental but basically works.

Here are Fedora packages and the source code.

As a bonus, it gets more sophisticated dictionary selection UI, which allows both file and network dictionaries to be used simultaneously:

Enjoy.

eekboard 1.0

I made the first stable release of eekboard, yet another on-screen keyboard software package. Some time ago I blogged about using it on a tablet PC and listed a few issues. Since then, I went on a trip with the tablet (without laptop), where I noticed a lot more issues, notably:

  • I tend to tap wrong locations on screen and need to delete the previous character and type again. The extra steps are cumbersome.
  • I want key repeat for some keys, particularly backspace.
  • Also I want cursor keys when using Unix shell.
  • Modifier keys should be marked when they are locked/latched.

Now most of them are resolved and I can comfortably use my tablet PC as a laptop alternative.
Continue reading

Using quilt to maintain Fedora local patches

ibus-m17n in Fedora has applied several local patches in testing. Those patches sometimes conflict each other and do not apply cleanly. I used to adjust patches by editing them by hand (well actually with Emacs diff-mode, which is aware of hunk changes and updates header lines properly). Today I switched to use quilt as Debian people do.

Here are the steps I followed to migrate. First, download the tarball and patches in the git tree, extract unpatched source, and backup patches:

$ fedpkg srpm
$ tar xf ibus-m17n-1.3.2.tar.gz
$ mkdir backup
$ mv *.patch backup

Secondly, set up some envvars quilt respects:

$ export QUILT_PATCHES=..
$ export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"

Finally, migrate patches into the quilt format. For the first patch (Patch0: ibus-m17n-HEAD.patch):

$ cd ibus-m17n-1.3.2
$ quilt new ibus-m17n-HEAD.patch
$ diffstat ../backup/ibus-m17n-HEAD.patch
 Makefile.am  |    2
 configure.ac |   15 +++++
 src/engine.c |  155 ++++++++++++++++++++++++-----------------------------------
 3 files changed, 80 insertions(+), 92 deletions(-)
$ quilt add Makefile.am configure.ac src/engine.c
$ patch -p1 < ../backup/ibus-m17n-HEAD.patch
$ quilt refresh

Now I have ibus-m17n-HEAD.patch (in quilt format) in the upper directory. I could proceed to the next patch:

$ quilt new ibus-m17n-stsreq.patch
$ diffstat ...; quilt add ...; patch ...; quilt refresh

Once all patches are migrated, I could edit them individually:

$ quilt applied
../ibus-m17n-HEAD.patch
../ibus-m17n-stsreq.patch
../ibus-m17n-xkb-options.patch
../ibus-m17n-xx-icon-symbol.patch
../ibus-m17n-iok.patch
$ quilt pop
 Removing patch ../patches/ibus-m17n-iok.patch
 Restoring src/engine.c

 Now at patch ../ibus-m17n-xx-icon-symbol.patch
$ vi src/m17nutil.c ... # edit the code
$ quilt refresh # refresh the patch
$ quilt push

Of course, the package builds without patch conflicts:

$ cd ..
$ fedpkg srpm
$ SHELL=/bin/sh mock -r fedora-rawhide-x86_64 --rebuild ibus-m17n-1.3.2-6.fc16.src.rpm
 ...
 INFO: Done(ibus-m17n-1.3.2-6.fc16.src.rpm) Config(fedora-rawhide-x86_64) 2 minutes 23 seconds
 INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
 State Changed: end

TIP: to keep series file (the quilt index file) after fedpkg import, mark it as SourceX in spec.

Making Unicode input easier to use

In the previous post, I wrote about ibus-gucharmap, a character-map based Unicode input engine. While making it usable this week, I came across some thoughts on Unicode input on GNU/Linux desktop.

Currently there are a couple of options to type Unicode characters.

  1. Cut and paste from a character map application like Gucharmap
  2. Input codepoint directly with ibus-rawcode or GTK default IM

Each of these options has its pros and cons. With the option #1, a user can easily browse Unicode characters. However, for input she is required to perform a number of interactions with desktop, using both keyboard and mouse, switching focus between application windows. With the option #2, the user can do everything without mouse but she needs to know the codepoint in advance.

So the design goals of ibus-gucharmap are:

  • Keyboard-only operation
  • Quick access to the Unicode character map

Here is the current interaction flow to input a ☣ (U+2623 BIOHAZARD SIGN). When a user enables the IME with ‘Ctrl+Space’, she will see the charmap view:

Then after she types some characters, the view will be changed to display the search results:

Here, by hitting ‘Return’ on the search results, she will get the character inserted into the target application and see the IME window is changed back to the charmap view with the Unicode block “Miscellaneous Symbols” (which includes U+2623) selected:

At this point, the user can also input ☢ (U+2622 RADIOACTIVE SIGN) with ‘Left’ and ‘Return’.

You could try this feature with 1.3.99.20110624-1 (or later) RPM.

Gucharmap engine for IBus

I wrote a small IBus engine called ibus-gucharmap to input exotic characters in Unicode. The code is still under development but you can try a test package.

It is written in Vala and internally uses Gucharmap widgets. I wonder this might be the first real IME written in Vala, while IBus got Vala binding quite some time. I’m impressed that it makes GObject-based native application development much easier.

Tablet PC

I finally purchased a tablet PC for testing usability of recent GNU/Linux desktop on touch devices. Though there are not so many choices that meet my requirements (PC compatible, reasonably fast and cheap, and available in my country), Acer ICONIA TAB W500 looked fine. Actually F-15 final installed on that device without any problem and GNOME-Shell works fine on it (the peformance is not that bad as I expected from its 1GHz CPU clock).
Continue reading