Important: The information in this document is obsolete and should not be used for new development.
Other Hardware DependenciesThe principle underlying virtual key codes is to have a single unique code per
character code, regardless of the keyboard used. Nevertheless, some hardware dependencies remain:
- The small Macintosh 512K Keyboard with ISO layout and the ISO ADB keyboards have an extra key not present on domestic keyboards. This key produces a virtual
key code of $0A.
- There is a different virtual key code for the Enter key, depending on whether it is on the keypad ($4C on the Macintosh Plus keyboard and most ADB keyboards), or on the main section of the keyboard ($34 on the original Macintosh keyboard and the Macintosh Portable and PowerBook keyboards).
- Virtual key codes for cursor keys and some keypad operator keys differ between ADB keyboards and non-ADB (Macintosh Plus) keyboards, as shown in Table C-6. Note that on Macintosh Plus keyboards, the virtual key codes for keypad operators are the same as the virtual key codes for cursor keys. The Shift modifier controls which character code is generated. On these keyboards, for example, holding down the Shift key and pressing the Left Arrow key produces the plus character (+).
Table C-6 ADB and non-ADB virtual key codes for cursor keys and keypad keys Key ADB code Non-ADB code (Macintosh Plus) Left Arrow $7B $46 Right Arrow $7C $42 Down Arrow $7D $48 Up Arrow $7E $4D Keypad Plus (+) $45 $46 (with Shift bit set in modifiers) Keypad Asterisk (*) $43 $42 (with Shift bit set in modifiers) Keypad Equal (=) $51 $48 (with Shift bit set in modifiers) Keypad Slash (/) $4B $4D (with Shift bit set in modifiers)