1 Lisp Library Modules, Medley Release 1.2, VIRTUALKEYBOARDS 1 Lisp Library Modules, Medley Release 1.2, VIRTUALKEYBOARDS VIRTUALKEYBOARDS 1 VIRTUALKEYBOARDS 1 VIRTUAL KEYBOARDS 6 VirtualKeyboards(VIRTUALKEYBOARDS NIL VirtualKeyboards NIL NIL 307) lets you change the behavior of your Lisp workstation keyboard to mimic another keyboard, hence making yours a virtual version of that other keyboard. It also lets you display pictures of keyboards on your screen and use them as menus for typing occasional special characters(SPECIAL% CHARACTERS NIL special% characters NIL NIL 307). Several keyboards may be displayed on the screen at once, letting you switch easily among keyboards for several languages and making hundreds of characters available for typing. The virtual keyboards supplied with the module are Dvorak, German, Greek, Italian, logic, math, Spanish, European accents, and standard Russian. You can also define new keyboards with the associated Keyboard Editor module, which lets you edit a keyboard while seeing the actual look of the characters. The virtual keyboards can be used with TEdit(TEDIT NIL TEdit NIL NIL 307), DEdit(DEDIT NIL DEdit NIL NIL 307), in the Lisp Executive window, for any application with which you use your keyboard. Requirements 1 You need one of the following files, as appropriate for the machine you are using: DANDELIONKEYBOARDS DORADOKEYBOARDS DOVEKEYBOARDS Installation 1 Load VIRTUALKEYBOARDS.LCOM from the library. VirtualKeyboards loads the xxxKEYBOARDS files. User Interface 1 Loading VirtualKeyboards adds the item KEYBOARD to the background menu and the default window menu. Using the mouse in this module is the same as in the KeyboardEditor. Selecting this item from the background menu changes your keyboard for all windows. Y <A@gL#qpDH"ȁD$Hq $@@/H~#$G@!$H@!$$@#$$#@@@GK@HHB* @HHB"@G<@ ! @ @?@ @ ! A AH H >A@Dp<"D(P2(PA" >p   . 1 !$@ !@  18Dxqg@ D"DĄ  U$@>(9@  U$@ (@ "$D"Ą "#8xu@  ` ŝ<\DP &"BbD ! BB(P> @ @ $! BB(A @@ $#"Bb@"+.@\G <\<")1LH"bH @I!HA BC @`I!HHA BL A!HH"bH >!G@\GD b@ H$b@ Hb G B "  !8" Dđ"LI 8HH HH "DđHH@ 8H@ ?@  0   ?  @  @  8DxqgG ?MD"DĄȀ H|>(9G H@ (@ HD"ĄȀ g8xuG  ` Ҋ8 2D R    Rd   2"Dà%Ë:8=# ":$`&$$MFD$J D$!B8' $ D$&HB$ $`$$HFD$D Ӡè:8#  p ~;xx ۳esP |wo{ wo{p@ osGa#Kt >xxH$A"$LHH GCHC HDHL HA! HH G Pt    Selecting this item from the default window menu allows you to specify a keyboard for an individual window. Y ! @#Ç@$$H@$#@$ H!$$H#Ç  .1!! 1    %&$$$$$$$# Ë $M  H$Hè@HKDMDHH(HH(HH`H  @ #H8Ey%Ë:$HDE"& &$$MFHPB" D$!B$HdP"" D$&HB$HD !"$ $$HF#H:  è: @ CHH @#:8xS^qp\:H8MFDĈH"bFD!B@PSHBBHP&HB@PH2BBHdP$HFD CDH"BFD #:8x DFqB:H:  `C>@`!@QGS q<\HQHH &$BbHJHES $8BBEJHE $$ȠBBEDHBC!&$@BBBDG>t@ ! !!2B ( #H1!"B2 " '.A @ _@ wh8"\<8gonWD̐" "bBD`:ox|> BB {of_@ BBd onD"bBD`}_8N\<:0 The main keyboard module commands are described in detail below. Switch Keyboards(SWITCH% KEYBOARDS NIL Switch% Keyboards NIL NIL 308) Use the SWITCH KEYBOARD command to change the behavior of your keyboard to that of a selected virtual keyboard. This brings up a menu of the keyboards currently known to the program. Y@GL``X0`X66X66`X66`X66`Y6`L6`G8@0@@@_X Xl Xl XoFXl fXl Xl fX 33_ 1@@@@_o0Xl30Xl6 xXl6 x_o HXl6 Xl6 Xl6 X 3_nj1@@@@XXXY>[c[`[`[c[cY>@@@@\0a\0a^Lfc`X6`X6`X7~X6`X6`X6`Lfc`G>@@@@_1cX3fXl6 C}vǏ}{5_:Y5_Y:55\:::Y5\5Y:UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU55\ꪪ::UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU:Y5\ꪪ5Y:UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU55\ꪪ::UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU:Y5\ꪪ5Y:U______________UU55\ꪰ::U``````````````UU:Y5\ꪠ5Y:U``````````````UU55\ꪠ@@@@@@@::U`` ``@`@````@`@`@`@``UU:Y5\ꪠ @@@@@5Y:U`` `````@`@````@``UU55\ꪠ@@@@@@::U`0` ``@`@``@`@``@`@`@``0UU:Y5\ꪠ @@@@@@@`5Y:U` ` ````````````UU55\ꪠ::U``````````````UU:Y5\ꪠ 5Y:U```````````````UU55\ꪠ0 0::U``` ```````````UU:Y5\ꪠ 5Y:U``` `````````X``UU55\ꪠ d::U``` ```````````UU:Y5\ꪠ 5Y:U``` ```````````UU55\ꪠ::U``` ```````````UU:Y5\ꪰ5Y:U___}___________UU55\ꪪ::UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU:Y5\ꪪ5Y:U______________UU55\ꪰ::U``````````````UU:Y5\ꪠ5Y:U``@`8`8`0``8``w`w``p``UU55\ꪠP ""  ::U```` `@``` `"`"` `@``UU:Y5\ꪠ` @@""@@5Y:U``@``@`````"`"````UU55\ꪠ0 @"" @::U``@``` ````"`"` `@``UU:Y5\ꪠ @(""  5Y:U````````8`````p``UU55\ꪠ::U` `````````````UU:Y5\ꪠ5Y:U``@````````````1UU55\ꪠa::U``````````````UU:Y5\ꪠ````5Y:U``@`@`@```@``H`H``@```UU55\ꪠ@@HH0::U``@`@``@``@``H`H``` `UU:Y5\ꪠ@@@@HH@ 5Y:U``````````````````UU55\ꪠ ::U``` ```````````UU:Y5\ꪰ5Y:U______________UU55\ꪪ::UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU`UU:Y5\ꪪ5Y:U_____________`UU55\ꪰ::U``````````````UU:Y5\ꪠ5Y:U```````````s```UU55\ꪠ@    % ::U```` `@`` `` ``$```UU:Y5\ꪠD @  $5Y:U``D``` ```` `````UU55\ꪠD $::U````````` ``$```UU:Y5\ꪠ@  % 5X:U`````8`8```p``s```UU55\ꪠ::U``````````````UU:_5\ꪠ5UW:U``````````````UU55\ꪠ::U``````````````UU:UW5\ꪠ8 5UW:U````@`@`@` `@`@`` `@``UU55\ꪤ1@ @@::UdJ(``P`@`@`@` `@`@```@``UU:UW5\ꪤJ0P@@@ @@@5UW:UdJ(``````````` ```UU55\ꪧ1@::U``````````@````UU:UW5\ꪰ5UW:U______________UU55\ꪪ::UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU:UW5\ꪪ5UW?U____________UU5?ꪰ@: U` ``````````@` UU:UW ꪠ  5UWU` ``8`` `8````8`` UU5ꪠ  0 D :U` ` ````0``` ``` UU:UUU\ꪠ  P @ 5UUU\U` ``````````` UU5ꪠ  @ :U` ` ```H``````` UU:UUU\ꪠ  HD 5UUU\U` ` p```\`8````8`` UU5ꪠ  :U` ``````````` UU:UUU\ꪠ  5UUU\U` ````````@``` UU5ꪠ  :U` ``````````` UU:UUU\ꪠ ``0 5UUU\U` `@`@``0`@`@``@`H`` UU5ꪠ#J@@0@@#J:U`$J`````@``@`@`H``$JUU:UUU\ꪠ"z@@@@@H"z5UUU\U`!J``````````0``!JUU5ꪠ'J'J:U` ``````````` UU:UUU\ꪰ5UUU\U____________UU5ꪪ:UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU:UUU\ꪪ5UUU\UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU5ꪪ:UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU:UUU\ꪪ5UUU\UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU5::UUU\5UUU\5UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Figure 9. Keyboard layout display Display-Only a Keyboard(DISPLAY-ONLY% A% KEYBOARD NIL Display-Only% a% Keyboard NIL NIL 309) You can display the layout for any given virtual keyboard using the DISPLAY ONLY command. You will be offered a menu of the keyboards known to the program (such as above); select the one you want to display. This is useful if you are primarily using the standard English keyboard but need to type some characters in other languages, or some special characters such as mathematical symbols. You can use the displayed image as a menu: Selecting a key from the image with the left mouse button will send the character assigned to that key, and pressing the shift key while you click on a key will send the shifted character. Middle-clicking also sends the shifted character. The effect is exactly as if you had pressed a key with that character assigned to it (except that interrupt characters are treated as ordinary characters; i.e., they do not cause an interrupt). The character is sent to the process that has the TTY (usually where the caret is flashing). Store Keyboards(STORE% KEYBOARDS NIL Store% Keyboards NIL NIL 309) After you edit a keyboard (using the KeyboardEditor module), you can store it using the STORE KEYBOARDS command in the top-level menu. When you select STORE KEYBOARDS, the system will prompt you for a file name. After you type the file name into the prompt window, the system will store all the keyboards known to it (both new and old) in that file in a form that will enable it to load them. Loading Keyboards File To load a keyboards file, choose the LOAD KEYBOARDS FILE command, then slide the mouse cursor to the right and choose one of the three items in its submenu. Y_> A D@y8D<"$D( 8(#$A"$D>8@@\"b B B"BBAIBAAKRIRI B H'PHH$DHC H @!@@@@" @#@H$@$@ $B $#pR$d$$R$$$dB#pA0`@A0`"(""(>% L % H"" D"  Ë$L@D!@>  $&H@A  $$L@@"+.G.Y#<")11!"j0I!!!BI! !!2BA!H1!"B0>!'.A@D@qgGTȐ@9HT@@H@@ȐD:G@uGDLA0FH$@RD@rBGERDAB@"B"DHA0FH!"3@:G   B.#D B1$HD !!( !&E( 1$B88 .#Dđ"D $ | |   `@ @ Dđ"D d88 $>   $A   d@yG.Y `<"Q1!"j2  "!!B@  " !!2B @  A"H1!"B2 xYã  >'.A2 j$dH |$  C'Ȑ   B$ 8t$ 2 B$dH xDČ$Aã |$ @$p D$v1q |8t{vۻvvnP {׃q@ {6˿m~p@ {vݻvn(::G=. ޏq(FFHȑ1" DBBO!> _?|BBH! ߎ:bFFHȑ!" v\T::`G! _]@ ]\@@ wŘxDqŝ+|&dH&DQP!DQh$!$D!DC$#Dx BpB@ Replace All Known Keyboards(REPLACE% ALL% KNOWN% KEYBOARDS NIL Replace% All% Known% Keyboards NIL NIL 310) Choosing REPLACE will load a set of keyboards that you stored using the StORE KEYBOARDS command, replacing all the keyboards currently known to the system. The currently known keyboards will be lost. Add New Keyboards to the List(ADD% NEW% KEYBOARDS% TO% THE% LIST NIL Add% New% Keyboards% to% the% List NIL NIL 310) of Known Keyboards To add new keyboards without replacing any of the currently known keyboards, select ADD--DON'T REDEFINE. This will load a set of keyboard definitions. If a keyboard in the file has the same name as one that is already known to the system, that keyboard will not be loaded and the current definition will stay in effect. Load New Keyboards(LOAD% NEW% KEYBOARDS NIL Load% New% Keyboards NIL NIL 310) and Redefine Existing Keyboards(REDEFINE% EXISTING% KEYBOARDS NIL Redefine% Existing% Keyboards NIL NIL 310) The ADD--REDEFINE command is similar to ADD--DON'T REDEFINE, except that it redefines existing keyboards that have the same name as keyboards on the file. Currently known keyboards that do not have the same name as newly loaded keyboards will remain in the list of known keyboards. Removing Keyboards From the Menu(REMOVING% KEYBOARDS% FROM% THE% MENU NIL Removing% Keyboards% From% the% Menu NIL NIL 310) To remove a keyboard from the set of currently known keyboards, select the REMOVE KEYBOARD command. This will pop up a menu of the known keyboards (such as above), from which you can select a keyboard to be deleted. Defining a Virtual Keyboard(DEFINING% A% VIRTUAL% KEYBOARD NIL Defining% a% Virtual% Keyboard NIL NIL 310) 1 A virtual keyboard is a list whose CAR is the name of the keyboard and whose CDR is a list of key actions. Creating a new virtual keyboard can be done directly in Lisp or interactively, using the KeyboardEditor module. Using the Functional Interface The list of keyboards that are known to the program appears in the menu of keyboard names that pops up when you select SWITCH KEYBOARD from the background menu. This list is stored in the global variable VKBD.KNOWN-KEYBOARDS (see below). To add a keyboard to the list, you have to define that keyboard. To define a keyboard you can either call the function DEFINEKEYBOARD or manipulate the variable VKBD.KNOWN-KEYBOARDS directly as explained herein. You may also use the KeyboardEditor module, which provides a menu-based user interface for creating and changing keyboard layouts. A virtual keyboard is a list of the form (KEYBOARD-NAME KEY-ASSIGNMENT1 KEY-ASSIGNMENT2 . . .) A KEY-ASSIGNMENT is a list of the form (KEY (UNSHIFTED-CHAR SHIFTED-CHAR LOCK/UNLOCK)) KEY is a key name (the character that appears on the actual keyboard). UNSHIFTED-CHAR and SHIFTED-CHAR are character codes. Each can be either an integer representing the actual code or a list of two elements: the number of the character set and the number of the character in the set. LOCK/UNLOCK is either the atom LOCKSHIFT, in which case SHIFTED-CHAR will be transmitted when the shift-lock key is down, or NOLOCKSHIFT, in which case the shift-lock key has no effect on that key. LOCK/UNLOCK is LOCKSHIFT by default. (DEFINEKEYBOARD(DEFINEKEYBOARD (function) NIL NIL NIL 311) KEYBOARD-NAME LIST-OF-KEY-ASSIGNMENTS KEYS-ARE-NUMBERS?) [Function] Creates a new virtual keyboard after parsing the list of key assignments and adds the keyboard to the list of known keyboards. If KEYS-ARE-NUMBERS? is T, the function expects to find key numbers instead of key names. (SWITCHKEYBOARDS(SWITCHKEYBOARDS (function) NIL NIL NIL 311) NEW-KEYBOARD SWITCH-FLG DISPLAY-FLG MENU-POSITION) [Function] Switches the current keyboard to NEW-KEYBOARD, where NEW-KEYBOARD is either a virtual keyboard or the name of a known keyboard. If SWITCH-FLG is non-NIL, the actual key actions of the keyboard will be modified. If DISPLAY-FLG is non-NIL, a window with a menu will be displayed. This displayed keyboard will act as a menu and will send characters to the current input stream when a character is selected. VKBD.KNOWN-KEYBOARDS(VKBD.KNOWN-KEYBOARDS (variable) NIL NIL NIL 311) [Variable] Contains the list of all currently known virtual keyboards. Limitations 1 After loading the Dvorak keyboard(DVORAK% KEYBOARD NIL Dvorak% keyboard NIL NIL 311), and then restoring defaults, you lose the shift- lock key. [This page intentionally left blank](LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 307) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (TEXT NIL NIL (54 54 504 702) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))2,HH-T-T,HH ,ll2HT 2$$2HH2$$2HH3T3T2ll2ll2HH 2HH2HH2, 222-T,3T2F PAGEHEADING VERSOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGRF PAGEHEADING RECTOHEAD CLASSIC  HELVETICA CLASSICCLASSIC TITAN  HELVETICA HELVETICA HELVETICA MODERN MODERNMODERN MODERNMODERN  HRULE.GETFNMODERN  :  HRULE.GETFNMODERN  ;  HRULE.GETFNMODERN   HRULE.GETFNMODERN    HRULE.GETFNMODERN  3IM.INDEX.GETFN9IM.INDEX.GETFN/,IM.INDEX.GETFNIM.INDEX.GETFNU   HRULE.GETFNMODERN T    HRULE.GETFNMODERN D    HRULE.GETFNMODERN R P BMOBJ.GETFN3MODERN  m  BMOBJ.GETFN3MODERN  C  5IM.INDEX.GETFN  BMOBJ.GETFN3MODERN   QIM.INDEX.GETFNmU@ BMOBJ.GETFN3MODERN  )  EIM.INDEX.GETFN   3IM.INDEX.GETFNX1 %e ( BMOBJ.GETFN3MODERN   OIM.INDEX.GETFN- WIM.INDEX.GETFN ;IM.INDEX.GETFN MIM.INDEX.GETFN [IM.INDEX.GETFN  OIM.INDEX.GETFN HRULE.GETFNMODERN )   ' E    9 ?    +IM.INDEX.GETFNMODERN  7 B ,IM.INDEX.GETFNMODERN  1 !  A = 1IM.INDEX.GETFNMODERN <  HRULE.GETFNMODERN !3IM.INDEX.GETFN>$#;z