Subject: swapping ctrl and caps lock
To: None <port-mac68k@NetBSD.ORG>
From: Ivan Curtis <icurtis@radlogic.com.au>
List: port-mac68k
Date: 10/02/1997 23:04:12
Some people (like me) just can't cope with the ctrl key where the caps
lock key should be and vice-versa.

On IBM PCs this is only a minor annoyance, as the keys can usually be
easily re-mapped (one just puts up with the incorrect label).

On my apple keyboard II, this was a _major_ annoyance, because the
caps lock key has genuine lock action!

I have just completed surgery on my apple keyboard to remove the
"lock" action from the caps lock key. This allows me to use xmodmap to
swap the caps lock and ctrl key, finally putting ctrl in the right
place.

If you think you might be interested in doing the same, read on. But
be warned, the jobs was quite fiddly. Also, I am typing this from
memory (I didn't make any notes while I was doing it), so some details
may be wrong.

You will need:
	small + screwdriver
	small - screwdriver
	soldering iron
	solder sucker (de-soldering tool)
	scalpel
	soft brush

1) Remove the outer case from the keyboard. This is done by removing
the 3 black + screws from the bottom front edge and prying the upper
and lower halves apart. There are several catches at the back edge
that must be carefully pulled apart.

2) Remove the keyboard inner from the bottom half of the outer case.
To do this remove the 3 silver + screws along the top edge of the
keyboard inner, then disconnect the connector labeled "caps lock", and
disconnect the two flexible edge connectors by sliding the locking
tabs of the connectors forwards.

Use the brush to dust out the years of accumulated grime from the case
and the inner mechanism.

3) Remove the steel backing plate from the keyboard. Do this by
unscrewing the infinite number of small black + screws on the back.
You will need to remove the tape holding the wires of the caps lock
lead.

4) De-solder the caps lock key. Use a solder sucker to remove the
solder from the two pins which are soldered to the tiny pcb.

5) Remove the caps lock switch mechanism. This will push out (key cap
and all) once two holding clips are compressed. My keyboard had some
sort of glue which prevented these clips from moving. I used the
scalpel to remove it before pushing the switch out from the back.

6) Remove the key cap from the switch. This is a press fit connection,
and can be gently prised off.

7) Open the switch itself. This is quite difficult, and I used a
scalpel and small - screwdriver to do this. Study the case carefully
and visualize where it will split. I'm calling the half where the
leads come through the bottom and the half where the key cap connects
the top.

Be VERY careful not to ruin the wire leads; they should come away with
the bottom half of the switch and should not pull through the holes
and be left with the top half.

As you prise the haves apart, study the switch innards carefully
BEFORE you take it completely apart. In particular, you will need to
remember how the switch contacts (which are formed from the leads) go
back together.

8) Remove the small nylon block which is the lock mechanism. This
little block has a clever groove in it which causes the switch to lock
and then release on alternate presses.

9) Re-assemble the switch. Be sure to get the two contacts in the
right place; they go in a guide slot at one edge of the switch. At
this stage, a check with an ohm-meter that all is well wouldn't be a
bad idea.

10) Reverse dis-assembly procedure, except don't put all the dirt back
in :-)

11) Once you are re-connected, use xmodmap to remap the keys. This
from the xmodmap man page:

! Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

Ivan Curtis