International Keyboards
W D Hine

This application displays, to the best of the author's knowledge, the  characters obtainable from the keyboard layouts currently available in  OS2.00.  Double click on the icon and you will be invited to select  one of these and then to choose an alphabet from the list.  To obtain  the default alphabet for the selected country/keyboard, simply press  Return, though you may later also wish to experiment with other  alphabets.  Press Return again to examine another keyboard layout.   Press Escape to quit; the keyboard will automatically be returned to  the default. Although the Programmer's Reference Manual lists 26  different keyboard numbers, only eighteen of these are valid when  tested with "OS_ServiceCall"&34,2.  Moreover, experiment suggests that  there are in fact only six different modules in the ROM.  The program  works on the assumption that this is the case.  Please note that the  information about the available keyboards provided by the program is  derived solely from experimenting with an A3000 and does not have any  authority from the manuals or from Acorn themselves.  The keyboard  module is not easy to explore and there may well be errors, especially  errors of omission, in the keyboard layouts presented by the program.   It deals only with the main keyboard; there is no discussion of the  numeric keypad.

The centre of the display shows all the characters that can be obtained  in a straightforward manner from the keyboard using only the standard  keys plus shifts.  The two edges of the display contain notes for  interpreting the central area.  You will see that each row of keys on  your keyboard is represented by as many as four rows in the display.   This is to allow for shifted keys, the characters for which are  displayed above the unshifted ones for the corresponding row.  Note  that the German and Greek keyboards use a special kind of shift which  only affects the character typed immediately after it.  If you hold  down the Shift key and type, say, RISC USER, all the characters will be  shown on the screen as capitals.  However, with keyboard Germany  selected, where the = key is an accent shift, holding down = will  result in only the first of the subsequent vowels typed being accented.   After that it has no effect.  You can experiment with this = shift key  using the XploreKeys program from this month's magazine.  Select the  keyboard for Greece and try a similar exercise with the  and \ keys,  which are also shifts of this type.  

The arrow keys and Copy can be made to act as character keys by means  of OS_Byte4,2 (or by entering *FX4,2 at the star prompt).  The  characters obtained from them in this condition are shown on the  keyboard displays.  Note that a hard space can be obtained by pressing  Alt-Space.  A hard space is used between two words to prevent their  being split at the end of a line;   "OS2.00" is typed with such a  space several times in this text, as are most of the star commands and  their parameters.  

ASCII codes 128 to 149 (&80 to &95), for which characters are only  shown in the Bfont alphabet table in the RISC OS User Guide do, in fact  have corresponding characters in Latin1 etc.  Some of these can be  obtained in the default state from the function keys, the arrow keys  (F12 to F15) after OS_Byte4,2, Copy (F11), Print (F0), Insert (F13),  Page Up and Page Down when pressed together with Shift or Ctrl.  The  exact effect of these special keys can be varied by means of OS_Bytes  221 to 228  (for further information, refer to volume II of the PRM).   The actual characters obtained from codes 128 to 149 vary according to  circumstance; the author has not been able to determine exactly what  the controlling circumstances are.  You might like to try to find out.   A couple of clues; it seems to have something to do with the Desktop  and how recently the Bfont alphabet has been selected. 

OTHER INFORMATION The countries are numbered from 0 (default, configured country) to 99.   Not all of these numbers are allocated and of those that are said in  the PRM (pp.1666 ff.) to be allocated, not all are obtainable in  OS2.00.  No doubt the appropriate modules will appear in future  versions of RISC OS.  Meanwhile, it is possible to write and load your  own keyboard handler module using OS_InstallKeyHandler.  The alphabets  are numbered from 100 to 126, but there are currently only six numbers  allocated.  OS_ServiceCall &43 can be used to convert numbers to names  and vice-versa.  There are various OS_Byte call equivalents of the five  *commands (*Country ... etc.)

You can find out which country, keyboard and alphabet are currently  selected by typing *Country, *Keyboard or *Alphabet respectively at the  command line.  No doubt readers who have experience of typewriters or  computers  designed for use in Germany, Greece or Scandinavia will  recognise the keyboard layouts obtained by issuing the appropriate  *Country<countryname> command  and, if they can touch-type, they may  be able to use these without changing any of the keytops.  If you wish,  you can configure any keyboard module as the default with the command  *ConfigureCountry<countryname>.

There is a method of obtaining the default (i.e. configured) keyboard  at any time; simply press Alt-Ctrl-F2.  This may be useful if, for  example, you have selected keyboard Greece and find you are typing  Greek characters at the command line!  Alt-Ctrl-F1 selects the UK  keyboard.  This method can be extended to all the available keyboards  in rather a singular way.  To select, for example, the keyboard layout  for Germany you must press and hold down Alt and Ctrl, then press F12,  release Ctrl and type in 44 on the numeric keypad, finally releasing  the Alt key.  44 is the international telephone dialling code for  Germany!  You can select any of the available keyboards in a similar  manner using the appropriate IDD code.  However, please note that this  method is equivalent to issuing a *Keyboard<country> command and does  not alter the currently selected alphabet.

The six keyboard layouts are held as text files in the Keyboard directory.  They can be loaded into a suitable word processor and printed out for reference.  Be sure to select the character set you want by issuing  the corresponding *Alphabet <alphabet name> or *Alphabet<country>  command at the star prompt.  In fact, the default character set is  Latin1 for all keyboards except Master and Compact (Bfont), Esperanto  (Latin3) and Greece (Greek).  The only way of being sure that all  characters will be printed correctly is to use the RISC OS printer  drivers with the system font.  Few other fonts contain all the more  obscure characters.  The program displays the text files by means of  the *TYPE <filename> command.  It uses *ConfigureDumpFormat5 to  prevent the upright bar character ("|") being printed twice.  The default is reset (DumpFormat4) when the program is quit (see Hints  & Tips, RISC User Vol. 4, Issue 5, p.66).
