atKeynames.h revision b8e299dddd091ae24e0c08c45d91b8f937bd14d2
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XFree86: xc/programs/Xserver/hw/xfree86/common/atKeynames.h,v 3.21 2003/10/09 11:43:59 pascal Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * documentation for any purpose is hereby granted without fee, provided that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * the above copyright notice appear in all copies and that both that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * copyright notice and this permission notice appear in supporting
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * documentation, and that the name of Thomas Roell not be used in
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * advertising or publicity pertaining to distribution of the software without
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * specific, written prior permission. Thomas Roell makes no representations
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * about the suitability of this software for any purpose. It is provided
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * "as is" without express or implied warranty.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * PERFORMANCE OF THIS SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * copy of this software and associated documentation files (the "Software"),
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * to deal in the Software without restriction, including without limitation
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * and/or sell copies of the Software, and to permit persons to whom the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Software is furnished to do so, subject to the following conditions:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * The above copyright notice and this permission notice shall be included in
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * all copies or substantial portions of the Software.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * OTHER DEALINGS IN THE SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Except as contained in this notice, the name of the copyright holder(s)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * and author(s) shall not be used in advertising or otherwise to promote
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * the sale, use or other dealings in this Software without prior written
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * authorization from the copyright holder(s) and author(s).
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XConsortium: atKeynames.h /main/11 1996/03/09 11:17:41 kaleb $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KeyPressed(k) (keyc->down[k >> 3] & (1 << (k & 7)))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define ModifierDown(k) ((keyc->state & (k)) == (k))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * sets of scancodes. Set3 can only be generated by a MF keyboard.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Set2 sends a makecode for keypress, and the same code prefixed by a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * F0 for keyrelease. This is a little bit ugly to handle. Thus we use
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Bit 7 ist set if the key is released. The code E0 switches to a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * different meaning to add the new MF cursorkeys, while not breaking old
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * applications. E1 is another special prefix. Since I assume that there
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * will be further versions of PC/XT scancode compatible keyboards, we
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * may be in trouble one day.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 2) Use the keyboards native set and translate it to common keysyms.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * definition of the AT84/MF101/MF102 Keyboard:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ============================================================
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Defined Key Cap Glyphs Pressed value
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Key Name Main Also (hex) (dec)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ---------------- ---------- ------- ------ ------
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_Period /* . (Period) >(Greater)0x34 */ 52
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* NOTUSED 0x55 */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * The 'scancodes' below are generated by the server, because the MF101/102
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * keyboard sends them as sequence of other scancodes
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Fake 'scancodes' in the following ranges are generated for 2-byte
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * codes not handled elsewhere. These correspond to most extended keys
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * on so-called "Internet" keyboards:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0x79-0x93
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0x96-0xa1
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0xa3-0xac
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0xb1-0xb4
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0xba-0xbd
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0xcc-0xd2
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0xd6-0xf7
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Remapped 'scancodes' are generated for single-byte codes in the range
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* These are for "notused" and "unknown" entries in translation maps. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif /* _ATKEYNAMES_H */