The “.Keyboard” Font

The Appearance Manager adds major enhancements to the MacOS look and feel, as well as much new functionality in the Window Manager, Control Manager, Menu Manager and Dialog Manager. It is built into MacOS 8.0 and later, and is available as an extension for MacOS versions back to 7.1.

Among the enhancements to the Menu Manager is the ability to display various special “glyphs” as part of the keyboard shortcut for a menu item, using the SetMenuItemKeyGlyph call. The last argument to this call is a character code in a special font called “.Keyboard” (note the initial dot in the name, to keep it from appearing in normal font menus).

The complete .Keyboard font in Appearance 1.0.2 is a TrueType font containing 72 glyphs as follows:

However, short of using a typographical API like QuickDraw GX, or taking apart the “sfnt” resource yourself, there is no way to get direct access to all these glyphs. Certainly, the Appearance Manager itself does not give you such access. Instead, you must work through one of the font encodings. Here is the MacOS Roman encoding for the .Keyboard font:

All the empty positions, and the ones not appearing in the chart (except one) map to the glyph in position 0. The exception is character 240, which maps to the same apple glyph as position 20.

Created 1998 April 20.

Back to Mac Hacker‘s Info Page