Important: The information in this document is obsolete and should not be used for new development.
Appendix C - Keyboard Resources
This appendix describes the Macintosh keyboard resources. The keyboard resources make text input possible; they provide a hardware interface to different types of keyboards and a software interface to different script systems. Some of the keyboard resources belong to an individual script system and are independent of any particular keyboard; others belong to a type of keyboard and are independent of any script system.By installing the appropriate keyboard resources, you can perform text input in any script system, from any Macintosh-supported keyboard. By modifying the keyboard resources, you can localize or customize text input by changing keyboard layouts, remapping key combinations, creating keyboard icons, modifying the keyboard-layout display in the Key Caps desk accessory, and changing the way the user switches among keyboard layouts and keyboard scripts.
Most text-processing applications have no need for direct access to keyboard resources. You may need to read this appendix, however, if you are
Before reading this appendix, read the chapter "Introduction to Text on the Macintosh" in this book. The keyboard resources are used by the Script Manager, described in this book, and by the Event Manager and Menu Manager, described in Inside Macintosh: Macintosh Toolbox Essentials. Resources in general are described in the Resource Manager chapter of Inside Macintosh: More Macintosh Toolbox. Additional information on keyboards themselves can be found in Inside Macintosh: Devices and in Guide to the Macintosh Family Hardware.
- using the Event Manager
KeyTranslate
function to get specific information from a custom keyboard-layout resource or to make Command-key handling more script-independent- creating your own localized version of a script system
- designing a new type of keyboard
This appendix starts with a brief discussion of keyboards. It then lists the keyboard resources, shows how they may differ in different versions of localized software, and presents the concept of key translation. It then discusses each keyboard resource in detail.
- Note
- All keyboard information that relates to virtual key codes and their relation to raw key codes is discussed under "Key-Map Resource (Type 'KMAP')" beginning on page C-11, even if it is not specifically related to the key-map resource.
Appendix Contents
- About Keyboards
- About the Keyboard Resources
- What the Keyboard Resources Are
- Key Translation
- Using the Keyboard Resources
- Key-Map Resource (Type 'KMAP')
- Apple Extended Keyboard
- Reassigning Right-Hand Key Codes
- Other Hardware Dependencies
- Virtual Key Codes for Non-ADB Keyboards
- Key-Remap Resource (Type 'itlk')
- Keyboard-Layout Resource (Type 'KCHR')
- Resource Format
- The KeyTranslate Function and the Keyboard-Layout Resource
- Special Uses for the KeyTranslate Function
- Installing a Custom Keyboard-Layout Resource
- Using KeyTranslate for Command-Key Equivalents
- Keyboard Icon Family (Types 'kcs#', 'kcs4', 'kcs8')
- Keyboard-Swap Resource (Type 'KSWP')
- Key-Caps Resource (Type 'KCAP')
- Resource Format
- Key Caps Desk Accessory
- Summary of the Keyboard Resources
- Assembly-Language Summary
- Global Variables