The 'itlk' Resource
The 'itlk' Resource
The 'itlk' resource is used to make the various international keyboard layouts
work on all of the keyboard models. It specifies how to remap certain key
combinations before the KeyTrans function is called.
Note: Starting with System 7.0, the Script Manager only loads
the 'itlk' resource from the System file.
The Figure below shows the 'itlk' resource. It consists of an integer count of
entries succeeded by a set of 8-byte entries.
The 'itlk' resource entries
Before KeyTrans begins processing with the 'KCHR' resource, the current
keyboard type, key code, and modifiers are compared against each entry. If
there is a match, it substitutes the new modifiers and key code before calling
KeyTrans. Each pair of character modifiers and character codes is defined to
produce a number of new modifiers and new key codes. Here is how the 'itlk'
resource can produce multiple modifiers:
1. An AND operation is performed on the new modifiers and key code
with the character modifiers and character code from the entry.
2. An AND operation is performed on the current modifiers and key code
with the complement of the character modifiers and character code from the
entry.
3. The logical OR of these two products is the final result. This allows
for a more compact table when several characters on one key are mapped
together to a different key.The Rez file SysTypes.r contains the Rez type
definition for the 'itlk' resource.