1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright (c) 1987-1997,1999 by Sun Microsystems, Inc. 24*0Sstevel@tonic-gate * All rights reserved. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 28*0Sstevel@tonic-gate /* SunOS-4.0 1.19 */ 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate /* 31*0Sstevel@tonic-gate * This module contains the translation tables for the up-down encoded 32*0Sstevel@tonic-gate * Sun keyboards. 33*0Sstevel@tonic-gate */ 34*0Sstevel@tonic-gate 35*0Sstevel@tonic-gate #include <sys/param.h> 36*0Sstevel@tonic-gate #include <sys/kbd.h> 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate /* handy way to define control characters in the tables */ 39*0Sstevel@tonic-gate #define c(c_char) (c_char&0x1F) 40*0Sstevel@tonic-gate #define ESC 0x1B 41*0Sstevel@tonic-gate #define DEL 0x7F 42*0Sstevel@tonic-gate 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate /* Unshifted keyboard table for Type 3 keyboard */ 45*0Sstevel@tonic-gate 46*0Sstevel@tonic-gate static struct keymap keytab_s3_lc = { 47*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 48*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 49*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), HOLE, 50*0Sstevel@tonic-gate /* 8 */ TF(3), HOLE, TF(4), HOLE, TF(5), HOLE, TF(6), HOLE, 51*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 52*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 53*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '1', '2', 54*0Sstevel@tonic-gate /* 32 */ '3', '4', '5', '6', '7', '8', '9', '0', 55*0Sstevel@tonic-gate /* 40 */ '-', '=', '`', '\b', HOLE, RF(4), RF(5), RF(6), 56*0Sstevel@tonic-gate /* 48 */ HOLE, LF(5), HOLE, LF(6), HOLE, '\t', 'q', 'w', 57*0Sstevel@tonic-gate /* 56 */ 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 58*0Sstevel@tonic-gate /* 64 */ '[', ']', DEL, HOLE, RF(7), STRING+UPARROW, 59*0Sstevel@tonic-gate RF(9), HOLE, 60*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 61*0Sstevel@tonic-gate 'a', 's', 'd', 62*0Sstevel@tonic-gate /* 80 */ 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', 63*0Sstevel@tonic-gate /* 88 */ '\\', '\r', HOLE, STRING+LEFTARROW, 64*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 65*0Sstevel@tonic-gate HOLE, LF(9), 66*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), HOLE, SHIFTKEYS+LEFTSHIFT, 67*0Sstevel@tonic-gate 'z', 'x', 'c', 'v', 68*0Sstevel@tonic-gate /*104 */ 'b', 'n', 'm', ',', '.', '/', SHIFTKEYS+RIGHTSHIFT, 69*0Sstevel@tonic-gate '\n', 70*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 71*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, HOLE, SHIFTKEYS+CAPSLOCK, 72*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 73*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 74*0Sstevel@tonic-gate HOLE, HOLE, HOLE, ERROR, IDLE, 75*0Sstevel@tonic-gate /* END CSTYLED */ 76*0Sstevel@tonic-gate }; 77*0Sstevel@tonic-gate 78*0Sstevel@tonic-gate /* Shifted keyboard table for Type 3 keyboard */ 79*0Sstevel@tonic-gate 80*0Sstevel@tonic-gate static struct keymap keytab_s3_uc = { 81*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 82*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 83*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), HOLE, 84*0Sstevel@tonic-gate /* 8 */ TF(3), HOLE, TF(4), HOLE, TF(5), HOLE, TF(6), HOLE, 85*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 86*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 87*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '!', '@', 88*0Sstevel@tonic-gate /* 32 */ '#', '$', '%', '^', '&', '*', '(', ')', 89*0Sstevel@tonic-gate /* 40 */ '_', '+', '~', '\b', HOLE, RF(4), RF(5), RF(6), 90*0Sstevel@tonic-gate /* 48 */ HOLE, LF(5), HOLE, LF(6), HOLE, '\t', 'Q', 'W', 91*0Sstevel@tonic-gate /* 56 */ 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 92*0Sstevel@tonic-gate /* 64 */ '{', '}', DEL, HOLE, RF(7), STRING+UPARROW, 93*0Sstevel@tonic-gate RF(9), HOLE, 94*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 95*0Sstevel@tonic-gate 'A', 'S', 'D', 96*0Sstevel@tonic-gate /* 80 */ 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', 97*0Sstevel@tonic-gate /* 88 */ '|', '\r', HOLE, STRING+LEFTARROW, 98*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 99*0Sstevel@tonic-gate HOLE, LF(9), 100*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), HOLE, SHIFTKEYS+LEFTSHIFT, 101*0Sstevel@tonic-gate 'Z', 'X', 'C', 'V', 102*0Sstevel@tonic-gate /*104 */ 'B', 'N', 'M', '<', '>', '?', SHIFTKEYS+RIGHTSHIFT, 103*0Sstevel@tonic-gate '\n', 104*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 105*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, HOLE, SHIFTKEYS+CAPSLOCK, 106*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 107*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 108*0Sstevel@tonic-gate HOLE, HOLE, HOLE, ERROR, IDLE, 109*0Sstevel@tonic-gate /* END CSTYLED */ 110*0Sstevel@tonic-gate }; 111*0Sstevel@tonic-gate 112*0Sstevel@tonic-gate /* Caps Locked keyboard table for Type 3 keyboard */ 113*0Sstevel@tonic-gate 114*0Sstevel@tonic-gate static struct keymap keytab_s3_cl = { 115*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 116*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 117*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), HOLE, 118*0Sstevel@tonic-gate /* 8 */ TF(3), HOLE, TF(4), HOLE, TF(5), HOLE, TF(6), HOLE, 119*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 120*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 121*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '1', '2', 122*0Sstevel@tonic-gate /* 32 */ '3', '4', '5', '6', '7', '8', '9', '0', 123*0Sstevel@tonic-gate /* 40 */ '-', '=', '`', '\b', HOLE, RF(4), RF(5), RF(6), 124*0Sstevel@tonic-gate /* 48 */ HOLE, LF(5), HOLE, LF(6), HOLE, '\t', 'Q', 'W', 125*0Sstevel@tonic-gate /* 56 */ 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 126*0Sstevel@tonic-gate /* 64 */ '[', ']', DEL, HOLE, RF(7), STRING+UPARROW, 127*0Sstevel@tonic-gate RF(9), HOLE, 128*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 129*0Sstevel@tonic-gate 'A', 'S', 'D', 130*0Sstevel@tonic-gate /* 80 */ 'F', 'G', 'H', 'J', 'K', 'L', ';', '\'', 131*0Sstevel@tonic-gate /* 88 */ '\\', '\r', HOLE, STRING+LEFTARROW, 132*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 133*0Sstevel@tonic-gate HOLE, LF(9), 134*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), HOLE, SHIFTKEYS+LEFTSHIFT, 135*0Sstevel@tonic-gate 'Z', 'X', 'C', 'V', 136*0Sstevel@tonic-gate /*104 */ 'B', 'N', 'M', ',', '.', '/', SHIFTKEYS+RIGHTSHIFT, 137*0Sstevel@tonic-gate '\n', 138*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 139*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, HOLE, SHIFTKEYS+CAPSLOCK, 140*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 141*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 142*0Sstevel@tonic-gate HOLE, HOLE, HOLE, ERROR, IDLE, 143*0Sstevel@tonic-gate /* END CSTYLED */ 144*0Sstevel@tonic-gate }; 145*0Sstevel@tonic-gate 146*0Sstevel@tonic-gate /* Controlled keyboard table for Type 3 keyboard */ 147*0Sstevel@tonic-gate 148*0Sstevel@tonic-gate static struct keymap keytab_s3_ct = { 149*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 150*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 151*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), HOLE, 152*0Sstevel@tonic-gate /* 8 */ TF(3), HOLE, TF(4), HOLE, TF(5), HOLE, TF(6), HOLE, 153*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 154*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 155*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '1', c('@'), 156*0Sstevel@tonic-gate /* 32 */ '3', '4', '5', c('^'), '7', '8', '9', '0', 157*0Sstevel@tonic-gate /* 40 */ c('_'), '=', c('^'), '\b', HOLE, RF(4), RF(5), RF(6), 158*0Sstevel@tonic-gate /* 48 */ HOLE, LF(5), HOLE, LF(6), HOLE, '\t', c('q'), c('w'), 159*0Sstevel@tonic-gate /* 56 */ c('e'), c('r'), c('t'), c('y'), c('u'), c('i'), c('o'), c('p'), 160*0Sstevel@tonic-gate /* 64 */ c('['), c(']'), DEL, HOLE, RF(7), STRING+UPARROW, 161*0Sstevel@tonic-gate RF(9), HOLE, 162*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 163*0Sstevel@tonic-gate c('a'), c('s'), c('d'), 164*0Sstevel@tonic-gate /* 80 */ c('f'), c('g'), c('h'), c('j'), c('k'), c('l'), ';', '\'', 165*0Sstevel@tonic-gate /* 88 */ c('\\'), 166*0Sstevel@tonic-gate '\r', HOLE, STRING+LEFTARROW, 167*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 168*0Sstevel@tonic-gate HOLE, LF(9), 169*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), HOLE, SHIFTKEYS+LEFTSHIFT, 170*0Sstevel@tonic-gate c('z'), c('x'), c('c'), c('v'), 171*0Sstevel@tonic-gate /*104 */ c('b'), c('n'), c('m'), ',', '.', c('_'), SHIFTKEYS+RIGHTSHIFT, 172*0Sstevel@tonic-gate '\n', 173*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 174*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, HOLE, SHIFTKEYS+CAPSLOCK, 175*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 176*0Sstevel@tonic-gate c(' '), BUCKYBITS+METABIT, 177*0Sstevel@tonic-gate HOLE, HOLE, HOLE, ERROR, IDLE, 178*0Sstevel@tonic-gate /* END CSTYLED */ 179*0Sstevel@tonic-gate }; 180*0Sstevel@tonic-gate 181*0Sstevel@tonic-gate /* "Key Up" keyboard table for Type 3 keyboard */ 182*0Sstevel@tonic-gate 183*0Sstevel@tonic-gate static struct keymap keytab_s3_up = { 184*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 185*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 186*0Sstevel@tonic-gate HOLE, NOP, HOLE, NOP, NOP, HOLE, 187*0Sstevel@tonic-gate /* 8 */ NOP, HOLE, NOP, HOLE, NOP, HOLE, NOP, HOLE, 188*0Sstevel@tonic-gate /* 16 */ NOP, NOP, NOP, SHIFTKEYS+ALT, 189*0Sstevel@tonic-gate HOLE, NOP, NOP, NOP, 190*0Sstevel@tonic-gate /* 24 */ HOLE, NOP, NOP, HOLE, HOLE, NOP, NOP, NOP, 191*0Sstevel@tonic-gate /* 32 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 192*0Sstevel@tonic-gate /* 40 */ NOP, NOP, NOP, NOP, HOLE, NOP, NOP, NOP, 193*0Sstevel@tonic-gate /* 48 */ HOLE, NOP, HOLE, NOP, HOLE, NOP, NOP, NOP, 194*0Sstevel@tonic-gate /* 56 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 195*0Sstevel@tonic-gate /* 64 */ NOP, NOP, NOP, HOLE, NOP, NOP, NOP, HOLE, 196*0Sstevel@tonic-gate /* 72 */ NOP, NOP, HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 197*0Sstevel@tonic-gate NOP, NOP, NOP, 198*0Sstevel@tonic-gate /* 80 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 199*0Sstevel@tonic-gate /* 88 */ NOP, NOP, HOLE, NOP, NOP, NOP, HOLE, NOP, 200*0Sstevel@tonic-gate /* 96 */ HOLE, NOP, HOLE, SHIFTKEYS+LEFTSHIFT, 201*0Sstevel@tonic-gate NOP, NOP, NOP, NOP, 202*0Sstevel@tonic-gate /*104 */ NOP, NOP, NOP, NOP, NOP, NOP, SHIFTKEYS+RIGHTSHIFT, 203*0Sstevel@tonic-gate NOP, 204*0Sstevel@tonic-gate /*112 */ NOP, NOP, NOP, HOLE, HOLE, HOLE, HOLE, NOP, 205*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 206*0Sstevel@tonic-gate NOP, BUCKYBITS+METABIT, 207*0Sstevel@tonic-gate HOLE, HOLE, HOLE, HOLE, RESET, 208*0Sstevel@tonic-gate /* END CSTYLED */ 209*0Sstevel@tonic-gate }; 210*0Sstevel@tonic-gate 211*0Sstevel@tonic-gate /* Index to keymaps for Type 3 keyboard */ 212*0Sstevel@tonic-gate static struct keyboard keyindex_s3 = { 213*0Sstevel@tonic-gate &keytab_s3_lc, 214*0Sstevel@tonic-gate &keytab_s3_uc, 215*0Sstevel@tonic-gate &keytab_s3_cl, 216*0Sstevel@tonic-gate 0, /* no Alt Graph key, no Alt Graph table */ 217*0Sstevel@tonic-gate 0, /* no Num Lock key, no Num Lock table */ 218*0Sstevel@tonic-gate &keytab_s3_ct, 219*0Sstevel@tonic-gate &keytab_s3_up, 220*0Sstevel@tonic-gate 0x0000, /* Shift bits which stay on with idle keyboard */ 221*0Sstevel@tonic-gate 0x0000, /* Bucky bits which stay on with idle keyboard */ 222*0Sstevel@tonic-gate 1, 0, 77, /* abort keys */ 223*0Sstevel@tonic-gate CAPSMASK, /* Shift bits which toggle on down event */ 224*0Sstevel@tonic-gate NULL, 225*0Sstevel@tonic-gate }; 226*0Sstevel@tonic-gate 227*0Sstevel@tonic-gate 228*0Sstevel@tonic-gate /* Unshifted keyboard table for Type 4 keyboard */ 229*0Sstevel@tonic-gate 230*0Sstevel@tonic-gate static struct keymap keytab_s4_lc = { 231*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 232*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 233*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), TF(10), 234*0Sstevel@tonic-gate /* 8 */ TF(3), TF(11), TF(4), TF(12), TF(5), SHIFTKEYS+ALTGRAPH, 235*0Sstevel@tonic-gate TF(6), HOLE, 236*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 237*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 238*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '1', '2', 239*0Sstevel@tonic-gate /* 32 */ '3', '4', '5', '6', '7', '8', '9', '0', 240*0Sstevel@tonic-gate /* 40 */ '-', '=', '`', '\b', HOLE, RF(4), RF(5), RF(6), 241*0Sstevel@tonic-gate /* 48 */ BF(13), LF(5), BF(10), LF(6), HOLE, '\t', 'q', 'w', 242*0Sstevel@tonic-gate /* 56 */ 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 243*0Sstevel@tonic-gate /* 64 */ '[', ']', DEL, COMPOSE, 244*0Sstevel@tonic-gate RF(7), STRING+UPARROW, 245*0Sstevel@tonic-gate RF(9), BF(15), 246*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 247*0Sstevel@tonic-gate 'a', 's', 'd', 248*0Sstevel@tonic-gate /* 80 */ 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', 249*0Sstevel@tonic-gate /* 88 */ '\\', '\r', BF(11), STRING+LEFTARROW, 250*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 251*0Sstevel@tonic-gate BF(8), LF(9), 252*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), SHIFTKEYS+NUMLOCK, 253*0Sstevel@tonic-gate SHIFTKEYS+LEFTSHIFT, 254*0Sstevel@tonic-gate 'z', 'x', 'c', 'v', 255*0Sstevel@tonic-gate /*104 */ 'b', 'n', 'm', ',', '.', '/', SHIFTKEYS+RIGHTSHIFT, 256*0Sstevel@tonic-gate '\n', 257*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 258*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, LF(16), SHIFTKEYS+CAPSLOCK, 259*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 260*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 261*0Sstevel@tonic-gate HOLE, HOLE, BF(14), ERROR, IDLE, 262*0Sstevel@tonic-gate /* END CSTYLED */ 263*0Sstevel@tonic-gate }; 264*0Sstevel@tonic-gate 265*0Sstevel@tonic-gate /* Shifted keyboard table for Type 4 keyboard */ 266*0Sstevel@tonic-gate 267*0Sstevel@tonic-gate static struct keymap keytab_s4_uc = { 268*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 269*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 270*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), TF(10), 271*0Sstevel@tonic-gate /* 8 */ TF(3), TF(11), TF(4), TF(12), TF(5), SHIFTKEYS+ALTGRAPH, 272*0Sstevel@tonic-gate TF(6), HOLE, 273*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 274*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 275*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '!', '@', 276*0Sstevel@tonic-gate /* 32 */ '#', '$', '%', '^', '&', '*', '(', ')', 277*0Sstevel@tonic-gate /* 40 */ '_', '+', '~', '\b', HOLE, RF(4), RF(5), RF(6), 278*0Sstevel@tonic-gate /* 48 */ BF(13), LF(5), BF(10), LF(6), HOLE, '\t', 'Q', 'W', 279*0Sstevel@tonic-gate /* 56 */ 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 280*0Sstevel@tonic-gate /* 64 */ '{', '}', DEL, COMPOSE, 281*0Sstevel@tonic-gate RF(7), STRING+UPARROW, 282*0Sstevel@tonic-gate RF(9), BF(15), 283*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 284*0Sstevel@tonic-gate 'A', 'S', 'D', 285*0Sstevel@tonic-gate /* 80 */ 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', 286*0Sstevel@tonic-gate /* 88 */ '|', '\r', BF(11), STRING+LEFTARROW, 287*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 288*0Sstevel@tonic-gate BF(8), LF(9), 289*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), SHIFTKEYS+NUMLOCK, 290*0Sstevel@tonic-gate SHIFTKEYS+LEFTSHIFT, 291*0Sstevel@tonic-gate 'Z', 'X', 'C', 'V', 292*0Sstevel@tonic-gate /*104 */ 'B', 'N', 'M', '<', '>', '?', SHIFTKEYS+RIGHTSHIFT, 293*0Sstevel@tonic-gate '\n', 294*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 295*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, LF(16), SHIFTKEYS+CAPSLOCK, 296*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 297*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 298*0Sstevel@tonic-gate HOLE, HOLE, BF(14), ERROR, IDLE, 299*0Sstevel@tonic-gate /* END CSTYLED */ 300*0Sstevel@tonic-gate }; 301*0Sstevel@tonic-gate 302*0Sstevel@tonic-gate /* Caps Locked keyboard table for Type 4 keyboard */ 303*0Sstevel@tonic-gate 304*0Sstevel@tonic-gate static struct keymap keytab_s4_cl = { 305*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 306*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 307*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), TF(10), 308*0Sstevel@tonic-gate /* 8 */ TF(3), TF(11), TF(4), TF(12), TF(5), SHIFTKEYS+ALTGRAPH, 309*0Sstevel@tonic-gate TF(6), HOLE, 310*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 311*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 312*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '1', '2', 313*0Sstevel@tonic-gate /* 32 */ '3', '4', '5', '6', '7', '8', '9', '0', 314*0Sstevel@tonic-gate /* 40 */ '-', '=', '`', '\b', HOLE, RF(4), RF(5), RF(6), 315*0Sstevel@tonic-gate /* 48 */ BF(13), LF(5), BF(10), LF(6), HOLE, '\t', 'Q', 'W', 316*0Sstevel@tonic-gate /* 56 */ 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 317*0Sstevel@tonic-gate /* 64 */ '[', ']', DEL, COMPOSE, 318*0Sstevel@tonic-gate RF(7), STRING+UPARROW, 319*0Sstevel@tonic-gate RF(9), BF(15), 320*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 321*0Sstevel@tonic-gate 'A', 'S', 'D', 322*0Sstevel@tonic-gate /* 80 */ 'F', 'G', 'H', 'J', 'K', 'L', ';', '\'', 323*0Sstevel@tonic-gate /* 88 */ '\\', '\r', BF(11), STRING+LEFTARROW, 324*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 325*0Sstevel@tonic-gate BF(8), LF(9), 326*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), SHIFTKEYS+NUMLOCK, 327*0Sstevel@tonic-gate SHIFTKEYS+LEFTSHIFT, 328*0Sstevel@tonic-gate 'Z', 'X', 'C', 'V', 329*0Sstevel@tonic-gate /*104 */ 'B', 'N', 'M', ',', '.', '/', SHIFTKEYS+RIGHTSHIFT, 330*0Sstevel@tonic-gate '\n', 331*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 332*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, LF(16), SHIFTKEYS+CAPSLOCK, 333*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 334*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 335*0Sstevel@tonic-gate HOLE, HOLE, BF(14), ERROR, IDLE, 336*0Sstevel@tonic-gate /* END CSTYLED */ 337*0Sstevel@tonic-gate }; 338*0Sstevel@tonic-gate 339*0Sstevel@tonic-gate /* Alt Graph keyboard table for Type 4 keyboard */ 340*0Sstevel@tonic-gate 341*0Sstevel@tonic-gate static struct keymap keytab_s4_ag = { 342*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 343*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 344*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), TF(10), 345*0Sstevel@tonic-gate /* 8 */ TF(3), TF(11), TF(4), TF(12), TF(5), SHIFTKEYS+ALTGRAPH, 346*0Sstevel@tonic-gate TF(6), HOLE, 347*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 348*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 349*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, NOP, NOP, 350*0Sstevel@tonic-gate /* 32 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 351*0Sstevel@tonic-gate /* 40 */ NOP, NOP, NOP, '\b', HOLE, RF(4), RF(5), RF(6), 352*0Sstevel@tonic-gate /* 48 */ BF(13), LF(5), BF(10), LF(6), HOLE, '\t', NOP, NOP, 353*0Sstevel@tonic-gate /* 56 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 354*0Sstevel@tonic-gate /* 64 */ NOP, NOP, DEL, COMPOSE, 355*0Sstevel@tonic-gate RF(7), STRING+UPARROW, 356*0Sstevel@tonic-gate RF(9), BF(15), 357*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 358*0Sstevel@tonic-gate NOP, NOP, NOP, 359*0Sstevel@tonic-gate /* 80 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 360*0Sstevel@tonic-gate /* 88 */ NOP, '\r', BF(11), STRING+LEFTARROW, 361*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 362*0Sstevel@tonic-gate BF(8), LF(9), 363*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), SHIFTKEYS+NUMLOCK, 364*0Sstevel@tonic-gate SHIFTKEYS+LEFTSHIFT, 365*0Sstevel@tonic-gate NOP, NOP, NOP, NOP, 366*0Sstevel@tonic-gate /*104 */ NOP, NOP, NOP, NOP, NOP, NOP, SHIFTKEYS+RIGHTSHIFT, 367*0Sstevel@tonic-gate '\n', 368*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 369*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, LF(16), SHIFTKEYS+CAPSLOCK, 370*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 371*0Sstevel@tonic-gate ' ', BUCKYBITS+METABIT, 372*0Sstevel@tonic-gate HOLE, HOLE, BF(14), ERROR, IDLE, 373*0Sstevel@tonic-gate /* END CSTYLED */ 374*0Sstevel@tonic-gate }; 375*0Sstevel@tonic-gate 376*0Sstevel@tonic-gate /* Num Locked keyboard table for Type 4 keyboard */ 377*0Sstevel@tonic-gate 378*0Sstevel@tonic-gate static struct keymap keytab_s4_nl = { 379*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 380*0Sstevel@tonic-gate /* 0 */ HOLE, NONL, HOLE, NONL, HOLE, NONL, NONL, NONL, 381*0Sstevel@tonic-gate /* 8 */ NONL, NONL, NONL, NONL, NONL, NONL, NONL, HOLE, 382*0Sstevel@tonic-gate /* 16 */ NONL, NONL, NONL, NONL, HOLE, NONL, NONL, NONL, 383*0Sstevel@tonic-gate /* 24 */ HOLE, NONL, NONL, HOLE, HOLE, NONL, NONL, NONL, 384*0Sstevel@tonic-gate /* 32 */ NONL, NONL, NONL, NONL, NONL, NONL, NONL, NONL, 385*0Sstevel@tonic-gate /* 40 */ NONL, NONL, NONL, NONL, HOLE, PADEQUAL, 386*0Sstevel@tonic-gate PADSLASH, 387*0Sstevel@tonic-gate PADSTAR, 388*0Sstevel@tonic-gate /* 48 */ NONL, NONL, PADDOT, NONL, HOLE, NONL, NONL, NONL, 389*0Sstevel@tonic-gate /* 56 */ NONL, NONL, NONL, NONL, NONL, NONL, NONL, NONL, 390*0Sstevel@tonic-gate /* 64 */ NONL, NONL, NONL, NONL, 391*0Sstevel@tonic-gate PAD7, PAD8, PAD9, PADMINUS, 392*0Sstevel@tonic-gate /* 72 */ NONL, NONL, HOLE, HOLE, NONL, NONL, NONL, NONL, 393*0Sstevel@tonic-gate /* 80 */ NONL, NONL, NONL, NONL, NONL, NONL, NONL, NONL, 394*0Sstevel@tonic-gate /* 88 */ NONL, NONL, PADENTER, 395*0Sstevel@tonic-gate PAD4, PAD5, PAD6, PAD0, NONL, 396*0Sstevel@tonic-gate /* 96 */ HOLE, NONL, NONL, NONL, NONL, NONL, NONL, NONL, 397*0Sstevel@tonic-gate /*104 */ NONL, NONL, NONL, NONL, NONL, NONL, NONL, 398*0Sstevel@tonic-gate NONL, 399*0Sstevel@tonic-gate /*112 */ PAD1, PAD2, PAD3, HOLE, HOLE, HOLE, NONL, NONL, 400*0Sstevel@tonic-gate /*120 */ NONL, NONL, NONL, HOLE, HOLE, PADPLUS, 401*0Sstevel@tonic-gate ERROR, IDLE, 402*0Sstevel@tonic-gate /* END CSTYLED */ 403*0Sstevel@tonic-gate }; 404*0Sstevel@tonic-gate 405*0Sstevel@tonic-gate /* Controlled keyboard table for Type 4 keyboard */ 406*0Sstevel@tonic-gate 407*0Sstevel@tonic-gate static struct keymap keytab_s4_ct = { 408*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 409*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 410*0Sstevel@tonic-gate HOLE, LF(2), HOLE, TF(1), TF(2), TF(10), 411*0Sstevel@tonic-gate /* 8 */ TF(3), TF(11), TF(4), TF(12), TF(5), SHIFTKEYS+ALTGRAPH, 412*0Sstevel@tonic-gate TF(6), HOLE, 413*0Sstevel@tonic-gate /* 16 */ TF(7), TF(8), TF(9), SHIFTKEYS+ALT, 414*0Sstevel@tonic-gate HOLE, RF(1), RF(2), RF(3), 415*0Sstevel@tonic-gate /* 24 */ HOLE, LF(3), LF(4), HOLE, HOLE, ESC, '1', c('@'), 416*0Sstevel@tonic-gate /* 32 */ '3', '4', '5', c('^'), '7', '8', '9', '0', 417*0Sstevel@tonic-gate /* 40 */ c('_'), '=', c('^'), '\b', HOLE, RF(4), RF(5), RF(6), 418*0Sstevel@tonic-gate /* 48 */ BF(13), LF(5), BF(10), LF(6), HOLE, '\t', c('q'), c('w'), 419*0Sstevel@tonic-gate /* 56 */ c('e'), c('r'), c('t'), c('y'), c('u'), c('i'), c('o'), c('p'), 420*0Sstevel@tonic-gate /* 64 */ c('['), c(']'), DEL, COMPOSE, 421*0Sstevel@tonic-gate RF(7), STRING+UPARROW, 422*0Sstevel@tonic-gate RF(9), BF(15), 423*0Sstevel@tonic-gate /* 72 */ LF(7), LF(8), HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 424*0Sstevel@tonic-gate c('a'), c('s'), c('d'), 425*0Sstevel@tonic-gate /* 80 */ c('f'), c('g'), c('h'), c('j'), c('k'), c('l'), ';', '\'', 426*0Sstevel@tonic-gate /* 88 */ c('\\'), 427*0Sstevel@tonic-gate '\r', BF(11), STRING+LEFTARROW, 428*0Sstevel@tonic-gate RF(11), STRING+RIGHTARROW, 429*0Sstevel@tonic-gate BF(8), LF(9), 430*0Sstevel@tonic-gate /* 96 */ HOLE, LF(10), SHIFTKEYS+NUMLOCK, 431*0Sstevel@tonic-gate SHIFTKEYS+LEFTSHIFT, 432*0Sstevel@tonic-gate c('z'), c('x'), c('c'), c('v'), 433*0Sstevel@tonic-gate /*104 */ c('b'), c('n'), c('m'), ',', '.', c('_'), SHIFTKEYS+RIGHTSHIFT, 434*0Sstevel@tonic-gate '\n', 435*0Sstevel@tonic-gate /*112 */ RF(13), STRING+DOWNARROW, 436*0Sstevel@tonic-gate RF(15), HOLE, HOLE, HOLE, LF(16), SHIFTKEYS+CAPSLOCK, 437*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 438*0Sstevel@tonic-gate c(' '), BUCKYBITS+METABIT, 439*0Sstevel@tonic-gate HOLE, HOLE, BF(14), ERROR, IDLE, 440*0Sstevel@tonic-gate /* END CSTYLED */ 441*0Sstevel@tonic-gate }; 442*0Sstevel@tonic-gate 443*0Sstevel@tonic-gate /* "Key Up" keyboard table for Type 4 keyboard */ 444*0Sstevel@tonic-gate 445*0Sstevel@tonic-gate static struct keymap keytab_s4_up = { 446*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 447*0Sstevel@tonic-gate /* 0 */ HOLE, BUCKYBITS+SYSTEMBIT, 448*0Sstevel@tonic-gate HOLE, NOP, HOLE, NOP, NOP, NOP, 449*0Sstevel@tonic-gate /* 8 */ NOP, NOP, NOP, NOP, NOP, SHIFTKEYS+ALTGRAPH, 450*0Sstevel@tonic-gate NOP, HOLE, 451*0Sstevel@tonic-gate /* 16 */ NOP, NOP, NOP, SHIFTKEYS+ALT, 452*0Sstevel@tonic-gate HOLE, NOP, NOP, NOP, 453*0Sstevel@tonic-gate /* 24 */ HOLE, NOP, NOP, HOLE, HOLE, NOP, NOP, NOP, 454*0Sstevel@tonic-gate /* 32 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 455*0Sstevel@tonic-gate /* 40 */ NOP, NOP, NOP, NOP, HOLE, NOP, NOP, NOP, 456*0Sstevel@tonic-gate /* 48 */ NOP, NOP, NOP, NOP, HOLE, NOP, NOP, NOP, 457*0Sstevel@tonic-gate /* 56 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 458*0Sstevel@tonic-gate /* 64 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 459*0Sstevel@tonic-gate /* 72 */ NOP, NOP, HOLE, HOLE, SHIFTKEYS+LEFTCTRL, 460*0Sstevel@tonic-gate NOP, NOP, NOP, 461*0Sstevel@tonic-gate /* 80 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 462*0Sstevel@tonic-gate /* 88 */ NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, 463*0Sstevel@tonic-gate /* 96 */ HOLE, NOP, NOP, 464*0Sstevel@tonic-gate SHIFTKEYS+LEFTSHIFT, 465*0Sstevel@tonic-gate NOP, NOP, NOP, NOP, 466*0Sstevel@tonic-gate /*104 */ NOP, NOP, NOP, NOP, NOP, NOP, SHIFTKEYS+RIGHTSHIFT, 467*0Sstevel@tonic-gate NOP, 468*0Sstevel@tonic-gate /*112 */ NOP, NOP, NOP, HOLE, HOLE, HOLE, NOP, NOP, 469*0Sstevel@tonic-gate /*120 */ BUCKYBITS+METABIT, 470*0Sstevel@tonic-gate NOP, BUCKYBITS+METABIT, 471*0Sstevel@tonic-gate HOLE, HOLE, NOP, HOLE, RESET, 472*0Sstevel@tonic-gate /* END CSTYLED */ 473*0Sstevel@tonic-gate }; 474*0Sstevel@tonic-gate 475*0Sstevel@tonic-gate /* Index to keymaps for Type 4 keyboard */ 476*0Sstevel@tonic-gate static struct keyboard keyindex_s4 = { 477*0Sstevel@tonic-gate &keytab_s4_lc, 478*0Sstevel@tonic-gate &keytab_s4_uc, 479*0Sstevel@tonic-gate &keytab_s4_cl, 480*0Sstevel@tonic-gate &keytab_s4_ag, 481*0Sstevel@tonic-gate &keytab_s4_nl, 482*0Sstevel@tonic-gate &keytab_s4_ct, 483*0Sstevel@tonic-gate &keytab_s4_up, 484*0Sstevel@tonic-gate 0x0000, /* Shift bits which stay on with idle keyboard */ 485*0Sstevel@tonic-gate 0x0000, /* Bucky bits which stay on with idle keyboard */ 486*0Sstevel@tonic-gate 1, 0, 77, /* abort keys */ 487*0Sstevel@tonic-gate CAPSMASK|NUMLOCKMASK, /* Shift bits which toggle on down event */ 488*0Sstevel@tonic-gate NULL, 489*0Sstevel@tonic-gate }; 490*0Sstevel@tonic-gate 491*0Sstevel@tonic-gate 492*0Sstevel@tonic-gate /* 493*0Sstevel@tonic-gate * Index table for the whole shebang 494*0Sstevel@tonic-gate * The first entry is used as the default if the id isn't recognized. 495*0Sstevel@tonic-gate */ 496*0Sstevel@tonic-gate struct keyboards keytables[] = { 497*0Sstevel@tonic-gate KB_SUN3, &keyindex_s3, 498*0Sstevel@tonic-gate KB_SUN4, &keyindex_s4, 499*0Sstevel@tonic-gate 0, NULL, 500*0Sstevel@tonic-gate }; 501*0Sstevel@tonic-gate 502*0Sstevel@tonic-gate /* 503*0Sstevel@tonic-gate * Keyboard String Table 504*0Sstevel@tonic-gate * 505*0Sstevel@tonic-gate * This defines the strings sent by various keys (as selected in the 506*0Sstevel@tonic-gate * tables above). 507*0Sstevel@tonic-gate * The first byte of each string is its length, the rest is data. 508*0Sstevel@tonic-gate */ 509*0Sstevel@tonic-gate 510*0Sstevel@tonic-gate #ifdef __STDC__ 511*0Sstevel@tonic-gate /* 512*0Sstevel@tonic-gate * XXX This is here to silence compiler warnings. The non-ansi-c form 513*0Sstevel@tonic-gate * is retained if somebody can figure out how to replicate it in 514*0Sstevel@tonic-gate * ansi-c. 515*0Sstevel@tonic-gate */ 516*0Sstevel@tonic-gate char keystringtab[16][KTAB_STRLEN] = { 517*0Sstevel@tonic-gate { '\033', '[', 'H', '\0' }, /* home */ 518*0Sstevel@tonic-gate { '\033', '[', 'A', '\0' }, /* up */ 519*0Sstevel@tonic-gate { '\033', '[', 'B', '\0' }, /* down */ 520*0Sstevel@tonic-gate { '\033', '[', 'D', '\0' }, /* left */ 521*0Sstevel@tonic-gate { '\033', '[', 'C', '\0' }, /* right */ 522*0Sstevel@tonic-gate }; 523*0Sstevel@tonic-gate #else /* __STDC__ */ 524*0Sstevel@tonic-gate #define kstescinit(c) {'\033', '[', 'c', '\0'} 525*0Sstevel@tonic-gate char keystringtab[16][KTAB_STRLEN] = { 526*0Sstevel@tonic-gate kstescinit(H) /* home */, 527*0Sstevel@tonic-gate kstescinit(A) /* up */, 528*0Sstevel@tonic-gate kstescinit(B) /* down */, 529*0Sstevel@tonic-gate kstescinit(D) /* left */, 530*0Sstevel@tonic-gate kstescinit(C) /* right */, 531*0Sstevel@tonic-gate }; 532*0Sstevel@tonic-gate #endif /* __STDC__ */ 533*0Sstevel@tonic-gate 534*0Sstevel@tonic-gate 535*0Sstevel@tonic-gate /* 536*0Sstevel@tonic-gate * Compose Key Sequence Table 537*0Sstevel@tonic-gate * 538*0Sstevel@tonic-gate * Taken from Suncompose.h of openwindows. 539*0Sstevel@tonic-gate * 540*0Sstevel@tonic-gate * The idea here is to create a simple index into a table of 541*0Sstevel@tonic-gate * compose key sequences. The purpose is to provide a fast 542*0Sstevel@tonic-gate * lookup mechanism using as little space as possible (while 543*0Sstevel@tonic-gate * still using a table of triplets). 544*0Sstevel@tonic-gate * 545*0Sstevel@tonic-gate * For reference, here is the set of all composable characters: 546*0Sstevel@tonic-gate * SP !\"\'*+,-./01234:<>?ACDEHILNOPRSTUXY\\^_`acdehilnoprstuxy|~ 547*0Sstevel@tonic-gate * 548*0Sstevel@tonic-gate * if ascii_char[i] is not composable, 549*0Sstevel@tonic-gate * kb_compose_map[i] is -1 550*0Sstevel@tonic-gate * else 551*0Sstevel@tonic-gate * if ascii_char[i] appears as a first char in compose_table, 552*0Sstevel@tonic-gate * kb_compose_map[i] is the index of it's first appearance 553*0Sstevel@tonic-gate * else 554*0Sstevel@tonic-gate * kb_compose_map[i] is 112 (end of table) 555*0Sstevel@tonic-gate */ 556*0Sstevel@tonic-gate 557*0Sstevel@tonic-gate signed char kb_compose_map[ASCII_SET_SIZE] = { 558*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 559*0Sstevel@tonic-gate -1, /* 000 (^@) */ 560*0Sstevel@tonic-gate -1, /* 001 (^A) */ 561*0Sstevel@tonic-gate -1, /* 002 (^B) */ 562*0Sstevel@tonic-gate -1, /* 003 (^C) */ 563*0Sstevel@tonic-gate -1, /* 004 (^D) */ 564*0Sstevel@tonic-gate -1, /* 005 (^E) */ 565*0Sstevel@tonic-gate -1, /* 006 (^F) */ 566*0Sstevel@tonic-gate -1, /* 007 (^G) */ 567*0Sstevel@tonic-gate -1, /* 008 (^H) */ 568*0Sstevel@tonic-gate -1, /* 009 (^I) */ 569*0Sstevel@tonic-gate -1, /* 010 (^J) */ 570*0Sstevel@tonic-gate -1, /* 011 (^K) */ 571*0Sstevel@tonic-gate -1, /* 012 (^L) */ 572*0Sstevel@tonic-gate -1, /* 013 (^M) */ 573*0Sstevel@tonic-gate -1, /* 014 (^N) */ 574*0Sstevel@tonic-gate -1, /* 015 (^O) */ 575*0Sstevel@tonic-gate -1, /* 016 (^P) */ 576*0Sstevel@tonic-gate -1, /* 017 (^Q) */ 577*0Sstevel@tonic-gate -1, /* 018 (^R) */ 578*0Sstevel@tonic-gate -1, /* 019 (^S) */ 579*0Sstevel@tonic-gate -1, /* 020 (^T) */ 580*0Sstevel@tonic-gate -1, /* 021 (^U) */ 581*0Sstevel@tonic-gate -1, /* 022 (^V) */ 582*0Sstevel@tonic-gate -1, /* 023 (^W) */ 583*0Sstevel@tonic-gate -1, /* 024 (^X) */ 584*0Sstevel@tonic-gate -1, /* 025 (^Y) */ 585*0Sstevel@tonic-gate -1, /* 026 (^Z) */ 586*0Sstevel@tonic-gate -1, /* 027 (^[) */ 587*0Sstevel@tonic-gate -1, /* 028 (^\) */ 588*0Sstevel@tonic-gate -1, /* 029 (^]) */ 589*0Sstevel@tonic-gate -1, /* 030 (^^) */ 590*0Sstevel@tonic-gate -1, /* 031 (^_) */ 591*0Sstevel@tonic-gate 0, /* 032 (SP) */ 592*0Sstevel@tonic-gate 1, /* 033 (!) */ 593*0Sstevel@tonic-gate 4, /* 034 (") */ 594*0Sstevel@tonic-gate -1, /* 035 (#) */ 595*0Sstevel@tonic-gate -1, /* 036 ($) */ 596*0Sstevel@tonic-gate -1, /* 037 (%) */ 597*0Sstevel@tonic-gate -1, /* 038 (&) */ 598*0Sstevel@tonic-gate 16, /* 039 (') */ 599*0Sstevel@tonic-gate -1, /* 040 (() */ 600*0Sstevel@tonic-gate -1, /* 041 ()) */ 601*0Sstevel@tonic-gate 28, /* 042 (*) */ 602*0Sstevel@tonic-gate 31, /* 043 (+) */ 603*0Sstevel@tonic-gate 32, /* 044 (,) */ 604*0Sstevel@tonic-gate 36, /* 045 (-) */ 605*0Sstevel@tonic-gate 48, /* 046 (.) */ 606*0Sstevel@tonic-gate 49, /* 047 (/) */ 607*0Sstevel@tonic-gate 54, /* 048 (0) */ 608*0Sstevel@tonic-gate 57, /* 049 (1) */ 609*0Sstevel@tonic-gate 60, /* 050 (2) */ 610*0Sstevel@tonic-gate 61, /* 051 (3) */ 611*0Sstevel@tonic-gate 112, /* 052 (4) */ 612*0Sstevel@tonic-gate -1, /* 053 (5) */ 613*0Sstevel@tonic-gate -1, /* 054 (6) */ 614*0Sstevel@tonic-gate -1, /* 055 (7) */ 615*0Sstevel@tonic-gate -1, /* 056 (8) */ 616*0Sstevel@tonic-gate -1, /* 057 (9) */ 617*0Sstevel@tonic-gate 112, /* 058 (:) */ 618*0Sstevel@tonic-gate -1, /* 059 (;) */ 619*0Sstevel@tonic-gate 63, /* 060 (<) */ 620*0Sstevel@tonic-gate -1, /* 061 (=) */ 621*0Sstevel@tonic-gate 64, /* 062 (>) */ 622*0Sstevel@tonic-gate 65, /* 063 (?) */ 623*0Sstevel@tonic-gate -1, /* 064 (@) */ 624*0Sstevel@tonic-gate 66, /* 065 (A) */ 625*0Sstevel@tonic-gate -1, /* 066 (B) */ 626*0Sstevel@tonic-gate 70, /* 067 (C) */ 627*0Sstevel@tonic-gate 112, /* 068 (D) */ 628*0Sstevel@tonic-gate 71, /* 069 (E) */ 629*0Sstevel@tonic-gate -1, /* 070 (F) */ 630*0Sstevel@tonic-gate -1, /* 071 (G) */ 631*0Sstevel@tonic-gate 73, /* 072 (H) */ 632*0Sstevel@tonic-gate 74, /* 073 (I) */ 633*0Sstevel@tonic-gate -1, /* 074 (J) */ 634*0Sstevel@tonic-gate -1, /* 075 (K) */ 635*0Sstevel@tonic-gate 112, /* 076 (L) */ 636*0Sstevel@tonic-gate -1, /* 077 (M) */ 637*0Sstevel@tonic-gate 76, /* 078 (N) */ 638*0Sstevel@tonic-gate 77, /* 079 (O) */ 639*0Sstevel@tonic-gate 84, /* 080 (P) */ 640*0Sstevel@tonic-gate -1, /* 081 (Q) */ 641*0Sstevel@tonic-gate 112, /* 082 (R) */ 642*0Sstevel@tonic-gate 112, /* 083 (S) */ 643*0Sstevel@tonic-gate 112, /* 084 (T) */ 644*0Sstevel@tonic-gate 85, /* 085 (U) */ 645*0Sstevel@tonic-gate -1, /* 086 (V) */ 646*0Sstevel@tonic-gate -1, /* 087 (W) */ 647*0Sstevel@tonic-gate 112, /* 088 (X) */ 648*0Sstevel@tonic-gate 112, /* 089 (Y) */ 649*0Sstevel@tonic-gate -1, /* 090 (Z) */ 650*0Sstevel@tonic-gate -1, /* 091 ([) */ 651*0Sstevel@tonic-gate 87, /* 092 (\) */ 652*0Sstevel@tonic-gate -1, /* 093 (]) */ 653*0Sstevel@tonic-gate 88, /* 094 (^) */ 654*0Sstevel@tonic-gate 93, /* 095 (_) */ 655*0Sstevel@tonic-gate 94, /* 096 (`) */ 656*0Sstevel@tonic-gate 99, /* 097 (a) */ 657*0Sstevel@tonic-gate -1, /* 098 (b) */ 658*0Sstevel@tonic-gate 101, /* 099 (c) */ 659*0Sstevel@tonic-gate 112, /* 100 (d) */ 660*0Sstevel@tonic-gate 112, /* 101 (e) */ 661*0Sstevel@tonic-gate -1, /* 102 (f) */ 662*0Sstevel@tonic-gate -1, /* 103 (g) */ 663*0Sstevel@tonic-gate 102, /* 104 (h) */ 664*0Sstevel@tonic-gate 112, /* 105 (i) */ 665*0Sstevel@tonic-gate -1, /* 106 (j) */ 666*0Sstevel@tonic-gate -1, /* 107 (k) */ 667*0Sstevel@tonic-gate 112, /* 108 (l) */ 668*0Sstevel@tonic-gate -1, /* 109 (m) */ 669*0Sstevel@tonic-gate 103, /* 110 (n) */ 670*0Sstevel@tonic-gate 104, /* 111 (o) */ 671*0Sstevel@tonic-gate 108, /* 112 (p) */ 672*0Sstevel@tonic-gate -1, /* 113 (q) */ 673*0Sstevel@tonic-gate 112, /* 114 (r) */ 674*0Sstevel@tonic-gate 109, /* 115 (s) */ 675*0Sstevel@tonic-gate 112, /* 116 (t) */ 676*0Sstevel@tonic-gate 112, /* 117 (u) */ 677*0Sstevel@tonic-gate -1, /* 118 (v) */ 678*0Sstevel@tonic-gate -1, /* 119 (w) */ 679*0Sstevel@tonic-gate 110, /* 120 (x) */ 680*0Sstevel@tonic-gate 112, /* 121 (y) */ 681*0Sstevel@tonic-gate -1, /* 122 (z) */ 682*0Sstevel@tonic-gate -1, /* 123 ({) */ 683*0Sstevel@tonic-gate 111, /* 124 (|) */ 684*0Sstevel@tonic-gate -1, /* 125 (}) */ 685*0Sstevel@tonic-gate 112, /* 126 (~) */ 686*0Sstevel@tonic-gate -1, /* 127 (DEL) */ 687*0Sstevel@tonic-gate /* END CSTYLED */ 688*0Sstevel@tonic-gate }; 689*0Sstevel@tonic-gate 690*0Sstevel@tonic-gate /* 691*0Sstevel@tonic-gate * IMPORTANT NOTE: This table MUST be kept in proper sorted order: 692*0Sstevel@tonic-gate * The first and second characters in each entry must be in ASCII 693*0Sstevel@tonic-gate * collating sequence (left to right). 694*0Sstevel@tonic-gate * The table must be in ASCII collating sequence by first character 695*0Sstevel@tonic-gate * (top to bottom). 696*0Sstevel@tonic-gate */ 697*0Sstevel@tonic-gate 698*0Sstevel@tonic-gate /* COMPOSE + first character + second character => ISO character */ 699*0Sstevel@tonic-gate 700*0Sstevel@tonic-gate struct compose_sequence_t kb_compose_table[] = { 701*0Sstevel@tonic-gate 702*0Sstevel@tonic-gate /* BEGIN CSTYLED */ 703*0Sstevel@tonic-gate {' ', ' ', 0xA0}, /* 000 */ /* NBSP (non-breaking space) */ 704*0Sstevel@tonic-gate {'!', '!', 0xA1}, /* 001 */ /* inverted ! */ 705*0Sstevel@tonic-gate {'!', 'P', 0xB6}, /* 002 */ /* paragraph mark */ 706*0Sstevel@tonic-gate {'!', 'p', 0xB6}, /* 003 */ /* paragraph mark */ 707*0Sstevel@tonic-gate {'"', '"', 0xA8}, /* 004 */ /* diaresis */ 708*0Sstevel@tonic-gate {'"', 'A', 0xC4}, /* 005 */ /* A with diaresis */ 709*0Sstevel@tonic-gate {'"', 'E', 0xCB}, /* 006 */ /* E with diaresis */ 710*0Sstevel@tonic-gate {'"', 'I', 0xCF}, /* 007 */ /* I with diaresis */ 711*0Sstevel@tonic-gate {'"', 'O', 0xD6}, /* 008 */ /* O with diaresis */ 712*0Sstevel@tonic-gate {'"', 'U', 0xDC}, /* 009 */ /* U with diaresis */ 713*0Sstevel@tonic-gate {'"', 'a', 0xE4}, /* 010 */ /* a with diaresis */ 714*0Sstevel@tonic-gate {'"', 'e', 0xEB}, /* 011 */ /* e with diaresis */ 715*0Sstevel@tonic-gate {'"', 'i', 0xEF}, /* 012 */ /* i with diaresis */ 716*0Sstevel@tonic-gate {'"', 'o', 0xF6}, /* 013 */ /* o with diaresis */ 717*0Sstevel@tonic-gate {'"', 'u', 0xFC}, /* 014 */ /* u with diaresis */ 718*0Sstevel@tonic-gate {'"', 'y', 0xFF}, /* 015 */ /* y with diaresis */ 719*0Sstevel@tonic-gate {'\'','A', 0xC1}, /* 016 */ /* A with acute accent */ 720*0Sstevel@tonic-gate {'\'','E', 0xC9}, /* 017 */ /* E with acute accent */ 721*0Sstevel@tonic-gate {'\'','I', 0xCD}, /* 018 */ /* I with acute accent */ 722*0Sstevel@tonic-gate {'\'','O', 0xD3}, /* 019 */ /* O with acute accent */ 723*0Sstevel@tonic-gate {'\'','U', 0xDA}, /* 020 */ /* U with acute accent */ 724*0Sstevel@tonic-gate {'\'','Y', 0xDD}, /* 021 */ /* Y with acute accent */ 725*0Sstevel@tonic-gate {'\'','a', 0xE1}, /* 022 */ /* a with acute accent */ 726*0Sstevel@tonic-gate {'\'','e', 0xE9}, /* 023 */ /* e with acute accent */ 727*0Sstevel@tonic-gate {'\'','i', 0xED}, /* 024 */ /* i with acute accent */ 728*0Sstevel@tonic-gate {'\'','o', 0xF3}, /* 025 */ /* o with acute accent */ 729*0Sstevel@tonic-gate {'\'','u', 0xFA}, /* 026 */ /* u with acute accent */ 730*0Sstevel@tonic-gate {'\'','y', 0xFD}, /* 027 */ /* y with acute accent */ 731*0Sstevel@tonic-gate {'*', 'A', 0xC5}, /* 028 */ /* A with ring */ 732*0Sstevel@tonic-gate {'*', '^', 0xB0}, /* 029 */ /* degree */ 733*0Sstevel@tonic-gate {'*', 'a', 0xE5}, /* 030 */ /* a with ring */ 734*0Sstevel@tonic-gate {'+', '-', 0xB1}, /* 031 */ /* plus/minus */ 735*0Sstevel@tonic-gate {',', ',', 0xB8}, /* 032 */ /* cedilla */ 736*0Sstevel@tonic-gate {',', '-', 0xAC}, /* 033 */ /* not sign */ 737*0Sstevel@tonic-gate {',', 'C', 0xC7}, /* 034 */ /* C with cedilla */ 738*0Sstevel@tonic-gate {',', 'c', 0xE7}, /* 035 */ /* c with cedilla */ 739*0Sstevel@tonic-gate {'-', '-', 0xAD}, /* 036 */ /* soft hyphen */ 740*0Sstevel@tonic-gate {'-', ':', 0xF7}, /* 037 */ /* division sign */ 741*0Sstevel@tonic-gate {'-', 'A', 0xAA}, /* 038 */ /* feminine superior numeral */ 742*0Sstevel@tonic-gate {'-', 'D', 0xD0}, /* 039 */ /* Upper-case eth */ 743*0Sstevel@tonic-gate {'-', 'L', 0xA3}, /* 040 */ /* pounds sterling */ 744*0Sstevel@tonic-gate {'-', 'Y', 0xA5}, /* 041 */ /* yen */ 745*0Sstevel@tonic-gate {'-', '^', 0xAF}, /* 042 */ /* macron */ 746*0Sstevel@tonic-gate {'-', 'a', 0xAA}, /* 043 */ /* feminine superior numeral */ 747*0Sstevel@tonic-gate {'-', 'd', 0xF0}, /* 044 */ /* Lower-case eth */ 748*0Sstevel@tonic-gate {'-', 'l', 0xA3}, /* 045 */ /* pounds sterling */ 749*0Sstevel@tonic-gate {'-', 'y', 0xA5}, /* 046 */ /* yen */ 750*0Sstevel@tonic-gate {'-', '|', 0xAC}, /* 047 */ /* not sign */ 751*0Sstevel@tonic-gate {'.', '^', 0xB7}, /* 048 */ /* centered dot */ 752*0Sstevel@tonic-gate {'/', 'C', 0xA2}, /* 049 */ /* cent sign */ 753*0Sstevel@tonic-gate {'/', 'O', 0xD8}, /* 050 */ /* O with slash */ 754*0Sstevel@tonic-gate {'/', 'c', 0xA2}, /* 051 */ /* cent sign */ 755*0Sstevel@tonic-gate {'/', 'o', 0xF8}, /* 052 */ /* o with slash */ 756*0Sstevel@tonic-gate {'/', 'u', 0xB5}, /* 053 */ /* mu */ 757*0Sstevel@tonic-gate {'0', 'X', 0xA4}, /* 054 */ /* currency symbol */ 758*0Sstevel@tonic-gate {'0', '^', 0xB0}, /* 055 */ /* degree */ 759*0Sstevel@tonic-gate {'0', 'x', 0xA4}, /* 056 */ /* currency symbol */ 760*0Sstevel@tonic-gate {'1', '2', 0xBD}, /* 057 */ /* 1/2 */ 761*0Sstevel@tonic-gate {'1', '4', 0xBC}, /* 058 */ /* 1/4 */ 762*0Sstevel@tonic-gate {'1', '^', 0xB9}, /* 059 */ /* superior '1' */ 763*0Sstevel@tonic-gate {'2', '^', 0xB2}, /* 060 */ /* superior '2' */ 764*0Sstevel@tonic-gate {'3', '4', 0xBE}, /* 061 */ /* 3/4 */ 765*0Sstevel@tonic-gate {'3', '^', 0xB3}, /* 062 */ /* superior '3' */ 766*0Sstevel@tonic-gate {'<', '<', 0xAB}, /* 063 */ /* left guillemot */ 767*0Sstevel@tonic-gate {'>', '>', 0xBB}, /* 064 */ /* right guillemot */ 768*0Sstevel@tonic-gate {'?', '?', 0xBF}, /* 065 */ /* inverted ? */ 769*0Sstevel@tonic-gate {'A', 'E', 0xC6}, /* 066 */ /* AE dipthong */ 770*0Sstevel@tonic-gate {'A', '^', 0xC2}, /* 067 */ /* A with circumflex accent */ 771*0Sstevel@tonic-gate {'A', '`', 0xC0}, /* 068 */ /* A with grave accent */ 772*0Sstevel@tonic-gate {'A', '~', 0xC3}, /* 069 */ /* A with tilde */ 773*0Sstevel@tonic-gate {'C', 'O', 0xA9}, /* 060 */ /* copyright */ 774*0Sstevel@tonic-gate {'E', '^', 0xCA}, /* 071 */ /* E with circumflex accent */ 775*0Sstevel@tonic-gate {'E', '`', 0xC8}, /* 072 */ /* E with grave accent */ 776*0Sstevel@tonic-gate {'H', 'T', 0xDE}, /* 073 */ /* Upper-case thorn */ 777*0Sstevel@tonic-gate {'I', '^', 0xCE}, /* 074 */ /* I with circumflex accent */ 778*0Sstevel@tonic-gate {'I', '`', 0xCC}, /* 075 */ /* I with grave accent */ 779*0Sstevel@tonic-gate {'N', '~', 0xD1}, /* 076 */ /* N with tilde */ 780*0Sstevel@tonic-gate {'O', 'R', 0xAE}, /* 077 */ /* registered */ 781*0Sstevel@tonic-gate {'O', 'S', 0xA7}, /* 078 */ /* section mark */ 782*0Sstevel@tonic-gate {'O', 'X', 0xA4}, /* 079 */ /* currency symbol */ 783*0Sstevel@tonic-gate {'O', '^', 0xD4}, /* 080 */ /* O with circumflex accent */ 784*0Sstevel@tonic-gate {'O', '_', 0xBA}, /* 081 */ /* masculine superior numeral */ 785*0Sstevel@tonic-gate {'O', '`', 0xD2}, /* 082 */ /* O with grave accent */ 786*0Sstevel@tonic-gate {'O', '~', 0xD5}, /* 083 */ /* O with tilde */ 787*0Sstevel@tonic-gate {'P', '|', 0xDE}, /* 084 */ /* Upper-case thorn */ 788*0Sstevel@tonic-gate {'U', '^', 0xDB}, /* 085 */ /* U with circumflex accent */ 789*0Sstevel@tonic-gate {'U', '`', 0xD9}, /* 086 */ /* U with grave accent */ 790*0Sstevel@tonic-gate {'\\','\\',0xB4}, /* 087 */ /* acute accent */ 791*0Sstevel@tonic-gate {'^', 'a', 0xE2}, /* 088 */ /* a with circumflex accent */ 792*0Sstevel@tonic-gate {'^', 'e', 0xEA}, /* 089 */ /* e with circumflex accent */ 793*0Sstevel@tonic-gate {'^', 'i', 0xEE}, /* 090 */ /* i with circumflex accent */ 794*0Sstevel@tonic-gate {'^', 'o', 0xF4}, /* 091 */ /* o with circumflex accent */ 795*0Sstevel@tonic-gate {'^', 'u', 0xFB}, /* 092 */ /* u with circumflex accent */ 796*0Sstevel@tonic-gate {'_', 'o', 0xBA}, /* 093 */ /* masculine superior numeral */ 797*0Sstevel@tonic-gate {'`', 'a', 0xE0}, /* 094 */ /* a with grave accent */ 798*0Sstevel@tonic-gate {'`', 'e', 0xE8}, /* 095 */ /* e with grave accent */ 799*0Sstevel@tonic-gate {'`', 'i', 0xEC}, /* 096 */ /* i with grave accent */ 800*0Sstevel@tonic-gate {'`', 'o', 0xF2}, /* 097 */ /* o with grave accent */ 801*0Sstevel@tonic-gate {'`', 'u', 0xF9}, /* 098 */ /* u with grave accent */ 802*0Sstevel@tonic-gate {'a', 'e', 0xE6}, /* 099 */ /* ae dipthong */ 803*0Sstevel@tonic-gate {'a', '~', 0xE3}, /* 100 */ /* a with tilde */ 804*0Sstevel@tonic-gate {'c', 'o', 0xA9}, /* 101 */ /* copyright */ 805*0Sstevel@tonic-gate {'h', 't', 0xFE}, /* 102 */ /* Lower-case thorn */ 806*0Sstevel@tonic-gate {'n', '~', 0xF1}, /* 103 */ /* n with tilde */ 807*0Sstevel@tonic-gate {'o', 'r', 0xAE}, /* 104 */ /* registered */ 808*0Sstevel@tonic-gate {'o', 's', 0xA7}, /* 105 */ /* section mark */ 809*0Sstevel@tonic-gate {'o', 'x', 0xA4}, /* 106 */ /* currency symbol */ 810*0Sstevel@tonic-gate {'o', '~', 0xF5}, /* 107 */ /* o with tilde */ 811*0Sstevel@tonic-gate {'p', '|', 0xFE}, /* 108 */ /* Lower-case thorn */ 812*0Sstevel@tonic-gate {'s', 's', 0xDF}, /* 109 */ /* German double-s */ 813*0Sstevel@tonic-gate {'x', 'x', 0xD7}, /* 110 */ /* multiplication sign */ 814*0Sstevel@tonic-gate {'|', '|', 0xA6}, /* 111 */ /* broken bar */ 815*0Sstevel@tonic-gate 816*0Sstevel@tonic-gate {0, 0, 0}, /* end of table */ 817*0Sstevel@tonic-gate }; 818*0Sstevel@tonic-gate /* END CSTYLED */ 819*0Sstevel@tonic-gate 820*0Sstevel@tonic-gate /* 821*0Sstevel@tonic-gate * Floating Accent Sequence Table 822*0Sstevel@tonic-gate */ 823*0Sstevel@tonic-gate 824*0Sstevel@tonic-gate /* FA + ASCII character => ISO character */ 825*0Sstevel@tonic-gate struct fltaccent_sequence_t kb_fltaccent_table[] = { 826*0Sstevel@tonic-gate 827*0Sstevel@tonic-gate {FA_UMLAUT, 'A', 0xC4}, /* A with umlaut */ 828*0Sstevel@tonic-gate {FA_UMLAUT, 'E', 0xCB}, /* E with umlaut */ 829*0Sstevel@tonic-gate {FA_UMLAUT, 'I', 0xCF}, /* I with umlaut */ 830*0Sstevel@tonic-gate {FA_UMLAUT, 'O', 0xD6}, /* O with umlaut */ 831*0Sstevel@tonic-gate {FA_UMLAUT, 'U', 0xDC}, /* U with umlaut */ 832*0Sstevel@tonic-gate {FA_UMLAUT, 'a', 0xE4}, /* a with umlaut */ 833*0Sstevel@tonic-gate {FA_UMLAUT, 'e', 0xEB}, /* e with umlaut */ 834*0Sstevel@tonic-gate {FA_UMLAUT, 'i', 0xEF}, /* i with umlaut */ 835*0Sstevel@tonic-gate {FA_UMLAUT, 'o', 0xF6}, /* o with umlaut */ 836*0Sstevel@tonic-gate {FA_UMLAUT, 'u', 0xFC}, /* u with umlaut */ 837*0Sstevel@tonic-gate {FA_UMLAUT, 'y', 0xFC}, /* y with umlaut */ 838*0Sstevel@tonic-gate 839*0Sstevel@tonic-gate {FA_CFLEX, 'A', 0xC2}, /* A with circumflex */ 840*0Sstevel@tonic-gate {FA_CFLEX, 'E', 0xCA}, /* E with circumflex */ 841*0Sstevel@tonic-gate {FA_CFLEX, 'I', 0xCE}, /* I with circumflex */ 842*0Sstevel@tonic-gate {FA_CFLEX, 'O', 0xD4}, /* O with circumflex */ 843*0Sstevel@tonic-gate {FA_CFLEX, 'U', 0xDB}, /* U with circumflex */ 844*0Sstevel@tonic-gate {FA_CFLEX, 'a', 0xE2}, /* a with circumflex */ 845*0Sstevel@tonic-gate {FA_CFLEX, 'e', 0xEA}, /* e with circumflex */ 846*0Sstevel@tonic-gate {FA_CFLEX, 'i', 0xEE}, /* i with circumflex */ 847*0Sstevel@tonic-gate {FA_CFLEX, 'o', 0xF4}, /* o with circumflex */ 848*0Sstevel@tonic-gate {FA_CFLEX, 'u', 0xFB}, /* u with circumflex */ 849*0Sstevel@tonic-gate 850*0Sstevel@tonic-gate {FA_TILDE, 'A', 0xC3}, /* A with tilde */ 851*0Sstevel@tonic-gate {FA_TILDE, 'N', 0xD1}, /* N with tilde */ 852*0Sstevel@tonic-gate {FA_TILDE, 'O', 0xD5}, /* O with tilde */ 853*0Sstevel@tonic-gate {FA_TILDE, 'a', 0xE3}, /* a with tilde */ 854*0Sstevel@tonic-gate {FA_TILDE, 'n', 0xF1}, /* n with tilde */ 855*0Sstevel@tonic-gate {FA_TILDE, 'o', 0xF5}, /* o with tilde */ 856*0Sstevel@tonic-gate 857*0Sstevel@tonic-gate {FA_CEDILLA, 'C', 0xC7}, /* C with cedilla */ 858*0Sstevel@tonic-gate {FA_CEDILLA, 'c', 0xE7}, /* c with cedilla */ 859*0Sstevel@tonic-gate 860*0Sstevel@tonic-gate {FA_ACUTE, 'A', 0xC1}, /* A with acute accent */ 861*0Sstevel@tonic-gate {FA_ACUTE, 'E', 0xC9}, /* E with acute accent */ 862*0Sstevel@tonic-gate {FA_ACUTE, 'I', 0xCD}, /* I with acute accent */ 863*0Sstevel@tonic-gate {FA_ACUTE, 'O', 0xD3}, /* O with acute accent */ 864*0Sstevel@tonic-gate {FA_ACUTE, 'U', 0xDA}, /* U with acute accent */ 865*0Sstevel@tonic-gate {FA_ACUTE, 'a', 0xE1}, /* a with acute accent */ 866*0Sstevel@tonic-gate {FA_ACUTE, 'e', 0xE9}, /* e with acute accent */ 867*0Sstevel@tonic-gate {FA_ACUTE, 'i', 0xED}, /* i with acute accent */ 868*0Sstevel@tonic-gate {FA_ACUTE, 'o', 0xF3}, /* o with acute accent */ 869*0Sstevel@tonic-gate {FA_ACUTE, 'u', 0xFA}, /* u with acute accent */ 870*0Sstevel@tonic-gate {FA_ACUTE, 'y', 0xFD}, /* y with acute accent */ 871*0Sstevel@tonic-gate 872*0Sstevel@tonic-gate {FA_GRAVE, 'A', 0xC0}, /* A with grave accent */ 873*0Sstevel@tonic-gate {FA_GRAVE, 'E', 0xC8}, /* E with grave accent */ 874*0Sstevel@tonic-gate {FA_GRAVE, 'I', 0xCC}, /* I with grave accent */ 875*0Sstevel@tonic-gate {FA_GRAVE, 'O', 0xD2}, /* O with grave accent */ 876*0Sstevel@tonic-gate {FA_GRAVE, 'U', 0xD9}, /* U with grave accent */ 877*0Sstevel@tonic-gate {FA_GRAVE, 'a', 0xE0}, /* a with grave accent */ 878*0Sstevel@tonic-gate {FA_GRAVE, 'e', 0xE8}, /* e with grave accent */ 879*0Sstevel@tonic-gate {FA_GRAVE, 'i', 0xEC}, /* i with grave accent */ 880*0Sstevel@tonic-gate {FA_GRAVE, 'o', 0xF2}, /* o with grave accent */ 881*0Sstevel@tonic-gate {FA_GRAVE, 'u', 0xF9}, /* u with grave accent */ 882*0Sstevel@tonic-gate 883*0Sstevel@tonic-gate {0, 0, 0}, /* end of table */ 884*0Sstevel@tonic-gate }; 885*0Sstevel@tonic-gate 886*0Sstevel@tonic-gate /* 887*0Sstevel@tonic-gate * Num Lock Table 888*0Sstevel@tonic-gate */ 889*0Sstevel@tonic-gate 890*0Sstevel@tonic-gate /* Num Lock: pad key entry & 0x1F => ASCII character */ 891*0Sstevel@tonic-gate uchar_t kb_numlock_table[] = { 892*0Sstevel@tonic-gate '=', 893*0Sstevel@tonic-gate '/', 894*0Sstevel@tonic-gate '*', 895*0Sstevel@tonic-gate '-', 896*0Sstevel@tonic-gate ',', 897*0Sstevel@tonic-gate 898*0Sstevel@tonic-gate '7', 899*0Sstevel@tonic-gate '8', 900*0Sstevel@tonic-gate '9', 901*0Sstevel@tonic-gate '+', 902*0Sstevel@tonic-gate 903*0Sstevel@tonic-gate '4', 904*0Sstevel@tonic-gate '5', 905*0Sstevel@tonic-gate '6', 906*0Sstevel@tonic-gate 907*0Sstevel@tonic-gate '1', 908*0Sstevel@tonic-gate '2', 909*0Sstevel@tonic-gate '3', 910*0Sstevel@tonic-gate 911*0Sstevel@tonic-gate '0', 912*0Sstevel@tonic-gate '.', 913*0Sstevel@tonic-gate '\n', /* Enter */ 914*0Sstevel@tonic-gate }; 915