Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Japanese Keyboard Layout in Console

I don't see that anyone else has replied yet, so I'll give it a try. I'm no expert on this whole mess that is keyboard handling in Unix though.

On Wed, 2 Dec 2009, Hou, Ruoyu wrote:

In X window, nearly every output perfectly fits the keysyms except one key: <^/'upper dash'>. the shifted one ("upper dash") is output as tilde.

This is an ASCII/JIS thing, like the backslash/yen confusion. As I understand it, on ancient JIS the key would have sent ASCII tilde (overbar for JIS), and shift-0 would have sent nothing at all -- although that is just theoretical knowledge on my part.

Now, on PC keyboards we have moved things around so we can have separate backslash and yen keys, overbar on its own key, and a tilde on 0. But at least my X keymap definitions does not use this for anything useful, and gives duplicates instead. I suspect yours are the same and that's why you get a tilde here.

In console, however, <backspace> and <delete> act the same.

I googled a bit and found an old thread on the topic:


But you might not want to read it. If you do, and do not come away thinking you should just wipe the drive and install Windows instead[*], you are a stronger person than me. This mail gives some interesting advice though:


(The advice is to remap the key labeled "delete" to send "Keypad Delete" instead. It seems like it could possibly work at least in editors, plus it avoids the whole One True Delete Key mess.)

<Home> <End> <'upper dash'> all produce tilde while the actual <0/~> echoes only 0 but no tilde whether shifted or not.

Home / End probably produce ESC [ 7 ~ and ESC [ 8 ~. That will do nothing if things aren't set up right, but it will leave a tilde behind. '0' has no shifted meaning in the console's "jp" keymap (I guess this is following JIS), so that just gives you a zero.

Moreover, while I can use <Ctrl>-<Alt>-<Fx> to switch ttys, emacs in console mode failed to recognize <Alt> as Meta key so I was obliged to use <Esc> as Meta.

Fortunately, this is something I have never had to learn.  :-)

But there is a "metaesc" option that could possibly be what you want. You could try setting the encoding to jp.metaesc (wsconsctl -w encoding=...) and see what happens.

Hope there is something there that might help. I'd like to repeat that I'm by no means an expert, and mostly I just get angry whenever I try to understand this.

[*] And who doesn't?


Home | Main Index | Thread Index | Old Index