kb8042_keytables.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This module contains the translation tables for PS/2 style keyboards.
*/
#define KEYMAP_SIZE_VARIABLE
/* handy way to define control characters in the tables */
#define ESC 0x1B
#define DEL 0x7F
#define KEYMAP_SIZE_PC 160
/* ***************************** */
/* PC-101 keyboard definitions */
/* ***************************** */
/* Unshifted keyboard table for PC keyboard */
/* BEGIN CSTYLED */
/* 16 */ '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u',
/* 24 */ 'i', 'o', 'p', '[', ']', '\\',
'a',
/* 32 */ 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l',
/* 40 */ ';', '\'', '\\', '\r',
/* 48 */ 'c', 'v', 'b', 'n', 'm', ',', '.', '/',
' ', SHIFTKEYS+
HOLE,
/* 88 */ HOLE,
RF(9),
RF(15),
/*160 */
};
/* Shifted keyboard table for PC keyboard */
/* 16 */ '\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U',
/* 24 */ 'I', 'O', 'P', '{', '}', '|',
'A',
/* 32 */ 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L',
/* 40 */ ':', '"', '|', '\r',
/* 48 */ 'C', 'V', 'B', 'N', 'M', '<', '>', '?',
HOLE,
' ', SHIFTKEYS+
HOLE,
/* 88 */ HOLE,
/* 96 */ '8', '5', '2', '0', '*', '9', '6', '3',
/*160 */
};
/* Caps Locked keyboard table for PC keyboard */
/* 16 */ '\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U',
/* 24 */ 'I', 'O', 'P', '[', ']', '\\',
'A',
/* 32 */ 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L',
/* 40 */ ';', '\'', '\\', '\r',
/* 48 */ 'C', 'V', 'B', 'N', 'M', ',', '.', '/',
HOLE,
' ', SHIFTKEYS+
HOLE,
/* 88 */ HOLE,
RF(9),
RF(15),
/*160 */
};
/* Alt Graph keyboard table for PC keyboard */
NOP,
HOLE,
' ', SHIFTKEYS+
HOLE,
/*160 */
};
/* Num Locked keyboard table for PC keyboard */
/*160 */
};
/* Controlled keyboard table for PC keyboard */
/* 16 */ '\t', c('q'), c('w'), c('e'), c('r'), c('t'), c('y'), c('u'),
/* 24 */ c('i'), c('o'), c('p'), c('['), c(']'), c('\\'),
c('a'),
/* 32 */ c('s'), c('d'), c('f'), c('g'), c('h'), c('j'), c('k'), c('l'),
/* 40 */ ';', '\'', '\\', '\r',
/* 48 */ c('c'), c('v'), c('b'), c('n'), c('m'), ',', '.', c('_'),
HOLE,
' ', SHIFTKEYS+
HOLE,
/* 88 */ HOLE,
/*160 */
};
/* "Key Up" keyboard table for PC keyboard */
HOLE,
/*160 */
};
/* END CSTYLED */
#define M(x) (1 << (x))
M(RIGHTSHIFT) | \
CTRLMASK | \
ALTMASK | \
/*
* Make Ctrl+Shift+F1 be Compose. This is SOOOO hokey.
*/
static struct exception_map exceptions_pc[] = {
{ 0, },
};
/* Index to keymaps for PC keyboard */
struct keyboard keyindex_pc = {
0x0000, /* Shift bits which stay on with idle keyboard */
0x0000, /* Bucky bits which stay on with idle keyboard */
112, 0, 31, /* abort keys: F1+A */
exceptions_pc, /* Exceptions */
};