Woof-woof Goto Small Dog!
Woof-woof Goto Small Dog!




 

Using a Windows USB keyboard on a Mac and remapping the modifier keys.

by Robert Hiller

I needed to use a "Windows" USB keyboard with my B&W G3. Simply plugging it into the USB port works fine, with one small hitch: The positions of the Command and Option keys are swapped from the normal Mac layout: The "Alt" key, nearest the space bar on each side operates as Option, and the "Window" key operates as Command.

My goal was to swap these keys, so that the new keyboard would operate like a normal extended mac keyboard. Swapping normal, that is non-modifier, keys is relatively easy using the KCHR resource, but apparently it is not possible to use a KCHR resource to change modifier keys. So it is necessary to use the KMAP resource, which maps physical keystrokes from the keyboard to "virtual" keystrokes.

Here is the procedure to make a Windows USB keyboard operate like a Mac extended keyboard:


Open a copy of the System with ResEdit, and find the KMAP resources.

Open them with a double-click.


Find ID of 2 and double-click to open it in the hex editor.


Find the value 3A in the file and change it to 37.

Find the value 37 in the table and change it to 3A.

In other words, to swap the keys, swap the two values 37 and 3A in Hex.


Next, open the ROv# resource.

In my System file there is only one ID, number 1917.

Open it with a double-click.

Go to the end of the list and select the last ****.

From the Resource menu select "Insert New Field" (Command-K).

In the empty box for TYPE insert KMAP, and for RES ID insert 2 as shown in the graphic below.

Once you have finished, save your work and quit ResEdit. Replace the old System suitcase with the new one and restart the computer.

Now when you plug in your Windows USB keyboard, the Command and Option keys will be where you want them!



Small Dog is a Loyal friend of ResEx! Go pet them!
Small Dog is a Loyal friend of ResEx! Go pet them!



Maintained by the Staff of ResExcellence. This entire site ©1997-2000.
Privacy Statement? Sure we gotta Privacy Statement.
7574