Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mapkey(M) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

keyboard(HW)

scancode(HW)

screen(HW)

setkey(C)

tset(C)


 mapkey(M)                       19 June 1992                       mapkey(M)


 Name

    mapkey, mapscrn, mapstr, convkey - configure monitor screen mapping

 Syntax

    mapkey [ -adox ] [ datafile ]

    mapscrn [ -d ] [ datafile ]

    mapstr [ -d ] [ datafile ] [ -f ] [ termtype ]

    convkey [ in [ out ] ]

 Description

    mapscrn configures the output mapping of the monitor screen on which it
    is invoked. mapkey and mapstr configure the mapping of the keyboard and
    string keys (for example, function keys) of the monitor and terminals
    running with the scancode facility enabled.  The super user can map or
    unmap any terminal device, while other users can map only the terminal
    devices that they own.

    mapstr functions on a per-screen basis.  If the mapstr -f command does
    not specify a terminal type, mapstr gets the terminal type from the TERM
    environment variable.  The tset utility calls mapstr -f to set function
    keys.  mapstr reads the function key values from the file in
    /usr/lib/keyboard/string.d that corresponds to the terminal type and
    passes them to tset.  Mapping strings on one screen does not affect any
    other screen.

    The mapstr utility expects 12 function keys.  If your terminal uses more
    or less than 12 function keys, your function keys might have unexpected
    effects when you run your terminal in scancode mode.  For example, func-
    tion keys above F12 might behave like shifted function keys below F12
    (that is, ShiftF1, ShiftF2, and so on).

    If a file name is given on the argument line the respective mapping table
    is configured from the contents of the input file.  If no file is given,
    the default files in /usr/lib/keyboard and /usr/lib/console are used.
    The -d option causes the mapping table to be read from the kernel instead
    of written and an ASCII version to be displayed on the standard output.
    The format of the output is suitable for input files to mapscrn, mapkey,
    or mapstr.  Non-super users can run mapkey and mapstr when the -d option
    is given.

    With the -o or -x options, mapkey displays the mapping table in octal or
    hexadecimal.

    The -a option sets mapping according to the file /etc/default/mapkey.
    Each line in this file names a tty line and a file in the
    /usr/lib/keyboard directory; for example:

       tty01     keys.fr

    If mapkey -a is run with the above entry in /etc/default/mapkey, the ter-
    minal device /dev/tty01 is mapped using the file
    /usr/lib/keyboard/keys.fr.  A common use for the mapkey -a command is to
    include it in a directory under /etc/rc.d, so that it is executed as part
    of system startup.

    convkey translates an old-style mapkey file into the current format.  If
    in or out are missing, they default to stdin or stdout.

 Files

    /usr/lib/keyboard/*
    /usr/lib/console/*

 Notes

    There is no way to specify that the map utilities read their configura-
    tion tables from standard input.

    If mapkey -a is run but the correct tty line cannot be found in
    /etc/default/mapkey, mapkey reads the default file
    /usr/lib/keyboard/keys.  Likewise, if no key file is specified against
    the appropriate tty entry in /etc/default/mapkey mapkey -a uses
    /usr/lib/keyboard/keys.

 See also

    keyboard(HW), scancode(HW), screen(HW), setkey(C), tset(C)

 Value added

    convkey, mapkey, mapscrn and mapstr are extensions of AT&T System V pro-
    vided by The Santa Cruz Operation, Inc.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026