unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



keyboard(5)							  keyboard(5)



NAME

  keyboard - Using keyboards for different native languages

DESCRIPTION

  The keyboard lets you	type not only the characters printed on	the keycaps,
  but all the characters from the character set	for the	language that your
  keyboard supports.

  For your keyboard to function	correctly with your system, you	must load a
  keyboard mapping table (keymap) that is appropriate for your keyboard's
  model	and language. If you load a keymap that	does not correspond to your
  keyboard's model and language, your keyboard behavior	is unpredictable. The
  label	located	on the bottom surface of a keyboard usually specifies its
  model	(five letter code) and language	(two letter code). See the reference
  page for the native language you are using (Spanish(5), for example) to
  find tables that associate keyboard styles and models	with keymap names.

  Setting the Correct Keyboard for Login


  When any user	logs on	to a system, the system-default	keyboard setting must
  be appropriate for the keys that the user presses when entering characters
  in the username and password fields. Otherwise, characters that are correct
  from the user	perspective, given the keyboard	being used, may	be treated as
  invalid. In this case, the user cannot log on	the the	system.	This situa-
  tion most often arises when a	keyboard is being used in one language and
  the system-default keyboard setting is another language.  If you will	not
  use keys as set for the system-default keyboard, you must use	one of the
  following two	methods	to change the system default keyboard:

    +  Change the keyboard language at the console prompt

       In this case, the system	recognizes the hardware	layout of the key-
       board (PCXAL as opposed to LK201, for example), but requires more
       input with respect to how characters are	mapped to specific keys. The
       X server, which has control of the system at the	time users log on,
       recognizes keyboard language changes set	at the console prompt.

    +  Change the keymap used by the X server by editing the Xserver.conf
       file

       This is the only	option for changing the	system-default keyboard	when
       the keyboard language you need is not one of those listed at the	con-
       sole level.  Using this option also overrides at	login time any key-
       board setting made at the console level.	In this	case, you are speci-
       fying a keymap file to the X server. A keymap specification must	be
       correct from both the hardware perspective (keyboard layout) and	how
       characters are mapped to	specific keys.

       Edit the	/usr/var/X11/Xserver.conf file by adding the -xkbmap option
       to the arguments	list after the -pn option:


	    ! you specify command line arguments here
	    args <
	    -pn	-xkbmap	<keymap-filename_keymap-name>
	    >

       For example:


	    ! you specify command line arguments here
	    args <
	    -pn	-xkbmap	/usr/lib/X11/xkb/keymaps.dir_digital_japanese_pcxajaa
	    >

       This example changes the	system-default keyboard	to be a	PCXAL
       hardware	layout and Japanese JIS	character entry. For more information
       about editing the Xserver.conf file, see	Xdec(1X). For more extensive
       information about keyboard use and changing the keyboard	setting	after
       login, see dxkeyboard(1X).

  The operating	system supports	keymaps	in xmodmap format, xkb format, or
  both formats.	Note that xkb format is	recommended, and keymaps for new key-
  boards may be	available only in that format.

  After	logging	on, you	can use	the Keyboard Options application (dxkeyboard)
  to change your keyboard setting during a CDE session.	 The next two sec-
  tions	describe how to	do this.  In CDE, selecting keyboards through menu
  choices loads	keymaps	in xkb format. However,	you can	load keymaps in	xmod-
  map format if	you prefer. Note that any changes made to the keyboard set-
  ting using dxkeyboard	do not affect the keyboard setting that	applies	when
  you are logging on the system. Only the system-default keyboard setting
  affects system login.

  Loading Keymaps in xkb Format


  During a CDE session,	use the	following steps	to load	a keymap in xkb	for-
  mat:

   1.  Click on	the Application	Manager's icon on the Front Panel.

   2.  Double click on the Desktop_Apps	icon to	show the Desktop Applica-
       tions.

   3.  Double click on the Keyboard Options icon.

       The Keyboard Option dialog box displays two selection lists

   4.  From the	Language list in the dialog box, choose	the language for your
       keyboard.

   5.  From the	Keyboard Type list in the dialog box, choose the model of
       your keyboard.

       If you chose one	of the VT style	models,	you can	also click on one of
       the Keyboard Style radio	buttons	that selects typewriter	or data	pro-
       cessing layout. (By default, typewriter layout is selected for you.)

   6.  Click on	the Apply or OK	button.

  All supported	keyboard models	are not	represented in the Keyboard Type
  selection list displayed by the dxkeyboard application.




  Loading Keymaps in xmodmap Format


  Use the following steps to load a keymap in xmodmap format:

   1.  Check the /usr/lib/X11/keymaps directory	to find	the name.keymap	file
       that corresponds	to your	keyboard model and language.

   2.  Use the following command to load the keymap:


	    % /usr/bin/X11/xmodmap /usr/lib/X11/keymaps/name.keymap



  Using	the Keyboard


  For most native languages, you usually enter characters by using a one- or
  two-key sequence. For	example, you press a letter key	to enter a letter in
  lowercase and	hold down Shift	while pressing the letter key to enter the
  letter in uppercase. However,	keyboards that support certain languages may
  support more than two	characters per keycap. When using these	keyboards,
  you have to press several keys, either at the	same time or in	sequence, to
  enter	some of	the characters in the language.	The following sections
  describe the prefix and modifier keys	used for different kinds of character
  input	methods	and then provide instructions on using those input methods.

PREFIX AND MODIFIER KEYS

  Both the VT and PC styles of keyboards group keys by function	into four
  subsets, or keypads. This discussion is only about the main keypad and not
  the auxilliary keypads.

  The main keypad, which is similar to a typewriter keyboard, contains the
  keys with alphanumeric characters, punctuation marks,	the space bar, and
  Shift	keys. Unlike a typewriter keyboard, the	main keypad contains addi-
  tional modifier and prefix keys. Modifier keys are pressed in	combination
  with another key, to modify the code sent by that key. Prefix	keys are
  pressed and released before pressing another key, to change the function of
  one or more keystrokes that follow.

  Lock and Shift, which	are found on the typewriter keyboard, are examples of
  keys that are	implemented as modifier	or prefix keys for VT and PC style
  keyboards.  Ctrl, Alt, and Compose, not found	on typewriter keyboards, are
  also examples	of keycap engravings that identify a modifier or prefix	key.
  However, the engraved	names and functions of modifier	and prefix keys	vary
  between the VT and PC	keyboard styles. Even within a given keyboard style,
  the engraved names and functions of these keys may differ from one native
  language to another.

  Control keys


  Control keys (whose keycap engraving usually is Ctrl)	are most often used
  to send a control (nonprintable) character to	the host system. For example,
  holding down Ctrl while pressing the letter C	usually	sends a	sequence that
  stops, or aborts, an operation. However, a control key is sometimes used in
  conjunction with other modifier keys to perform some special keyboard	func-
  tions.

  On VT	style keyboards, there is one control key, which is located on the
  left side of the main	keypad.	On PC style keyboards, there are two control
  keys,	which are located on the left and right	sides of the main keypad.


  Shift	Keys


  Shift	keys (whose keycap engraving is	usually	Shift) cause a standard	key
  to send an uppercase character for alphabetic	keys or	shifted	(top)
  character for	nonalphabetic keys. There are two Shift	keys on	both the VT
  and PC styles	of keyboards. Holding down Shift while pressing	a standard
  key sends the	uppercase character on alphabetic keys or shifted (top)	char-
  acter	engraved on nonalphabetic keys.

  Lock Key


  The lock key (whose keycap engraving usually includes	Lock) can put the
  keyboard in Caps Lock	mode or	Shift Lock mode. On both VT and	PC styles of
  keyboards, there is one lock key, which is located on	the left side of the
  main keypad.

  You can set the lock mode (Caps Lock mode or Shift Lock mode)	for your key-
  board	by using the interface that your windows application environment pro-
  vides	for general keyboard setup. In the Common Desktop Environment (CDE),
  you choose the Keyboard application. (The path name for this application is
  /usr/dt/bin/dxkeyboard.)

  In Caps Lock mode, the alphabetic keys send their uppercase (shifted)	char-
  acter	when pressed alone. For	Caps Lock mode,	pressing and releasing the
  lock key turns on the	mode and pressing and releasing	the lock key again
  turns	off the	mode. In Shift Lock mode, all keys on the main keypad send
  their	shifted	character when pressed alone. For Shift	Lock mode, pressing
  and releasing	the Lock key turns on the mode,	and pressing and releasing
  either the Lock or the Shift key turns off the mode.

  Compose-Character Keys


  Compose-character keys (often	engraved with Compose) were originally
  designed to prefix a sequence	of keystrokes. However,	for most languages on
  VT style keyboards (except the LK201), the left compose-character key	has
  been redefined to be the group-shift or alternate-function key.

  PC style keyboards do	not include Compose keys. The VT style LK201 keyboard
  contains one Compose key on the left side of the main	keypad.	Other VT
  style	keyboards contain two Compose keys, one	on each	side of	the main
  keypad.

  Alternate-Function Keys


  Alternate-function keys (usually engraved with Alt or	Alt Gr)	either select
  alternate functions defined by application software or generate characters
  not present on the keyboard. The PC style and	most VT	style keyboards	have
  two alternate-function keys, one on each side	of the main keypad.

  For the VT style keyboard, LK201, no key is defined by default to be an
  alternate-function key. However, the one Compose key,	located	on the left
  side of the keyboard can be redefined	to be an alternate-function key.

  For PC style keyboards supporting languages other than American English,
  the alternate-function key on	the right side is engraved with	Alt Gr,
  rather than Alt.






INPUT METHODS FOR CHARACTER ENTRY




				     Note

       This reference page does	not discuss complex input methods used to
       input characters	in Asian languages. See	the Chinese(5),	Japanese(5),
       Korean(5), and Thai(5) reference	pages for information about input
       methods used with a particular Asian language.

  The alphanumeric and punctuation characters used for a particular native
  language are usually all present on the keyboard for that language. Depend-
  ing on the number of characters in the alphabet for the language, it is
  sometimes necessary to engrave more than two characters per keycap. In this
  case,	the more frequently used characters are	usually	engraved on the	left
  side of the keycaps and the less frequently used characters on the right
  side of the keycaps.	Characters on the left side of the keycap are called
  Group	1 characters and those on the right side of the	keycap are called
  Group	2 characters.

  Entering Characters Engraved on the Keycaps


  The keycaps on keyboards for languages supported by the ISO Latin character
  sets can be engraved with characters from one	or two alphabets. Keyboards
  on which only	one alphabet appears support languages,	such as	Czech,
  French, and German, whose alphabets are similar to English. Keyboards	on
  which	two alphabets appear (English and native-language) support languages,
  such as Greek, Hebrew, and Russian, whose alphabets are very different from
  English.  The	number of supported alphabets determines the input method
  used to enter	characters engraved on the right side of keycaps.

  For keyboards	that support ISO Latin character sets and only one alphabet:

    +  Enter the characters engraved on	the left half of keycaps in the	ordi-
       nary way. That is, press	the key	itself to enter	the character
       engraved	on the bottom left of its keycap and press Shift in combina-
       tion with the key to enter the character	engraved on the	top left of
       the keycap. Purely alphabetic keys usually have only the	uppercase
       letters (entered	in combination with the	Shift key) engraved on the
       keycap. In this case, pressing the key by itself	enters the lowercase
       letter.

    +  Enter the characters engraved on	the right half of keycaps in one of
       the following ways:

	 -- Load a keyboard mapping table (keymap) that	is different from the
	    default

	    In this case, the keyboard selection application for your windows
	    environment	displays both a	typewriter (TW)	option and a data-
	    processing (DP) option for the combination of keyboard and
	    language you are using. The	typewriter keymap is loaded by
	    default and	you must replace this with the data-processing keymap
	    to enter the additional characters.

	 -- Use	the key	that performs the group-shift keyboard function	if
	    this function is supported for your	language and keyboard. See
	    the	section	titled ``Group-Shift Input Method'' for	more informa-
	    tion.

  For keyboards	that support ISO Latin character sets and two alphabets:

    +  Enter the characters engraved on	the upper left corner of the keycaps
       in the usual way, by pressing the key by	itself to enter	the lowercase
       letter (or bottom left character) and pressing Shift with that key to
       enter the uppercase letter (or top left character).

    +  Enter the character engraved on the lower right corner of the keycaps
       by using	a mode-switch key or key sequence. See the section titled
       "Mode-Switch Input Method" for more information.

  Group-Shift Input Method


  The group-shift keyboard function allows you to enter	the Group 2 charac-
  ters (engraved on the	right half of keycaps) without changing	the keyboard
  mapping table.

  Support for the group-shift function depends in part on whether the keymap
  loaded for your keyboard is in xkb or	xmodmap	format.	When you set your
  keyboard option using	the Keyboard application in the	Common Desktop
  Environment, xkb format is used.

  If you load a	keymap in xkb format, the operating system supports the
  group-shift function for most	ISO Latin keyboards, both VT and PC styles.
  The exceptions are keyboards for languages, such as American English and
  Portuguese, that do not need more than two characters	assigned to the	same
  keycap.

  If you load a	keymap in xmodmap format, support for the group-shift func-
  tion is available for:

    +  All PC style keyboards having keycaps with more than two	characters

    +  VT style	keyboards, except the LK201

  Assuming that	the loaded keymap supports the group-shift function, you
  enter	characters on the right	side of	keycaps	in the following way:

    +  Enter the bottom	right character	by holding down	the key	defined	to be
       the group-shift key along with the character key.

       This entry method also applies to characters engraved in	the middle
       right position of the keycap.  Characters are engraved in this posi-
       tion when a key supports	three, rather than four, characters.

    +  Enter the top right character by	holding	down the Shift key along with
       the group-shift and character keys.

  The key defined to perform the group-shift function varies according to
  keyboard style, as follows:

    +  For VT style keyboards, the group-shift function	is assigned to the
       compose-character key (usually engraved with Compose) on	the left side
       of the main keypad. On some VT style keyboards, the keycap engraving
       for this	key might be Group Shift rather	than Compose.

    +  For PC style keyboards, the group-shift function	is assigned to the
       alternate-function key on the right side	of the main keypad. For	most
       languages, this key is engraved with Alt	Gr rather than Alt.








				     Note

       The effect of the group-shift key is only temporary. This means that
       you need	to press the group-shift key each time you enter a Group 2
       character (engraved on the right	side of	the keycap).

  Mode-Switch Input Method


  Keyboards for	languages, such	as Greek, Hebrew, and Russian, support input
  of characters	in two different alphabets (English and	native-language)
  without reloading a keymap. On the alphabetic	keys of	these keyboards,
  characters of	the native-language alphabet are engraved on the bottom	right
  of the keycaps and characters	in the English alphabet	are engraved on	the
  top left of the keycaps.

  On these keyboards, you use a	mode-switch key	or key sequence	to toggle
  input	mode between English and the native language. Use the following	keys
  to perform the mode-switch function:

    +  For VT style keyboards, hold down the control key while pressing	the
       left Compose key	(Ctrl+Left Compose)

    +  For PC style keyboards, press the right control key (Right Ctrl).

  Dead-Key Input Method	for Characters Missing From Keyboard


  Some languages supported by ISO Latin	character sets have alphabets that
  contain so many characters that they cannot all be engraved on the keycaps
  of the main keypad. The missing characters are most often glyphs composed
  of a base Latin letter and a top or bottom accent (diacritical) mark.	The
  keyboards for	these languages	support	the dead-key input method to enter
  the additional characters. The term "dead" means that	certain	characters,
  usually the diacritical marks, are defined to	be nonspacing characters.

  The dead-key input method consists of	typing a two-stroke sequence (press-
  ing and releasing the	key for	the nonspacing diacritical mark	and then
  pressing and releasing the the key for the base character) to	send the
  corresponding	"accented" character. Typing a space as	the base character
  sends	the code for the spacing diacritical mark (the diacritical mark	by
  itself).

  Keys defined as nonspacing diacritical characters do not send	the character
  code immediately (do not echo), but instead modify the code of the charac-
  ter entered next. The	modified character code	is sent	only if	the diacriti-
  cal and following character can be combined to form a	valid character	in
  the character	set supported by the keyboard. If the key combination does
  not result in	a valid	character, no character	is sent. In addition, an
  audible warning sounds if the	``bell'' is enabled for	your keyboard.

  The following	table specifies	diacritical characters defined as nonspacing
  for use with the dead-key input method on VT style keyboards.

			  +--------------------------------------------
			  |	Nonspacing Diacritical Characters
			  +--------------------------------------------
			  |		C     D	 D
			  |		i  D  o	 b
			  |	     C	c  i  t	 l
			  |	     e	u  a	       M  O
			  | A  B  C  d	m  r  A	 A  G  a  g  R	T  T
			  | c  r  a  i	f  e  b	 c  r  c  o  r	i  o
       -------------------+ u  e  r  l	l  s  o	 u  a  r  n  i	l  n
	VT Style	  | t  v  o  l	e  i  v	 t  v  o  e  n	d  o
	Keyboard for:	  | e  e  n  a	x  s  e	 e  e  n  k  g	e  s
       -------------------+--------------------------------------------
       Belgian French			*  *	     *		*
       Czech		    *	  *	   *
       Flemish				*  *	     *		*
       French				*  *	     *		*
       French Canadian			*	     *		*
       German		    *	     *	*  *	     *	     *	*
       Greek		    *		   *			   *
       Hungarian			*	     *		*
       Lithuanian				     *		*
       Polish					     *		*
       Portuguese	    *		*	     *		*
       Slovak		    *	  *	   *	     *
       Spanish		    *		*  *	     *		*
       Swiss French			*  *	     *		*
       Swiss German			*  *	     *		*
       ----------------------------------------------------------------

  The following	table specifies	the diacritical	marks defined as nonspacing
  for use with the dead-key input method on PC style keyboards.

			  +------------------------------------------
			  |		C     D	 D
			  |		i  D  o	 b
			  |	     C	c  i  t	 l
			  |	     e	u  a	       M  O
			  | A  B  C  d	m  r  A	 A  G  a  g  R	T  T
			  | c  r  a  i	f  e  b	 c  r  c  o  r	i  o
       -------------------+ u  e  r  l	l  s  o	 u  a  r  n  i	l  n
	PC Style	  | t  v  o  l	e  i  v	 t  v  o  e  n	d  o
	Keyboard for:	  | e  e  n  a	x  s  e	 e  e  n  k  g	e  s
       -------------------+-------------------------------------------
       Belgian French	    *		*  *	    *		*
       Czech		    *  *  *  *	   *  *	 *
       Danish		    *		*  *	    *		*
       Dutch		    *	     *	*  *	    *		*
       Finnish		    *		*  *	    *		*
       French				*  *
       French Canadian	    *	     *	*  *	    *
       German		    *		*	    *
       Greek		    *		   *			   *
       Hungarian	    *  *  *  *	*  *  *	 *  *	  *  *	*
       Lithuanian				    *		*
       Norwegian	    *		*  *	    *		*
       Polish		    *  *  *  *	   *  *	 *	  *  *
       Portuguese	    *		*  *	    *		*
       Serb/Croat/Slovene   *		*  *
       Slovak		    *	  *	   *	    *
       Spanish		    *		*  *	    *
       Swedish		    *		*  *	    *		*
       Swiss French	    *		*  *	    *		*
       Swiss German	    *		*  *	    *		*
       Turkish F				    *
       Turkish Q				    *
       ---------------------------------------------------------------

				     Note

       The number of nonspacing	diacritical characters defined for the key-
       board may vary from those shown in the tables, depending	on the type
       and generation of the keyboard.

       Keyboards for languages not shown in the	tables do not define diacrit-
       ical marks as nonspacing	and therefore do not support the dead-key
       input method.








  Compose-Character Input Method for Characters	Missing	From Keyboard


  In addition to or in place of	the dead-key input method, your	keyboard may
  support the compose-character, or multikey, input method. Like the dead-key
  input	method,	the compose-character input method allows you to enter char-
  acters that are not present on your keyboard.	You can	enter the full range
  of characters	supported by the keyboard character set, which encompasses
  more characters than those in	a particular native language.

  The compose-key input	method consists	of the following two steps:

   1.  Press and release the key defined as the	multikey for your keyboard.
       The keycap for this key is often	engraved with Compose.

   2.  Enter the two-character pair that composes the resulting	character.
       You can type these characters in	any sequence (with a few exceptions).
       Do not hold down	the keys simultaneously.

  Use the following keys for this input	method:

    +  On VT style keyboards, other than LK201,	press and release the Compose
       key on the right	side of	the main keypad	(Right Compose)

       You can use the Compose key on either side of the keyboard for Ameri-
       can English and Portuguese. For these languages,	the Left Compose key
       has not been redefined to perform another function.

    +  On the LK201 keyboard, which has	a Compose key only on the left side,
       hold down Compose along with the	space bar (Compose+Space).

       Note, however, that the compose-character function for this key
       sequence	is disabled if you set Alt+Space to be the key sequence	that
       opens a menu on an active window. (See the following list item for
       information about defining a key	sequence to open a menu	on an active
       window.)

    +  On PC style keyboards, hold down	the alternate-function key on the
       left side of the	main keypad while pressing the space bar (Left
       Alt+Space)

       For PC style keyboards, the Left	Alt+Space key sequence conflicts with
       the key sequence	used to	open a menu on an active window. If you	are
       using a PC style	keyboard in the	CDE environment	and do not need	to
       use the compose-character input method, you can redefine	this key
       sequence	to open	menus in the following way:



	1.  Edit the file /usr/i18n/dt/config/locale/sys.dtwmrc	and remove
	    the	comment	character (#) from the beginning of the	following
	    line:


		 # Alt<Key>space	 icon|window	 f.post_wmenu

	2.  Restart the	Workspace Manager


  If, after entering compose-character mode, you type a	character pair that
  is invalid, no character code	is sent. In addition, an audible warning
  sounds if the	``bell'' is enabled for	your keyboard.

  The compose-character	input method requires three to four keystrokes to
  enter	a character whereas the	dead-key input method requires two to three
  keystrokes. If your keyboard supports	both input methods for entry of	a
  particular character,	the dead-key input method is more efficient.

  Compose-character sequences and their	resulting characters vary according
  to the coded character set (codeset) that supports your keyboard and
  language.  See the appropriate codeset reference page	(iso8859-1(5), for
  example) for the compose-character sequences you can use.

FILES

  /usr/lib/X11/xkb
      Directory	containing data	and keymaps in xkb format

  /usr/lib/X11/keymaps
      Directory	containing keymaps in xmodmap format