Important: The information in this document is obsolete and should not be used for new development.
Reassigning Right-Hand Key Codes
It is possible to reassign the standard raw key codes and virtual key codes for the Shift, Option, and Control keys on the right side of the Apple Extended Keyboard, in order to distinguish right-side keystrokes from left-side keystrokes for those keys. To do so, you need to obtain the special values listed in Table C-5.
Table C-5 Reassigning right key codes for Shift, Option, and Control keys Right
keyNormal
rawNormal
virtualSpecial
rawSpecial
virtualShift $38 $38 $7B $3C Option $3A $3A $7C $3D Control $36 $3B $7D $3E The normal raw and virtual key codes for Right-Shift, Right-Option, and Right-Control keys correspond to the left versions of these keys. You can obtain the special raw and virtual key codes only by changing the value of the device handler ID field in the Apple Extended Keyboard's register 3 from 2 to 3. For details about the device handler ID field, see Inside Macintosh: Devices.
- WARNING
- This capability is included for compatibility with certain existing operating systems that distinguish between the left and right versions of these keys. Its use by new applications violates the Apple human interface guidelines and is strongly discouraged.