aboutsummaryrefslogtreecommitdiffstats
path: root/greek/ports/powerpc/keycodes.wml
blob: ad58a37fcad0ae58608ffd378119b40c8371114f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#use wml::debian::template title="PowerPC Keycodes Change" NOHEADER="yes"
#use wml::fmt::verbatim
#include "$(ENGLISHDIR)/ports/powerpc/menu.inc"
#use wml::debian::translation-check translation="0cfff43768945b514bb734757927bbbd8b043626" maintainer="galaxico"


<h2>PowerPC Linux Keycodes Alert!</h2>
<p>
If you're running a kernel built previous to around April 2001, and
are considering an upgrade to woody, a kernel upgrade, or a keymap
change, it's ESSENTIAL you be aware of the Debian keycodes change for
PowerPC in woody.</p>
<p>
Here's what happened: to pull powerpc into the linux mainstream and
eliminate present and future conflicts, woody's console-data package
was changed to present linux keycode maps for installation instead of
ADB keycode maps (which used to be the norm for powerpc kernels). The
ADB keycode maps are no longer officially Debian supported.</p>
<p>
The installation system's kernel was changed to follow that path, so
the new installation kernel uses linux keycodes, not ADB
keycodes. That is a permanent change; a kernel compiled without
support for ADB keycodes is unable to use ADB keymaps. Linux keycodes
are a feature of the `New Input Layer' which is set to become the
standard for all input devices on all architectures during the
post-2.4 kernel version cycle.</p>
<p>
If you would rather stay with ADB keycodes for the time being, and the
kernel you want to use has been compiled with
CONFIG_MAC_ADBKEYCODES=n, you can re-compile it with
CONFIG_MAC_ADBKEYCODES=y and continue to use an ADB keymap.</p>
<p>
The mac/apple keyboard maps for ADB keycodes vs. linux keycodes are very
different. That's why you must be prepared. If you don't coordinate
your boot instructions, your kernel, and your keymap, you may someday 
type 'root' and the login prompt and instead see 'sswj'. A very
disconcerting circumstance.</p>


<h2>Planning Ahead</h2>
<p>
A very common circumstance for this to come up is upgrading from
potato to woody. In that case, a special dialog has been incorporated
when console-data is upgraded. A check is made of the kernel you're
running when the upgrade takes place, and if you are running an ADB
kernel, you are warned about the situation and asked to make a choice.</p>
<p>
Since you already know everything about the issue, it will be an easy
choice. Put in a new boottime keymap, then after the upgrade is
complete (BEFORE rebooting), modify your boot configuration (quik.conf
or yaboot.conf) to add a line as follows to the kernel image section
you are booting:</p>
<pre>
append="keyboard_sends_linux_keycodes=1"
</pre>
<p>
If you already have an append= line, add the new term inside the
quotes like</p>
<pre>
append="video=ofonly keyboard_sends_linux_keycodes=1"
</pre>
<p>
Don't forget to run quik or ybin after your editing is complete, to
save the config changes to the real bootloader files.</p>
<p>
Another instance where this issue can come up is when upgrading X from
4.0.x to 4.1.x with an ADB keycodes kernel. Your XF86Config-4 probably
has XkbModel set to "macintosh", but the meaning of that changed so
that a macintosh keyboard is assumed to use the new Linux keycodes. If
you are staying with ADB keycodes, you'll need to change the XkbModel
to "macintosh_old". </p>

<h2>New Woody Installations</h2>
<p>
For a new woody installation, you will have a linux-keycode keymap and
linux-keycode kernel installed for you. So they'll match, and you
won't have any problem. Unless...</p>
<p>
Unless you change the kernel after installation and it turns out to be
an ADB kernel. Then you will have the same problem in reverse. Or
unless...</p>
<p>
Unless you change the keymap manually, selecting from
/usr/share/keymaps/mac. Those are all ADB keymaps, and they won't
match your linux-keycode kernel! </p>


<h2>It Won't Happen To Me -- But When It Does</h2>
<p>
So, how to extract yourself when you type root and see sswj? Or in
the reverse case, type (tab)ssw and see root?</p>
<p>
Linux people hate to turn the switch off on their computers. And
there's always some filesystem corruption when you do that, which may
or may not be repaired correctly. So here are some suggestions to get
the system shut down gracefully if this happens.</p>
<p>
If you have ssh installed on your system and can connect from another
computer, you can temporarily correct the problem remotely. Login to
the root account, and execute the following:</p>

<verbatim>
cd /proc/sys/dev/mac_hid/
echo 0 > keyboard_lock_keycodes
echo 1 > keyboard_sends_linux_keycodes
</verbatim>

<p>
Your keyboard will then respond normally until you reboot. Use the
opportunity to synchronize your keymap, kernel and bootloader!</p>
<p>
If your system has a key combination used as a reboot or shutdown
command, you can try to use the tables below to figure out what the
combination is and apply it. On PowerPC, a common key combo is
Control-Shift-Delete. With an ADB keymap loaded, interpreted as linux
keycodes, that would be Control-F6-F12. With a linux keycodes map
loaded, interpreted by an ADB mapped kernel, you'd need
Shift-AltGr-Equals. Good luck.</p>
<p>
My keyboard doesn't have a Delete key, so when I had a linux-keycodes
map loaded in an ADB-configured kernel, I figured out from the table
how to login as root ( 2==3 followed by F5 ). For my root
password, I used the table below.  For reboot, I typed ( 21 tab-key
==3 followed by F5 ). You could also use halt ( p]j3 followed by F5 ).</p>
<p>
Some characters can't be typed in the wrong keymap. Those are blank or
missing in the tables.</p>

<h2>Linux-keycodes keymap loaded, kernel configured for ADB</h2>

<p>&nbsp;</p>

<pre>
If you want:  a b   c d e f g h i j      k l m n     o p q r s t u v w
instead type: ] TAB m u 1 [ i p 5 Return l j ` Space = 9 y 2 o 3 6 . t

               x y z 0 1 2 3 4 5 6 7 8 9 *   /  [ ] ,         = - ` \ ;
               n 4 / b d f h g z x c v   Alt F7 7 - Backspace w q ; , '

              Control Shift     Enter Tab Backspace Fwd-Del Space
              F6      Ctrl or \ F5, 8 r   e         F12     CapsLock

              Home   NumLock   Clear  AltGr =(numkpd) Escape F11 F12
              Clear  +(numkpd) F6-6   Shift Fwd-Del   s      kp-5 kp-6

              F1         F2          F3         F4       F7   F9  
              Left-Arrow Right-Arrow Down-Arrow Up-Arrow kp-. kp-*

              Left-Arrow Right-Arrow Up-Arrow Down-Arrow
              F13                    F11      
</pre>

<h2>Kernel configured for Linux-keycodes, ADB keymap loaded</h2>

<pre>
If you want:  a b c d e         f g h i j k l m n o p q r   s   t u v w
instead type:   0 7 1 Backspace 2 4 3 g l ' k c x s h - Tab Esc w d 8 = 

              x y z 0       1 2 3 4 5 6 7 8      9 * /  [ ] , = - ` ; 
              6 q 5 Control e r t y i u [ Return p   z  f a \ o ] m ` 

              Control Shift Return Tab Backspace Fwd-Del   \     Space
              Shift   AltGr j      b   ,         =(numkpd) Shift n

              Clear  AltGr    =(numkpd) CapsLock Escape Alt
              Home   CapsLock Fwd-Del   Space    /       kp-*

              F1 F2 F3 F4 F5    F6   F7 F8 F9 F0 F11 F12
                          Enter Ctrl /               Fwd-Del

              Left-Arrow Right-Arrow Up-Arrow Down-Arrow
              F1         F2          F4       F3
</pre>


<h2>How To Figure Out Your Current Status</h2>
<p>
The keymaps don't currently have comments inside, so if you're
wondering which kind of map is active, you can tell by peeking at the
keycode 1 line with</p>
<pre>
zgrep 'keycode *1 =' /etc/console/boottime.kmap.gz 
</pre>
If keycode 1 = Escape, that's the linux (actually i386) keycodes map. 
If keycode 1 = s, that's ADB (except for ADB dvorak, keycode 1 = o).
<p>
The config-XXXXX files in /boot will reveal whether the kernel you're
booting with is compiled with ADB keycode support or not. To find
out, use</p>
<pre>
grep MAC_ADB /boot/*
</pre>
<p>
You should get a list of config files for kernels you can boot. If
there's an entry like</p>
<pre>
/boot/config-2.4.12-powerpc:CONFIG_MAC_ADBKEYCODES=y
</pre>
<p>then your kernel is compiled with ADB codes support. If the last
letter is n, it's a linux-keycode kernel.</p>

<h2>How To Fix It</h2>
<p>
Once you've got your errant system shut down, you still need to
fix it. How can you tell what is needed? You may have to use your
rescue disk or boot another partition in order to fix things up. </p>
<p> 
If your problem is an ADB-compiled kernel trying to use a linux-codes
keymap, just add </p>
<pre>
keyboard_sends_linux_keycodes=1
</pre>
<p>at the boot: prompt after typing your kernel image label. That is only
a one-boot fix, though; you need to make the change permanent by
editing your boot config file and saving it for the bootloader.</p>
<p>
If your problem is the reverse (linux-keycodes kernel trying to use an
ADB keymap), you'll need to get rid of the ADB keymap. You can copy in
any keymap from the /usr/share/keymaps/i386 folder, there are lots to
choose from. For example</p>
<pre>
cd /usr/share/keymaps/i386/qwerty/
cp mac-usb-us.kmap.gz /etc/console/boottime.kmap.gz
</pre>

© 2014-2024 Faster IT GmbH | imprint | privacy policy