Keyboard Types and Modifier Bits
Keyboard Types and Modifier Bits
The Table below furnishes a list of the keyboard types. These are used in some
of the keyboard resources: 'KCAP', 'KSWP', and 'itlk'. The 'KCHR', 'KSWP', and
'itlk' resources are described in the following sections. The 'KCAP' resource is
discussed in Key Caps and the 'KCAP' Resource.
The keyboard types
Keyboard type* Keyboard
1 Apple Keyboard (Domestic layout)
2 Apple Extended Keyboard and Apple Extended Keyboard
II (Domestic layout)
3 Macintosh 512K Keyboard (Domestic layout)
4 Apple Keyboard (ISO layout)
5 Apple Extended Keyboard II (ISO layout)
6 Apple Macintosh Portable Keyboard (Domestic layout)
7 Apple Macintosh Portable Keyboard (ISO layout)
8 Apple Macintosh Keyboard II (Domestic layout)
9 Apple Macintosh Keyboard II (ISO layout)
259 Macintosh 512K Keyboard (ISO layout)
*This is also the resource ID of the corresponding 'KCAP' resource. The
KbdType low-memory global variable contains the low byte of this value for
the last keyboard used.
The Table below supplies meanings of the keyboard modifier bits in the high
byte of the modifiers field of an event record ( defined by the EventRecord data
type). The byte consisting of these bits is used to control the selection of tables
in the 'KCHR' resource.
The keyboard modifier bits
Bit Key
7 (Right Control if used)
6 (Right Option if used)
5 (Right Shift if used)
4 Control (Left Control if different from Right Control)
3 Option (Left Option if different from Right Option)
2 Caps Lock
1 Shift (Left Shift if different from Right Shift)
0 Command