xref: /openbmc/qemu/docs/system/devices/keyboard.rst (revision 2f95279a)
1.. _keyboard:
2
3Sparc32 keyboard
4----------------
5SUN Type 4, 5 and 5c keyboards have dip switches to choose the language layout
6of the keyboard. Solaris makes an ioctl to query the value of the dipswitches
7and uses that value to select keyboard layout. Also the SUN bios like the one
8in the file ss5.bin uses this value to support at least some keyboard layouts.
9However, the OpenBIOS provided with qemu is hardcoded to always use an
10US keyboard layout.
11
12With the escc.chnA-sunkbd-layout driver property it is possible to select
13keyboard layout. Example:
14
15-global escc.chnA-sunkbd-layout=de
16
17Depending on type of keyboard, the keyboard can have 6 or 5 dip-switches to
18select keyboard layout, giving up to 64 different layouts. Not all
19combinations are supported by Solaris and even less by Sun OpenBoot BIOS.
20
21The dip switch settings can be given as hexadecimal number, decimal number
22or in some cases as a language string. Examples:
23
24-global escc.chnA-sunkbd-layout=0x2b
25
26-global escc.chnA-sunkbd-layout=43
27
28-global escc.chnA-sunkbd-layout=sv
29
30The above 3 examples all select a swedish keyboard layout. Table 3-15 at
31https://docs.oracle.com/cd/E19683-01/806-6642/new-43/index.html explains which
32keytable file is used for different dip switch settings. The information
33in that table can be summarized in this table:
34
35.. list-table:: Language selection values for escc.chnA-sunkbd-layout
36   :widths: 10 10 10
37   :header-rows: 1
38
39   * - Hexadecimal value
40     - Decimal value
41     - Language code
42   * - 0x21
43     - 33
44     - en-us
45   * - 0x23
46     - 35
47     - fr
48   * - 0x24
49     - 36
50     - da
51   * - 0x25
52     - 37
53     - de
54   * - 0x26
55     - 38
56     - it
57   * - 0x27
58     - 39
59     - nl
60   * - 0x28
61     - 40
62     - no
63   * - 0x29
64     - 41
65     - pt
66   * - 0x2a
67     - 42
68     - es
69   * - 0x2b
70     - 43
71     - sv
72   * - 0x2c
73     - 44
74     - fr-ch
75   * - 0x2d
76     - 45
77     - de-ch
78   * - 0x2e
79     - 46
80     - en-gb
81   * - 0x2f
82     - 47
83     - ko
84   * - 0x30
85     - 48
86     - tw
87   * - 0x31
88     - 49
89     - ja
90   * - 0x32
91     - 50
92     - fr-ca
93   * - 0x33
94     - 51
95     - hu
96   * - 0x34
97     - 52
98     - pl
99   * - 0x35
100     - 53
101     - cz
102   * - 0x36
103     - 54
104     - ru
105   * - 0x37
106     - 55
107     - lv
108   * - 0x38
109     - 56
110     - tr
111   * - 0x39
112     - 57
113     - gr
114   * - 0x3a
115     - 58
116     - ar
117   * - 0x3b
118     - 59
119     - lt
120   * - 0x3c
121     - 60
122     - nl-be
123   * - 0x3c
124     - 60
125     - be
126
127Not all dip switch values have a corresponding language code and both "be" and
128"nl-be" correspond to the same dip switch value. By default, if no value is
129given to escc.chnA-sunkbd-layout 0x21 (en-us) will be used.
130