1
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sysv_kbd.c,v 3.3 1998/07/25 16:57:02 dawes Exp $ */
3
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
4
* Copyright 1993 by David Dawes <dawes@XFree86.org>
6
* Permission to use, copy, modify, distribute, and sell this software and its
7
* documentation for any purpose is hereby granted without fee, provided that
8
* the above copyright notice appear in all copies and that both that
9
* copyright notice and this permission notice appear in supporting
10
* documentation, and that the names of Thomas Roell and David Dawes
11
* not be used in advertising or publicity pertaining to distribution of
12
* the software without specific, written prior permission. Thomas Roell and
13
* David Dawes makes no representations about the suitability of this
14
* software for any purpose. It is provided "as is" without express or
17
* THOMAS ROELL AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD TO
18
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
19
* FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID DAWES BE LIABLE FOR
20
* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
21
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
22
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
23
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26
/* $XConsortium: sysv_kbd.c /main/3 1996/02/21 17:53:59 kaleb $ */
28
#ifdef HAVE_XORG_CONFIG_H
29
#include <xorg-config.h>
38
#include "xf86_OSlib.h"
45
ioctl(xf86Info.consoleFd, KDGETLED, &leds);
50
xf86SetKbdRepeat(char rad)
53
ioctl(xf86Info.consoleFd, KDSETRAD, rad);
58
static struct termio kbdtty;
59
static char *kbdemap = NULL;
65
ioctl (xf86Info.consoleFd, KDGKBMODE, &kbdtrans);
67
ioctl (xf86Info.consoleFd, TCGETA, &kbdtty);
69
kbdemap = xalloc(E_TABSZ);
70
if (ioctl(xf86Info.consoleFd, LDGMAP, kbdemap) < 0)
83
ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW);
84
ioctl(xf86Info.consoleFd, LDNMAP, 0); /* disable mapping completely */
86
nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
88
nTty.c_cflag = CREAD | CS8 | B9600;
92
ioctl(xf86Info.consoleFd, TCSETA, &nTty);
93
return(xf86Info.consoleFd);
101
ioctl(xf86Info.consoleFd, LDSMAP, kbdemap);
103
ioctl(xf86Info.consoleFd, KDSKBMODE, kbdtrans);
104
ioctl(xf86Info.consoleFd, TCSETA, &kbdtty);
105
return(xf86Info.consoleFd);