Specifications.
[pintos-anon] / specs / kbd / scancodes-7.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
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>
10 </HEAD>
11 <BODY>
12 <A HREF="scancodes-8.html">Next</A>
13 <A HREF="scancodes-6.html">Previous</A>
14 <A HREF="scancodes.html#toc7">Contents</A>
15 <HR>
16 <H2><A NAME="japanese"></A> <A NAME="s7">7. Japanese keyboards</A></H2>
17
18 <P>
19 <P>
20 <P>
21 <FIGURE>
22 <EPS FILE="absent">
23 <IMG SRC="jp106.jpg">
24 </FIGURE>
25
26 <FIGURE>
27 <EPS FILE="absent">
28 <IMG SRC="jp106-with-scancodes.jpg">
29 </FIGURE>
30 <P>
31 <H2><A NAME="ss7.1">7.1 Japanese 86/106 keyboards</A>
32 </H2>
33
34 <P>(Information from Barry Yip &lt;<CODE>g609296@cc.win.or.jp</CODE>&gt;,
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),
45 <B>7b</B> (muhenkan),
46 <B>7d</B> (yen/vertical bar).
47 <P>
48 <A NAME="japusdiffs"></A> 
49 Different keycaps:
50 <P>
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 / &amp;) </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 / &amp;) </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>
63
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 _.
71 <P>
72 <H2><A NAME="ss7.2">7.2 Description of the all-Japanese keys</A>
73 </H2>
74
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,
80 \95Ï\8a·
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
87 \91O\8cò\95â
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
92 \91S\8cò\95â
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,
99 \82Ð\82ç\82ª\82È
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
104 \83J\83^\83J\83i
105 (katakana) which means the other Japanese phonetic alphabet,
106 and the alt version is
107 \83\8d\81[\83}\8e\9a
108 (ro-maji) which means the Roman alphabet.</I>
109 <P><I>Near the upper left,
110 \94¼/\91S
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
119 \8a¿\8e\9a
120 (kanji) which
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>
124 <P>
125 <H2><A NAME="bradford"></A> <A NAME="ss7.3">7.3 A Japanese keyboard that imitates a US one</A>
126 </H2>
127
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>
152 <B>ab</B> <B>90</B>.
153 <P>
154 <FIGURE>
155 <EPS FILE="absent">
156 <IMG SRC="imb5576-2.jpg">
157 </FIGURE>
158 <P>
159 <HR>
160 <A HREF="scancodes-8.html">Next</A>
161 <A HREF="scancodes-6.html">Previous</A>
162 <A HREF="scancodes.html#toc7">Contents</A>
163 </BODY>
164 </HTML>