remapping kbd under SCO Xenix

Mark DiVecchio markd at silogic.UUCP
Fri Aug 3 01:07:49 AEST 1990


In article <3689 at umbc3.UMBC.EDU> palenste at umbc3.umbc.edu (Mr. William Palenste) writes:
>
>I would like some information about a command called "mapkey."  It is 
>supposed to be an ADM command but doesn't appear in that section of my
>manual.

Keyboard remapping:

I've used this quite a lot because I don't like SCO's way of flipping
multi-screens. 

The last line in /etc/rc is probably '/usr/bin/mapkey' thats what does
the mapping each time you boot.  Affects the console only of course. 

The end of my /etc/rc:

# Remap the keyboard
/usr/bin/mapkey


Here is my keys file :

#                                                        alt
# scan                      cntrl          alt    alt   cntrl  lock
# code  base  shift  cntrl  shift   alt   shift  cntrl  shift  state
     0  nop    nop    nop    nop    nop    nop    nop    nop     O
     1  esc    esc    nop    nop    esc    esc    nop    nop     O
     2  '1'    '!'    nop    nop    scr1   '!'    nop    nop     O
     3  '2'    '@'    nul    nul    scr2   '@'    nul    nul     O
     4  '3'    '#'    nop    nop    scr3   '#'    nop    nop     O
     5  '4'    '$'    nop    nop    scr4   '$'    nop    nop     O
     6  '5'    '%'    nop    nop    scr5   '%'    nop    nop     O
     7  '6'    '^'    rs     rs     scr6   '^'    rs     rs      O
     8  '7'    '&'    nop    nop    scr7   '&'    nop    nop     O
     9  '8'    '*'    nop    nop    scr8   '*'    nop    nop     O
    10  '9'    '('    nop    nop    scr9   '('    nop    nop     O
    11  '0'    ')'    nop    nop    scr10  ')'    nop    nop     O
    12  '-'    '_'    ns     ns     '-'    '_'    ns     ns      O
    13  '='    '+'    nop    nop    '='    '+'    nop    nop     O
    14  bs     bs     del    del    bs     bs     del    del     O
    15  ht     btab   nop    nop    ht     btab   nop    nop     O
    16  'q'    'Q'    dc1    dc1    'q'    'Q'    dc1    dc1     C
    17  'w'    'W'    etb    etb    'w'    'W'    etb    etb     C
    18  'e'    'E'    enq    enq    'e'    'E'    enq    enq     C
    19  'r'    'R'    dc2    dc2    'r'    'R'    dc2    dc2     C
    20  't'    'T'    dc4    dc4    't'    'T'    dc4    dc4     C
    21  'y'    'Y'    em     em     'y'    'Y'    em     em      C
    22  'u'    'U'    nak    nak    'u'    'U'    nak    nak     C
    23  'i'    'I'    ht     ht     'i'    'I'    ht     ht      C
    24  'o'    'O'    si     si     'o'    'O'    si     si      C
    25  'p'    'P'    dle    dle    'p'    'P'    dle    dle     C
    26  '['    '{'    esc    esc    '['    '{'    esc    esc     O
    27  ']'    '}'    gs     gs     ']'    '}'    gs     gs      O
    28  cr     cr     nl     nl     cr     cr     nl     nl      O
    29  ctrl   ctrl   ctrl   ctrl   ctrl   ctrl   ctrl   ctrl    O
    30  'a'    'A'    soh    soh    'a'    'A'    soh    soh     C
    31  's'    'S'    dc3    dc3    's'    'S'    dc3    dc3     C
    32  'd'    'D'    eot    eot    'd'    'D'    eot    eot     C
    33  'f'    'F'    ack    ack    'f'    'F'    ack    ack     C
    34  'g'    'G'    bel    bel    'g'    'G'    bel    bel     C
    35  'h'    'H'    bs     bs     'h'    'H'    bs     bs      C
    36  'j'    'J'    nl     nl     'j'    'J'    nl     nl      C
    37  'k'    'K'    vt     vt     'k'    'K'    vt     vt      C
    38  'l'    'L'    np     np     'l'    'L'    np     np      C
    39  ';'    ':'    nop    nop    ';'    ':'    nop    nop     O
    40  '\''   '"'    nop    nop    '\''   '"'    nop    nop     O
    41  '`'    '~'    nop    nop    '`'    '~'    nop    nop     O
    42  lshift lshift lshift lshift lshift lshift lshift lshift  O
    43  '\\'   '|'    fs     fs     '\\'   '|'    fs     fs      O
    44  'z'    'Z'    sub    sub    'z'    'Z'    sub    sub     C
    45  'x'    'X'    can    can    'x'    'X'    can    can     C
    46  'c'    'C'    etx    etx    'c'    'C'    etx    etx     C
    47  'v'    'V'    syn    syn    'v'    'V'    syn    syn     C
    48  'b'    'B'    stx    stx    'b'    'B'    stx    stx     C
    49  'n'    'N'    so     so     'n'    'N'    so     so      C
    50  'm'    'M'    cr     cr     'm'    'M'    cr     cr      C
    51  ','    '<'    nop    nop    ','    '<'    nop    nop     O
    52  '.'    '>'    nop    nop    '.'    '>'    nop    nop     O
    53  '/'    '?'    nop    nop    '/'    '?'    nop    nop     O
    54  rshift rshift rshift rshift rshift rshift rshift rshift  O
    55  nscr   nscr   nscr   nscr   '*'    '*'    nscr   nscr    O
    56  alt    alt    alt    alt    alt    alt    alt    alt     O
    57  ' '    ' '    ' '    ' '    ' '    ' '    ' '    ' '     O
    58  clock  clock  clock  clock  clock  clock  clock  clock   O
    59  fkey1  fkey13 fkey25 scr1   fkey37 scr11  scr1   scr11   O
    60  fkey2  fkey14 fkey26 scr2   fkey38 scr12  scr2   scr12   O
    61  fkey3  fkey15 fkey27 scr3   fkey39 scr13  scr3   scr13   O
    62  fkey4  fkey16 fkey28 scr4   fkey40 scr14  scr4   scr14   O
    63  fkey5  fkey17 fkey29 scr5   fkey41 scr15  scr5   scr15   O
    64  fkey6  fkey18 fkey30 scr6   fkey42 scr16  scr6   scr16   O
    65  fkey7  fkey19 fkey31 scr7   fkey43 scr7   scr7   scr7    O
    66  fkey8  fkey20 fkey32 scr8   fkey44 scr8   scr8   scr8    O
    67  fkey9  fkey21 fkey33 scr9   fkey45 scr9   scr9   scr9    O
    68  fkey10 fkey22 fkey34 scr10  fkey46 scr10  scr10  scr10   O
    69  nlock  nlock  dc3    dc3    nlock  nlock  dc3    dc3     O
    70  slock  slock  del    del    slock  slock  del    del     O
    71  fkey49 '7'    fkey47 '7'    '7'    '7'    '7'    '7'     N
    72  fkey50 '8'    '8'    '8'    '8'    '8'    '8'    '8'     N
    73  fkey51 '9'    fkey35 '9'    '9'    '9'    '9'    '9'     N
    74  fkey52 '-'    '-'    '-'    '-'    '-'    '-'    '-'     N
    75  fkey53 '4'    fkey24 '4'    '4'    '4'    '4'    '4'     N
    76  fkey54 '5'    '5'    '5'    '5'    '5'    '5'    '5'     N
    77  fkey55 '6'    fkey23 '6'    '6'    '6'    '6'    '6'     N
    78  fkey56 '+'    '+'    '+'    '+'    '+'    '+'    '+'     N
    79  fkey57 '1'    fkey48 '1'    '1'    '1'    '1'    '1'     N
    80  fkey58 '2'    '2'    '2'    '2'    '2'    '2'    '2'     N
    81  fkey59 '3'    fkey36 '3'    '3'    '3'    '3'    '3'     N
    82  fkey60 '0'    '0'    '0'    '0'    '0'    '0'    '0'     N
    83  fkey11 '.'    del    del    del    del    del    del     N
    84  del    0xad   nop    nop    nop    nop    nop    nop     O
    85  nop    nop    nop    nop    nop    nop    nop    nop     O
    86  nop    nop    nop    nop    nop    nop    nop    nop     O
    87  del    del    del    del    scr11  scr11  scr11  scr11   O
    88  fkey12 del    del    del    scr12  scr12  scr12  scr12   O

I put in codes for all function keys combinations, moved the del
function (interrupt) to the SysReq key, moved the 'next multisceen' key
to the PrtSc key and maped my right hand keypad to look like the DOS
keypad, functionally. 

The fkeyXX refer to the file /usr/lib/keyboard/strigs where the escape
codes to be sent when that key is pressed are stored.

I set this all up on my machine so the keyboard would look like
a DOS keyboard when I run emacs. So emacs runs the same whether I
am running DOS or Xenix. My strings file :

String key values
"\033[M"		Function #1
"\033[N"		Function #2
"\033[O"		Function #3
"\033[P"		Function #4
"\033[Q"		Function #5
"\033[R"		Function #6
"\033[S"		Function #7
"\033[T"		Function #8
"\033[U"		Function #9
"\033[V"		Function #10
"\033[W"		Function #11
"\033[X"		Function #12
"\033[Y"		Shift Function #1
"\033[Z"		Shift Function #2
"\033[a"		Shift Function #3
"\033[b"		Shift Function #4
"\033[c"		Shift Function #5
"\033[d"		Shift Function #6
"\033[e"		Shift Function #7
"\033[f"		Shift Function #8
"\033[g"		Shift Function #9
"\033[h"		Shift Function #10
"\033[i"		Shift Function #11
"\033[j"		Shift Function #12
"\033[k"		Control Function #1
"\033[l"		Control Function #2
"\033[m"		Control Function #3
"\033[n"		Control Function #4
"\033[o"		Control Function #5
"\033[p"		Control Function #6
"\033[q"		Control Function #7
"\033[r"		Control Function #8
"\033[s"		Control Function #9
"\033[t"		Control Function #10
"\033[u"		Control Function #11
"\033[v"		Control Function #12
"\033[w"		Ctrl/Shft Function #1
"\033[x"		Ctrl/Shft Function #2
"\033[y"		Ctrl/Shft Function #3
"\033[z"		Ctrl/Shft Function #4
"\033[@"		Ctrl/Shft Function #5
"\033[["		Ctrl/Shft Function #6
"\033[\\"		Ctrl/Shft Function #7
"\033[]"		Ctrl/Shft Function #8
"\033[^"		Ctrl/Shft Function #9
"\033[_"		Ctrl/Shft Function #10
"\033[`"		Ctrl/Shft Function #11
"\033[{"		Ctrl/Shft Function #12
"\033[H"		Home
"\033[A"		Up arrow
"\033[I"		Page up
"-"			-
"\033[D"		Left arrow
"\033[E"		5
"\033[C"		Right arrow
"+"			+
"\033[F"		End
"\033[B"		Down arrow
"\033[G"		Page down
"\033[L"		Insert


I've found it very useful.



-- 
Mark DiVecchio, Silogic Systems, 619-549-9841                       K3FWT
-----   9888 Carroll Center Road, Suite 113, San Diego, CA 92126    -----
markd at silogic                                  BBS 619-549-3927
...!ucsd!celerity!celit!silogic!markd     celerity!silogic!markd at ucsd.edu



More information about the Comp.unix.xenix mailing list