1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
4 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5 <META http-equiv=Content-Type content="text/html; charset=shift_jis">
6 <TITLE>Keyboard scancodes: Japanese keyboards</TITLE>
7 <LINK HREF="scancodes-8.html" REL=next>
8 <LINK HREF="scancodes-6.html" REL=previous>
9 <LINK HREF="scancodes.html#toc7" REL=contents>
12 <A HREF="scancodes-8.html">Next</A>
13 <A HREF="scancodes-6.html">Previous</A>
14 <A HREF="scancodes.html#toc7">Contents</A>
16 <H2><A NAME="japanese"></A> <A NAME="s7">7. Japanese keyboards</A></H2>
28 <IMG SRC="jp106-with-scancodes.jpg">
31 <H2><A NAME="ss7.1">7.1 Japanese 86/106 keyboards</A>
34 <P>(Information from Barry Yip <<CODE>g609296@cc.win.or.jp</CODE>>,
35 Norman Diamond, NIIBE Yutaka and H. Peter Anvin, who
36 contributed the photographs of his
37 JP106 keyboard above and of his
38 <A HREF="jplaptop.jpg">Japanese laptop</A>.)
39 <P>Common Japanese keyboards have five additional keys
40 (106-key, or 86-key for a notebook; these days there may also
41 be 3 extra Windows keys). These keys have scancodes
42 <B>70</B> (hiragana/katakana),
43 <B>73</B> (backslash/underscore),
44 <B>79</B> (henkan/zenkouho),
46 <B>7d</B> (yen/vertical bar).
48 <A NAME="japusdiffs"></A>
51 <CENTER><TABLE BORDER><TR><TD>
52 USB</TD><TD> Scancode </TD><TD>Japanese </TD><TD>US </TD><TD></TD><TD>USB</TD><TD> Scancode </TD><TD> Japanese </TD><TD>US </TD></TR><TR><TD>
53 53</TD><TD><B>29</B></TD><TD>(hankaku/zenkaku)</TD><TD>(` / ~)</TD><TD></TD><TD> 47</TD><TD><B>1a</B></TD><TD>(@ / `)</TD><TD>([ / {) </TD></TR><TR><TD>
54 31</TD><TD><B>03</B> </TD><TD> (2 / ") </TD><TD> (2 / @)</TD><TD></TD><TD> 48</TD><TD><B>1b</B></TD><TD>([ / {) </TD><TD>(] / }) </TD></TR><TR><TD>
55 35</TD><TD><B>07</B> </TD><TD> (6 / &) </TD><TD> (6 / ^) </TD><TD></TD><TD> 51</TD><TD><B>27</B></TD><TD>(; / +) </TD><TD> (; / :) </TD></TR><TR><TD>
56 36</TD><TD><B>08</B> </TD><TD> (7 / ') </TD><TD> (7 / &) </TD><TD></TD><TD> 52</TD><TD><B>28</B></TD><TD>(: / *) </TD><TD> (' / ") </TD></TR><TR><TD>
57 37</TD><TD><B>09</B> </TD><TD> (8 / () </TD><TD> (8 / *) </TD><TD></TD><TD> 29</TD><TD><B>2b</B></TD><TD>(] / }) </TD><TD> (backslash / |) </TD></TR><TR><TD>
58 38</TD><TD><B>0a</B> </TD><TD> (9 / )) </TD><TD> (9 / () </TD><TD></TD><TD>135</TD><TD><B>73</B></TD><TD>(backslash / _)</TD><TD> </TD></TR><TR><TD>
59 39</TD><TD><B>0b</B> </TD><TD> (0 / ~)</TD><TD> (0 / )) </TD><TD></TD><TD>139</TD><TD><B>7b</B></TD><TD>(muhenkan) </TD><TD> </TD></TR><TR><TD>
60 45</TD><TD><B>0c</B> </TD><TD> (- / =) </TD><TD> (- / _)</TD><TD></TD><TD>138</TD><TD><B>79</B></TD><TD>(henkan/zenkouho)</TD><TD> </TD></TR><TR><TD>
61 46</TD><TD><B>0d</B> </TD><TD> (^ / overbar)</TD><TD> (= / +) </TD><TD></TD><TD>136</TD><TD><B>70</B></TD><TD>(hiragana/katakana) </TD><TD> </TD></TR><TR><TD>
62 137</TD><TD><B>7d</B> </TD><TD> (\ / |) </TD><TD> </TD></TR><TR><TD>
64 </TD></TR></TABLE></CENTER>
65 <P>ASCII and JIS-Roman differ in two or three points: the code positions
66 where ASCII has backslash, tilde, broken bar,
67 JIS-Roman uses yen, overbar and vertical bar, respectively.
68 <P>Some keyboards have the tilde printed on the keycap for the 0 key, some don't.
69 Similarly, some keyboards have the backslash printed on the keycap for the _ key
70 and some don't, but in all cases you need Shift to get _.
72 <H2><A NAME="ss7.2">7.2 Description of the all-Japanese keys</A>
75 <P>Norman Diamond adds to the previous section:
76 <P><I>To the left of the spacebar,</I>
77 (Shift-JIS)
\96³
\95Ï
\8a·
78 <I>(muhenkan) means no conversion
79 from kana to kanji. To the right of the spacebar,
81 (henkan) means conversion from kana to kanji. In Microsoft systems
82 it converts the most recently input sequence of kana to the system's
83 first guess at a string of kanji/kana/etc. with the correct pronunciation
84 and a guess at the meaning. Repeated keypresses change it to other
85 possible guesses which are either less common or less recently used,
86 depending on the situation. The shifted version of this key is
88 (zenkouho) which means "previous candidate" -- "zen" means "previous",
89 while "kouho" means "candidate"</I> (explanation courtesy of NIIBE Yutaka)
90 <I>-- it rotates back to earlier guesses for kanji conversion.
91 The alt version of this key is
93 also pronounced (zenkouho), which means "all candidates" -- here,
94 "zen" means "all" -- it displays a menu of all known guesses.
95 I never use the latter two functions of the key, because after
96 pushing the henkan key about three times and not getting the desired guess,
97 it displays a menu of all known guesses anyway.</I>
98 <P><I>Next on the right,
100 (hiragana) means that
101 phonetic input uses one conventional Japanese phonetic alphabet,
102 which of course can be converted to kanji by pressing the henkan key later.
103 The shifted version is
105 (katakana) which means the other Japanese phonetic alphabet,
106 and the alt version is
108 (ro-maji) which means the Roman alphabet.</I>
109 <P><I>Near the upper left,
111 (han/zen) means switch between hankaku
112 (half-size, the same size as an ASCII character) and zenkaku
113 (full-size, since the amount of space occupied by a kanji
114 is approximately a square, twice as fat as an ASCII character).
115 It only affects katakana and a few other characters
116 (for example there's a full-width copy of each ASCII character
117 in addition to the single-byte half-width encodings).
118 The alt version of this is
121 actually causes typed Roman phonetic keys to be displayed as Japanese
122 phonetic kana (either hiragana or katakana depending on one of the other
123 keys described above) and doesn't cause conversion to kanji.</I>
125 <H2><A NAME="bradford"></A> <A NAME="ss7.3">7.3 A Japanese keyboard that imitates a US one</A>
128 <P>John Bradford reports that he has a Japanese keyboard
129 (an IBM 5576 KEYBOARD-2, part number 94X1110) that by default
130 simulates US key layout. Thus, pressing the @ key yields scancodes
131 <B>2a</B> <B>03</B> (fake shift followed by digit 2),
132 pressing Shift - yields scancodes <B>b6</B> <B>0d</B>
133 (fake shift down, =) with release <B>8d</B> <B>36</B>, etc.
134 <P>Thus, the (translated Set 2) scancodes can be read off the
135 <A HREF="#japusdiffs">table</A> with differences between the
136 Japanese and the US layout.
137 <P>In this state the non-ASCII keys (Yen and overline) yield an error
138 (<B>ff</B>). The Japanese keys hankaku, kanji/katakana, muhenkan,
139 zenkoho/henkan, hiragana, zenmen ki, yield the codes expected from
140 keys in that position on a US keyboard: <B>29</B> (`/~),
141 <B>38</B> (LAlt), <B>39</B> (space), <B>39</B> (space),
142 <B>39</B> (space), <B>e0</B> <B>38</B> (RAlt), respectively.
143 <P>Switching the keyboard to Set 3 enables the Japanese keys.
144 In untranslated Set 3 these give codes: hankaku <B>0e</B>,
145 Yen <B>13</B>, overline (shift ^), kanji/katakana <B>19</B>,
146 muhenkan <B>85</B>, zenkoho/henkan <B>86</B>,
147 hiragana <B>87</B>, zenmen ki <B>39</B>.
148 (Also: backslash/underscore <B>5c</B>, bracketright/braceright <B>53</B>.)
149 <P>This is the only keyboard I know that gives more information in Set 3
150 than in Set 2. It reports
151 <A HREF="scancodes-9.html#keyboardid">keyboard ID</A>
156 <IMG SRC="imb5576-2.jpg">
160 <A HREF="scancodes-8.html">Next</A>
161 <A HREF="scancodes-6.html">Previous</A>
162 <A HREF="scancodes.html#toc7">Contents</A>