Alternate Keyboard Mappings
You can create an alternate keyboard map to toggle between keyboards if you want to author in a language other than the language of your native environment.
To create an alternate keyboard map:
1. Insert the entity declaration in your DTD to support the characters for your alternate language.
2. Install fonts for the alternate language.
3. Create an .acl file populated with commands defining a keyboard map (example below).
4. Source the .acl file.
The following .acl file excerpt shows how to map the keyboard to Greek and assign a function key to toggle between the default user keyboard and the Greek keyboard mapping. Notice that each lowercase and each upper case character on the keyboard is mapped to a character entity. The ie abbreviation is for the insert_entity command alias. In this example, pressing the F12 function key toggles between the two keyboard mappings.
# Define a Greek keymap for the letter keys using
# Adobe PostScript order
if (!keymap_exists("greek_map")) {
define_keymap greek_map
}
# lower case
map @greek_map a ie agr
map @greek_map b ie bgr
map @greek_map c ie khgr
.
.
.
# upper case
map @greek_map A ie Agr
map @greek_map B ie Bgr
map @greek_map C ie KHgr
.
.
.
# switch back to normal map if f12 pressed
map @greek_map f12 {set keymap=user;
window_set(0, "message", "Back to normal keymap");
}
# switch to greek keymap if f12 pressed
map edit f12 {set keymap=greek_map;
window_set(0, "message", "Using Greek keymap");
}