9fans archive / 2000 / 08 / 90 /    prev next

From: Steve Harris <scharris@wor...>
Subject: Re: [9fans] pipefile input method
Date: Wed, 2 Aug 2000 22:02:48 -0500

On Wed, 02 Aug 2000 16:19:35 rob pike wrote:

> Thus I wrote pipefile, with
> the belief that someone would write the obvious bytestream converter,
> with or without modes, that would convert a standard keyboard into
> some other style of input.

I'm trying!

I'll be finishing a basic Korean input method this weekend probably, and 
pipefile 
provides exactly what I asked about originally, a "stream filter" over 
/dev/cons.  
I didn't understand Dennis's reply about "kbd" in v2 and the qualms he 
had about 
notes handling if one were to just use a filter over cons.  But after 
seeing rio 
running over a "tr" filter with  pipefile, I know it will work now.  The 
code will 
also be much simpler with Plan9 than it was with the (luxurious) Qt 
toolkit on 
Linux where I originally did it.

The only real problem I see is we need a good "go" key, which tells the 
IM that the
user is done with the keystrokes so it's time to convert them to an 
ideograph. The 
IM can't usually tell by itself unless the user hits space bar to start 
a new word,
or has entered a full 4 strokes.  The problem is that 1) all of the 
unshifted
keys are taken by the IM itself, 2) it's too awkward to do 
CTRL-<something> or
SHIFT-<something> all the time, and 3) the cons isn't in raw mode (by 
choice) so we 
can't just use something like CAPS-LOCK.  It's not a do or die issue but 
it could be 
an annoyance.

The other real problem is I need to find a Korean unicode font that 
works on Plan 9! 
What font format(s) are compatable?  I've seen some of the asian font 
directories (not
Korean, but sometimes there's overlap), but most of them don't work for 
me.

E.g. the fonts in the /lib/font/bit/gb/ directory:

% font=/lib/font/bit/gb/<any from this dir>

% rio

imageinit: can't open font /lib/font/bit/gb/<...> : bad format for font 
file

(I did find some Japanese fonts in the pelm directory which worked.)

-Steve