(Information from Barry Yip <g609296@cc.win.or.jp
>,
Norman Diamond, NIIBE Yutaka and H. Peter Anvin, who
contributed the photographs of his
JP106 keyboard above and of his
Japanese laptop.)
Common Japanese keyboards have five additional keys (106-key, or 86-key for a notebook; these days there may also be 3 extra Windows keys). These keys have scancodes 70 (hiragana/katakana), 73 (backslash/underscore), 79 (henkan/zenkouho), 7b (muhenkan), 7d (yen/vertical bar).
Scancode 0b is zero/tilde. (Some keyboards have the tilde printed on the keycap, and some don't.) Scancode 0d is circumflex/overbar. Scancode 29 is hankaku/zenkaku.
(ASCII and JIS-Roman differ in two or three points: the code positions where ASCII has backslash, tilde, broken bar, JIS-Roman uses yen, overbar and vertical bar, respectively.)
Norman Diamond adds to the previous section:
To the left of the spacebar, (Shift-JIS) 無変換 (muhenkan) means no conversion from kana to kanji. To the right of the spacebar, 変換 (henkan) means conversion from kana to kanji. In Microsoft systems it converts the most recently input sequence of kana to the system's first guess at a string of kanji/kana/etc. with the correct pronunciation and a guess at the meaning. Repeated keypresses change it to other possible guesses which are either less common or less recently used, depending on the situation. The shifted version of this key is 前侯補 (zenkouho) which means "previous candidate" -- "zen" means "previous", while "kouho" means "candidate" (explanation courtesy of NIIBE Yutaka) -- it rotates back to earlier guesses for kanji conversion. The alt version of this key is 全侯補 also pronounced (zenkouho), which means "all candidates" -- here, "zen" means "all" -- it displays a menu of all known guesses. I never use the latter two functions of the key, because after pushing the henkan key about three times and not getting the desired guess, it displays a menu of all known guesses anyway.
Next on the right, ひらがな (hiragana) means that phonetic input uses one conventional Japanese phonetic alphabet, which of course can be converted to kanji by pressing the henkan key later. The shifted version is カタカナ (katakana) which means the other Japanese phonetic alphabet, and the alt version is ローマ字 (ro-maji) which means the Roman alphabet.
Near the upper left, 半/全 (han/zen) means switch between hankaku (half-size, the same size as an ASCII character) and zenkaku (full-size, since the amount of space occupied by a kanji is approximately a square, twice as fat as an ASCII character). It only affects katakana and a few other characters (for example there's a full-width copy of each ASCII character in addition to the single-byte half-width encodings). The alt version of this is 漢字 (kanji) which actually causes typed Roman phonetic keys to be displayed as Japanese phonetic kana (either hiragana or katakana depending on one of the other keys described above) and doesn't cause conversion to kanji.
Benjamin Carter <bcarter@ultra5.cs.umr.edu
> reports:
I recently came into possession of a 97-key keyboard with Japanese
markings on the keys. (The keys also have the standard
qwerty-characters on them, with the exception of some of the meta-keys
(there are 3 keys near the Alt keys on either side of the spacebar with
only Japanese characters on them so I don't know what they are).
In any case, the keyboard sends out scancodes that work for all the main
keys (backspace, letters and numbers, enter, shift), but the numeric
keypad, Alt keys, and function keys don't work.
I have run the board through showkey -s
, so I know what
scancodes this keyboard sends out.
However, the F9 and F10 keys send out 60 and 61,
respectively, so their key release events send out e0
and e1, confusing the keyboard driver.
# These are across the top of the keyboard.
58 (F1), 59 (F2), 5a (F3), 5b (F4), 5c (F5), 5d (F6), 5e (F7), 5f (F8), 60 (F9), 61 (F10), 62 (F11), 63 (F12)
76 (Break), 77 (Setup).
# top row
64 (Esc), 02 (1), 03 (2), 04 (3), 05 (4), 06 (5), 07 (6), 08 (7), 09 (8), 0a (9), 0b (0), 0c (-), 0d (=), 29 (`), 0e (Backspace)
# 2nd row
0f (Tab), 10 (Q), 11 (W), 12 (E), 13 (R), 14 (T), 15 (Y), 16 (U), 17 (I), 18 (O), 19 (P), 1a ([), 1b (]), 79 (Del), 6e (Line Feed)
# 3rd row
38 (Ctrl), 1e (A), 1f (S), 20 (D), 21 (F), 22 (G), 23 (H), 24 (J), 25 (K), 26 (L), 27 (;), 28 ('), 75 (\), 1c (Return)
# 4th row
2a (Shift_L), 2c (Z), 2d (X), 2e (C), 2f (V), 30 (B), 31 (N), 32 (M), 33 (,), 34 (.), 35 (/), 3a ((unknown)), 36 (Shift_R)
# bottom row
1d (Caps Lock), 71 (Alt_L), 01 ((unknown)), 39 (Space), 45 ((unknown)), 72 (Alt_R), 46 ((unknown))
# numeric keypad. No "grey" section on the keyboard.
47 (7), 48 (8), 49 (9), 54 (Keypad -), 4b (4), 4c (5), 4d (6), 37 (Keypad +), 4f (1), 50 (2), 51 (3), 4e (Keypad Enter), 52 (0), 78 (Up), 53 (Keypad .), 56 (Left), 55 (Down), 7d (Right), 7e (Keypad ,).
There are more keyboards that do not use e0 as escape code.
For example, Paul Schulz <pauls@caemrad.com.au
>
reports the same for Sun Type 5 Keyboard with PS/2 connector,
NCD model N-123NA. A kernel patch is required for such keyboards.