## Entering APL Symbols

APL uses a variety of symbols to represent its built-in functions. Many of these are symbols that do not exist on a standard keyboard. Some of these will be familiar (for example, ÷ for divide, and ‰ for greater-than-or-equal). Others are specific to APL (for example — for round-up or greater-of, and ¦ for finding out if two arrays are exactly the same in shape and contents. ). In order to use APL, you need to be able to enter these symbols. Most versions of APLX provide you with two ways of doing this.

### The QuickSymTM pop-up

If you are completely new to APL, you will probably find it easiest, at least to start with, to use the QuickSymTM feature of APLX. By pressing a single key (usually the 'Menu' key in Windows, or a function key - by default F1 - under MacOS), you can bring up a panel which displays the APL symbols. This is described in the next section.

### Using an extended keyboard layout

The traditional way of entering special APL symbols is to use one of the extended keyboard layouts which APLX provides. You will probably want to use the 'unified' layout which is selected by default. This is configured as follows (the exact layout will vary according to the country in which you live and the specific model of keyboard):

As you can see, each key is shown with up to four symbols. As with a conventional keyboard, a given character key generates a lower case character and, when depressed in conjunction with the Shift key, the corresponding upper case character. These are shown in black and red on the above diagram, in the lower-left and upper-left positions on each key. In order to enter the other symbols, you use the AltGr key, which acts just like the Shift key in that it modifies the effect of another key. (In non-APL applications, AltGr is used to type various different characters, primarily ones that are unusual for the locale of the keyboard layout, such as foreign currency symbols and accented letters.) Using the AltGr key with another key produces the symbol displayed in green, on the lower right of each key in the diagram above. The remaining symbols (shown in blue, on the top right of each key) are entered by pressing the AltGr and Shift keys simultaneously. (Note: On a Macintosh keyboard, use the Alt or Option key instead of AltGr).

For example, the key in the upper row of the keyboard, inscribed with the digit 4, produces the following symbols:

- If pressed by itself, the digit 4
- If pressed with Shift, the dollar sign $
- If pressed with AltGr, the APL less-than-or-equals symbol ˆ
- If pressed with Shift and AltGr, the APL grade-up (sort) symbol “

### Missing AltGr key on US keyboards

Some US keyboards do not have an AltGr key. (Presumably this is because the manufacturers think it is inconceivable that their US customers might want to enter any foreign currency symbols or accented letters.) In this case you can use the Alt key instead. Unfortunately, under Windows, the Alt key is primarily intended as a keyboard shortcut modifier; for example, Alt-F normally brings up the File menu. In order to allow the use of Alt for entering APL characters, you need to enable the 'Use Alt key for APL symbols' checkbox in the Keyboard tab of the APLX Preferences dialog. Menus can still be activated by pressing Alt followed by the menu shortcut as separate keystrokes, for example by pressing Alt then F.

As an alternative, Windows recognizes Ctrl-Alt as the same as AltGr.

### Interference from other applications

Some badly-behaved non-APL applications may sometimes interfere with APL's keyboard handling. The following examples are known at the time of writing:

- Google Desktop intercepts the AltGr key when combined with the G key. This makes it impossible for an application on which Google Desktop is installed to recognize this key combination, and also conflicts with certain national keyboard layouts. There does not seem to be any way to disable this in Google Desktop.

- An application called 'CyberLink PowerDVD' starts itself automatically under Windows if Shift-AltGr-3 is pressed. Again there does not appear to be a way of disabling this.

If you encounter problems such as these, please report them as bugs to the supplier of the software concerned. In the meantime, you can either uninstall the interfering application, or use the QuickSym window to enter the characters which cause problems, or customize the APL keyboard to use a different key (see below).

### Choosing and customizing the keyboard layout

APLX supports three keyboard layouts. These are:

1) The "Unified" APL layout, as shown above. This is similar to an ordinary ASCII keyboard layout for unshifted and shifted keys. Special APL symbols are obtained by using AltGr or Shift-AltGr combinations.

2) The "Standard" or "Traditional" APL layout. This is based on the traditional APL keyboard where alphabetic keys unshifted give upper-case letters, shifted give APL symbols, and with the Alt or AltGr key give lower-case letters. It is recommended only for people who are used to programming in APL using a special APL keyboard.

3) The Default non-APL layout. In this mode, keyboard mapping is the same as in non-APL applications. For example, in the US it would usually be the ordinary US QWERTY keyboard. In France it will usually be the French AZERTY keyboard.

You can select which layout you want to use by selecting the Keyboard Layout item in the Tools menu of APLX's Session window. In addition, you can at any time swap between the Default non-APL layout and your preferred APL layout (Standard or Unified) by pressing Ctrl-N (or Cmd-N on the Macintosh). This is very useful for entering comments and text in APL functions, especially if you are using a language other than English

The current keyboard layout can be shown at any time by selecting the Keyboard Layout item in the Help menu. Under Windows, you can also display this by pressing Ctrl-F1.

### Customizing the keyboard layout

You can customize the keyboard layout using the Keyboard tab of the Preferences dialog. This allows you to move specific characters around on the keyboard, or set up a completely different keyboard mapping if you prefer.

Topic: APLX Help : Getting Started with APLX: Entering APL Symbols

[ Previous | Next | Contents | Index ]