MAPSCRN(8)

โœจ mapscrn(8) โ€” the System Manager's Manual page, but make it a group chat โœจ

okay bestie, gather round, because we're talking about mapscrn โ€” a little command from the kbd world, living in section 8 of the manual (that's the system manager's manual, for the girlies keeping notes ๐Ÿ’…).


๐Ÿ’– NAME ๐Ÿ’–

mapscrn โ€” load screen output mapping table. that's it. that's the whole job. loading a mapping table for your screen output. iconic behavior honestly ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

mapscrn [options] mapfile

you give it some options, you give it a mapfile, it does the thing. simple as. โœจ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so first things first, and I need you to sit down for this one: mapscrn is obsolete. ๐Ÿ˜ญ fr fr. its whole function got built-in into setfont. BUT โ€” and this is the important part โ€” for backwards compatibility it's still hanging around as its own separate command. so it's giving retired-but-still-shows-up-to-the-party energy. we love her for that ๐Ÿ’œ

so what does she actually do? the mapscrn command loads a user defined output character mapping table into the console driver. ๐Ÿซถ

and then โ€” plot twist โ€” the console driver can later be put into use user-defined mapping table mode by outputting a special escape sequence to the console device. that sequence is:

  • <esc>(K for the G0 character set
  • <esc>)K for the G1 character set

and when you pass the -o option, the old map gets saved in map.orig. keeping receipts, as she should. ๐Ÿ’…


๐Ÿงš USE ๐Ÿงš

so there are two kinds of mapping tables and you need to know which one you're dealing with:

  1. direct-to-font tables โ€” these give a font position for each user byte value.
  2. user-to-unicode tables โ€” these give a unicode value for each user byte.

and the corresponding glyph is now found using the unicode index of the font. iykyk ๐ŸŒˆ

now, examples because that's how we learn:

mapscrn trivial

this one sets up a one-to-one direct-to-font table where user bytes directly address the font. super useful for fonts that are in the same order as the character set one uses. lowkey perfect for that scenario โœจ

and a command like:

mapscrn 8859-2

sets up a user-to-unicode table that assumes the user uses ISO 8859-2. periodt. ๐Ÿ’–


๐Ÿ’€ INPUT FORMAT ๐Ÿ’€

mapscrn can read the map in either of two formats:

  1. 256 or 512 bytes binary data
  2. two-column text file

Format (1) is a direct image of the translation table. and here's the breakdown:

  • the 256-bytes tables are direct-to-font
  • the 512-bytes tables are user-to-unicode

Format (2) is used to fill the table as follows: the cell with the offset mentioned in the first column is filled with the value mentioned in the second column. and then โ€” vibe check โ€” when values larger than 255 occur, or values are written using the U+xxxx notation, the table is assumed to be a user-to-unicode table. otherwise? it's a direct-to-font table. no cap ๐Ÿงš

values in the file may be specified in one of several formats, and bestie there are six:

  1. Decimal: string of decimal digits not starting with '0'
  2. Octal: string of octal digits beginning with '0'
  3. Hexadecimal: string of hexadecimal digits preceded by "0x"
  4. Unicode: string of four hexadecimal digits preceded by "U+"
  5. Character: single character enclosed in single quotes. (and the binary value is used.) โ€” note that blank, comma, tab character and '#' cannot be specified with this format. ๐Ÿ™ˆ
  6. UTF-8 Character: single (possibly multi-byte) UTF-8 character, enclosed in single quotes.
โš ๏ธ okay important one: control characters (with codes < 32) cannot be re-mapped with mapscrn because they have special meaning for the driver. that's not a suggestion, that's just how it is. ๐Ÿ’€

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -o, --output=FILE โ€” save the old map to the FILE. keeping the old one safe, we love a backup moment ๐Ÿ’พ
  • -C, --console=DEV โ€” the console device to be used.
  • -v, --verbose โ€” be more verbose. she's a talker, let her talk ๐Ÿ—ฃ๏ธ
  • -V, --version โ€” print version number.
  • -h, --help โ€” print this usage message.

๐ŸŽ€ FILES ๐ŸŽ€

  • /usr/share/kbd/consoletrans โ€” the default directory for screen mappings. that's home base bestie ๐Ÿ 

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • setfont(8) โ€” the main character who absorbed mapscrn's whole job. go say hi ๐Ÿ’œ

โญ AUTHOR โญ

Copyright (C) 1993 Eugene G. Crosser <crosser@pccross.msk.su>

This software and documentation may be distributed freely. ๐Ÿซถ (generous queen behavior, honestly)


and that's the whole page bestie!! โœจ this was the kbd manual page, dated 24 October 2024, and you can find it filed under MAPSCRN(8). go forth and map those screens, you've got this ๐Ÿ’…๐Ÿ’–๐Ÿฆ‹๐ŸŒธ๐ŸŽ€

๐Ÿ“ฆ where this page comes from