diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/sun')
22 files changed, 14727 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/sun/Imakefile b/nx-X11/programs/Xserver/hw/sun/Imakefile new file mode 100644 index 000000000..24f607a0e --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/Imakefile @@ -0,0 +1,90 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ + + + + +XCOMM $XFree86: xc/programs/Xserver/hw/sun/Imakefile,v 1.6 2001/04/16 20:57:04 herrb Exp $ + +#include <Server.tmpl> + +SRCS1 = sunInit.c \ + sunCfb.c \ + sunCfb24.c \ + sunCursor.c \ + sunFbs.c \ + sunIo.c \ + sunKbd.c \ + sunMfb.c \ + sunMouse.c\ + sunKeyMap.c + +OBJS1 = sunCfb.o \ + sunCfb24.o \ + sunCursor.o \ + sunFbs.o \ + sunIo.o \ + sunKbd.o \ + sunMfb.o \ + sunMouse.o \ + sunKeyMap.o + +SRCS2 = sunGX.c +OBJS2 = sunGX.o + +#ifdef i386Architecture +SRCS3 = sunInit.c +OBJS3 = sunInit.o +#else +SRCS3 = sunInit.c sunInitExt.c \ + sunInitMono.c sunInExMono.c \ + sunInitMulti.c stubs.c +OBJS3 = sunInit.o sunInitExt.o \ + sunInitMono.o sunInExMono.o \ + sunInitMulti.o stubs.o + +DEFINES = $(OS_DEFINES) $(EXT_DEFINES) \ + -UXFree86LOADER -UXF86VIDMODE -UXFreeXDGA \ + -UXF86MISC -UXF86DRI -UXF86BIGFONT +#endif + +SRCS = $(SRCS1) $(SRCS2) $(SRCS3) kbd_mode.c constype.c + +OBJS = $(OBJS1) $(OBJS2) + + INCLUDES = -I. -I../.. -I../../mi -I../../mfb -I../../cfb -I../../cfb32 \ + -I../../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) + LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln \ + ../mfb/llib-lmfb.ln ../mi/llib-lmi.ln ../cfb/llib-lcfb.ln + +NormalLibraryObjectRule() + +all:: $(OBJS3) kbd_mode constype + +lintlib: + +NormalLibraryTarget(sun,$(OBJS)) +NormalLintTarget($(SRCS1)) + +#ifndef i386Architecture +sunInExMono.o: $(ICONFIGFILES) +ObjectFromSpecialSource(sunInExMono,../../mi/miinitext, \ + -UPEXEXT -UGLXEXT -UXV -URENDER) +LinkFile(sunInitExt.c,../../mi/miinitext.c) +LinkSourceFile(stubs.c,../../Xi) +ObjectFromSpecialSource(sunInitMono,sunInit,-DSUNMAXDEPTH=1) +ObjectFromSpecialSource(sunInitMulti,sunInit,-DSUNMAXDEPTH=32) +#endif + +SingleProgramTarget(kbd_mode, kbd_mode.o,,) +SingleProgramTarget(constype, constype.o,,) +InstallProgram(kbd_mode,$(BINDIR)) +InstallProgram(constype,$(BINDIR)) +InstallManPage(kbd_mode,$(MANDIR)) +InstallManPage(constype,$(MANDIR)) +InstallManPage(Xsun,$(MANDIR)) +#ifndef i386Architecture +InstallManPageAliases(Xsun,$(MANDIR),XsunMono) +InstallManPageAliases(Xsun,$(MANDIR),Xsun24) +#endif + +DependTarget() diff --git a/nx-X11/programs/Xserver/hw/sun/README b/nx-X11/programs/Xserver/hw/sun/README new file mode 100644 index 000000000..87ba53584 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/README @@ -0,0 +1,118 @@ +A joint production of: + + Adam de Boor University of California, Berkeley + + David Rosenthal + Stuart Marks + Robin Schaufler + Mike Schwartz + Frances Ho + Geoff Lee + Mark Opperman Sun Microsystems + + Bob Scheifler MIT Laboratory for Computer Science + Keith Packard + +This version of the Sun X11 drivers uses ../mi, ../mfb and ../cfb to support +the following configurations: + + Sun/2 bw2 cg2/3/5 + Sun/3 bw2 cg2/3/4/5 + Sun/4 bw2 cg2/4 + SPARCstation cg3/6 + Sun/386i mono color + +The following configurations are NOT supported: + + Sun/1 bw1 cg1 (requires separate port) + Sun/2 gp (use /dev/cgtwo0) + Sun/3 gp (use /dev/cgtwo0) + Sun/4 gp (use /dev/cgtwo0) + +The mfb and cfb code has been substantially tuned for 1- and 8-bit framebuffers +(with code for both fast and slow cpu-to-memory ratios). It installs and runs +on these configurations under SunOS 3.2, 3.4, and 4.0. However, we must stress +that it is completely unsupported, and if you have problems installing or using +it you are on your own. + + +Things to check before building: + +1) config/sun.cf - set the SunOSMajorVersion and SunOSMinorVersion + parameters to the right values. + +2) config/Project.tmpl - check LIBDIR, FONTDIR, etc.; set + define LibDir, FontDir, etc. in site.def as required. + + + +Then build the system by: + +1) Go for it. In the top-level directory, type + + make World + + This takes about forty minutes on a 4/260, and somewhat longer + on other Suns. + + +2) Go for it. In the top-level directory, type + + make install + + Otherwise, you'll want to create a bunch of symbolic links to + the various executables and data files scattered throughout + the hierarchy. + + + +3) On the console, or from an rlogin connection, put whatever you + chose for BINDIR (in Imake.tmpl) in your search path, and then + start the server: + + xinit + or + xinit -- -dev /dev/??? [see below] + + If it's from the console, you probably want to redirect the + output thus: + + xinit >& /tmp/x11.out + +4) xinit should start up an xterm window that acts as a console. When + this xterm terminates, the xinit will kill the server. You can also + start up client programs from a terminal or rlogin, but you must + first set the DISPLAY environment variable: + + setenv DISPLAY unix:0 + xterm & + + +5) Make sure that you have special devices in /dev for the appropriate + framebuffer. See the manual page for Xsun for details or run the + constype program. VME systems require special .o files when more + than one of a particular frame buffer type is installed. + + +6) In general, Xsun auto-configures to use all the available framebuffers + (see the Xsun manual page). In some circumstances, you may need to + use the -dev switch on the command line to specify a specific device + to use. In particular, on the GP, GP+, and GP2, you'll need to + specify -dev /dev/cgtwo0 your xdm Xservers file or your xinit script. + + +7) To shut the server down, send it a Hangup or Terminate signal. + + +8) If X crashes, it will leave the keyboard in a funny state. There is a + program called "kbd_mode" that will reset the mode of the keyboard. + "kbd_mode -a" is the appropriate setting for the bare console, and + "kbd_mode -e" is the appropriate setting for running with SunWindows. + You may have to issue this command from a terminal or from an rlogin + connection. If you run from the bare console, you can give the + command + + xinit ; kbd_mode -a + + so that the keyboard mode will ALWAYS be set properly when the server + terminates. diff --git a/nx-X11/programs/Xserver/hw/sun/Xsun.man b/nx-X11/programs/Xserver/hw/sun/Xsun.man new file mode 100644 index 000000000..17c1a9773 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/Xsun.man @@ -0,0 +1,176 @@ +.\" $Xorg: Xsun.man,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ +.\" Copyright 1988 Sun Microsystems, Inc. +.\" Copyright 1993, 1994, 1998 The Open Group +.\" +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation. +.\" +.\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of The Open Group shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealings in this Software without prior written authorization +.\" from The Open Group. +.\" +.\" $XFree86: xc/programs/Xserver/hw/sun/Xsun.man,v 1.7 2001/01/27 18:20:40 dawes Exp $ +.\" +.TH XSUN 1 __xorgversion__ +.SH NAME +Xsun, XsunMono, Xsun24 \- Sun server for X Version 11 +.SH SYNOPSIS +.B Xsun +[ option ] ... +.SH DESCRIPTION +.I Xsun +is the server for Version 11 of the X window system on Sun hardware. +It will normally be started by the \fIxdm(1)\fP daemon or by a script +that runs the program \fIxinit(1)\fP. +.SH CONFIGURATIONS +.PP +.I XsunMono +supports the BW2 monochrome frame buffer. +.I Xsun +supports the CG2, CG3, CG4, and CG6 8-bit color frame buffers in +addition to the BW2 monochrome frame buffer. On Solaris 2.5 it also +supports the TCX as an 8-bit color frame buffer. +.I Xsun24 +supports the cgeight 24-bit color frame buffer in addition to the +8-bit color and monochrome frame buffers that +.I Xsun +supports. +.PP +If specific framebuffer device files aren't specified on the command +line with the \fI\-dev\fP switch or in the \fIXDEVICE\fP environment +variable, the server will search for all installed frame buffers and +will use all those that it finds. +.PP +Finally, if no specific framebuffers are found, the generic framebuffer +interface \fI/dev/fb\fP is used. +.PP +.SH KEYBOARDS +.PP +Xsun, Xsun24, and XsunMono support the Type-2, Type-3, and many variations +of the Type-4 and Type-5 keyboards. +.PP +Type-4 and Type-5 keyboards feature a key labeled \fIAltGraph\fP which +is a mode-shift key. The mode-shift key is used to generate the symbols +painted on the fronts of the keys. The mode-shift key works exactly like +the \fIShift\fP, \fIControl\fP, \fIAlt\fP, and \fI<Meta>\fP keys. +.PP +The ten function keys on the left side of the Type-5 keyboard may be +considered as having L1..L10 painted on their fronts. Shift-AltGraph +will cause different keysyms to be generated for some keys, e.g. the +Type-5 \fISysRq\fP key. +.PP +For compatibility with Sun's X11/NeWS server, the F11 and F12 keys may +be made to generate the equivalent X11/NeWS keysyms by using mode-switch. +.PP +For backwards compatibility, the normal and mode-shifted keysyms for +the ten function keys on the left side of Type-4 and Type-5 keyboards +may be swapped via command line option. See \fI-swapLkeys\fP. +.PP +The X LEDs 1..4 correspond to the NumLock, ScrollLock, Compose, and +CapsLock LEDs respectively. Pressing the key once turns the corresponding +LED on. Pressing the key again turns the LED off. Turning an LED on or +off with e.g. 'xset [-]led [1234]' is equivalent to pressing the +corresponding key. +.SH OPTIONS +.PP +In addition to the normal server options described in the \fIXserver(1)\fP +manual page, \fIXsun\fP accepts the following command line switches: +.TP 8 +.B "\-ar1 \fImilliseconds\fP" +This option specifies amount of time in milliseconds before which a +pressed key should begin to autorepeat. +.TP 8 +.B "\-ar2 \fImilliseconds\fP" +This option specifies the interval in milliseconds between autorepeats +of pressed keys. +.TP 8 +.B \-swapLkeys +Swaps the normal keysyms for the function keys on the left side of +Type-4 and Type-5 keyboards with the alternate keysyms, i.e. the keysyms +painted on the front of the keys. +.TP 8 +.B \-flipPixels +The normal pixel values for white and black are 0 and 1 respectively. +When -flipPixels is specified these values are reversed. +.TP 8 +.B \-mono +When used with the \fBcgtwo\fP, this option indicates that the server +should emulate a monochrome framebuffer instead of the normal color +framebuffer. When used with the \fBcgfour\fP, this option indicates +that the monochrome screen should be numbered 0 and the color screen +numbered 1 (instead of the other way around). +.TP 8 +.B \-zaphod +This option disables switching between screens by sliding the mouse off +the left or right edges. With this disabled, a window manager function +must be used to switch between screens. +.TP 8 +.B \-debug +This option indicates that the server is being run from a debugger, and +that it should \fBnot\fP put its standard input, output and error files +into non-blocking mode. +.TP 8 +.B "\-dev \fIfilename[:filename]...\fP" +This option specifies the colon separated names of the framebuffer device +files to be used. +.TP 8 +.B "\-fbinfo +This option indicates that the server should enumerate the available +frame buffers that it will use. +.SH ENVIRONMENT +.TP 8 +\fBXDEVICE\fP +If present, and if no explicit \fB-dev\fP options are given, specifies +the (colon separated) list of display devices to use. +.SH "SEE ALSO" +.PP +X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) +.SH BUGS +The auto-configuration depends on there being appropriate special files +in the +.I /dev +directory for the framebuffers which are to be used. Extra entries can +confuse the server. For example, the X/160C in fact has the hardware +for a monochrome +.B bwtwo0 +on the CPU board. So if +.I /dev +has a special file for +.IR /dev/bwtwo0 , +the server will use it, even though there is no monitor attached to the +monochrome framebuffer. +The server will appear to start, but not to paint a cursor, because the +cursor is on the monochrome frame buffer. The solution is to remove the +.I /dev +entries for any device you don't have a monitor for. +.PP +There is a bug in pre-FCS operating systems for the Sun-4 which causes +the server to crash driving a \fBcgtwo\fP. +.PP +.SH AUTHORS +.TP 8 +U. C. Berkeley +Adam de Boor. +.TP 8 +Sun Microsystems +David Rosenthal, Stuart Marks, Robin Schaufler, Mike Schwartz, +Frances Ho, Geoff Lee, and Mark Opperman. +.TP 8 +MIT Laboratory for Computer Science +.br +Bob Scheifler, Keith Packard, Kaleb Keithley diff --git a/nx-X11/programs/Xserver/hw/sun/circleset.h b/nx-X11/programs/Xserver/hw/sun/circleset.h new file mode 100644 index 000000000..c2c38e402 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/circleset.h @@ -0,0 +1,136 @@ +#ifdef DO_FILLED_ARCS +static unsigned short filled_arcs[16][16] = { +{ /* 1 */ +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 2 */ +B(0x4000),B(0xc000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 3 */ +B(0x0000),B(0x6000),B(0x6000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 4 */ +B(0x2000),B(0x7000),B(0xf000),B(0x7000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 5 */ +B(0x0000),B(0x7800),B(0x7800),B(0x7800),B(0x7800),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 6 */ +B(0x1000),B(0x7c00),B(0x7c00),B(0xfc00),B(0x7c00),B(0x7c00),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 7 */ +B(0x0000),B(0x3c00),B(0x7e00),B(0x7e00),B(0x7e00),B(0x7e00),B(0x3c00),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 8 */ +B(0x0800),B(0x3e00),B(0x7f00),B(0x7f00),B(0xff00),B(0x7f00),B(0x7f00),B(0x3e00), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 9 */ +B(0x0000),B(0x3f00),B(0x7f80),B(0x7f80),B(0x7f80),B(0x7f80),B(0x7f80),B(0x7f80), +B(0x3f00),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 10 */ +B(0x0400),B(0x3f00),B(0x7f80),B(0x7fc0),B(0x7fc0),B(0xffc0),B(0x7fc0),B(0x7fc0), +B(0x7f80),B(0x3f00),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 11 */ +B(0x0000),B(0x1f80),B(0x3fc0),B(0x7fe0),B(0x7fe0),B(0x7fe0),B(0x7fe0),B(0x7fe0), +B(0x7fe0),B(0x3fc0),B(0x1f80),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 12 */ +B(0x0200),B(0x1fc0),B(0x3fe0),B(0x7ff0),B(0x7ff0),B(0x7ff0),B(0xfff0),B(0x7ff0), +B(0x7ff0),B(0x7ff0),B(0x3fe0),B(0x1fc0),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 13 */ +B(0x0000),B(0x0fc0),B(0x3ff0),B(0x3ff0),B(0x7ff8),B(0x7ff8),B(0x7ff8),B(0x7ff8), +B(0x7ff8),B(0x7ff8),B(0x3ff0),B(0x3ff0),B(0x0fc0),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 14 */ +B(0x0100),B(0x0fe0),B(0x1ff0),B(0x3ff8),B(0x7ffc),B(0x7ffc),B(0x7ffc),B(0xfffc), +B(0x7ffc),B(0x7ffc),B(0x7ffc),B(0x3ff8),B(0x1ff0),B(0x0fe0),B(0x0000),B(0x0000), +}, +{ /* 15 */ +B(0x0000),B(0x0ff0),B(0x1ff8),B(0x3ffc),B(0x7ffe),B(0x7ffe),B(0x7ffe),B(0x7ffe), +B(0x7ffe),B(0x7ffe),B(0x7ffe),B(0x7ffe),B(0x3ffc),B(0x1ff8),B(0x0ff0),B(0x0000), +}, +{ /* 16 */ +B(0x0080),B(0x07f0),B(0x1ffc),B(0x3ffe),B(0x3ffe),B(0x7fff),B(0x7fff),B(0x7fff), +B(0xffff),B(0x7fff),B(0x7fff),B(0x7fff),B(0x3ffe),B(0x3ffe),B(0x1ffc),B(0x07f0), +}, +}; +#endif /* DO_FILLED_ARCS */ +#ifdef DO_OUTLINE_ARCS +static unsigned short outline0_arcs[16][16] = { +{ /* 1 */ +B(0xc000),B(0xc000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 2 */ +B(0xe000),B(0xa000),B(0xe000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 3 */ +B(0x6000),B(0x9000),B(0x9000),B(0x6000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 4 */ +B(0x7000),B(0x8800),B(0x8800),B(0x8800),B(0x7000),B(0x0000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 5 */ +B(0x3000),B(0x4800),B(0x8400),B(0x8400),B(0x4800),B(0x3000),B(0x0000),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 6 */ +B(0x3800),B(0x4400),B(0x8200),B(0x8200),B(0x8200),B(0x4400),B(0x3800),B(0x0000), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 7 */ +B(0x3c00),B(0x4200),B(0x8100),B(0x8100),B(0x8100),B(0x8100),B(0x4200),B(0x3c00), +B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 8 */ +B(0x1c00),B(0x6300),B(0x4100),B(0x8080),B(0x8080),B(0x8080),B(0x4100),B(0x6300), +B(0x1c00),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 9 */ +B(0x1e00),B(0x2100),B(0x4080),B(0x8040),B(0x8040),B(0x8040),B(0x8040),B(0x4080), +B(0x2100),B(0x1e00),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 10 */ +B(0x1f00),B(0x2080),B(0x4040),B(0x8020),B(0x8020),B(0x8020),B(0x8020),B(0x8020), +B(0x4040),B(0x2080),B(0x1f00),B(0x0000),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 11 */ +B(0x0f00),B(0x30c0),B(0x4020),B(0x4020),B(0x8010),B(0x8010),B(0x8010),B(0x8010), +B(0x4020),B(0x4020),B(0x30c0),B(0x0f00),B(0x0000),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 12 */ +B(0x0f80),B(0x1040),B(0x2020),B(0x4010),B(0x8008),B(0x8008),B(0x8008),B(0x8008), +B(0x8008),B(0x4010),B(0x2020),B(0x1040),B(0x0f80),B(0x0000),B(0x0000),B(0x0000), +}, +{ /* 13 */ +B(0x0780),B(0x1860),B(0x2010),B(0x4008),B(0x8004),B(0x8004),B(0x8004),B(0x8004), +B(0x8004),B(0x8004),B(0x4008),B(0x2010),B(0x1860),B(0x0780),B(0x0000),B(0x0000), +}, +{ /* 14 */ +B(0x07c0),B(0x1830),B(0x2008),B(0x4004),B(0x4004),B(0x8002),B(0x8002),B(0x8002), +B(0x8002),B(0x8002),B(0x4004),B(0x4004),B(0x2008),B(0x1830),B(0x07c0),B(0x0000), +}, +{ /* 15 */ +B(0x07e0),B(0x0810),B(0x300c),B(0x4002),B(0x4002),B(0x8001),B(0x8001),B(0x8001), +B(0x8001),B(0x8001),B(0x8001),B(0x4002),B(0x4002),B(0x300c),B(0x0810),B(0x07e0), +}, +{ /* 16 */ +B(0x03e0),B(0x0c18),B(0x1004),B(0x2002),B(0x4001),B(0x4001),B(0x8000),B(0x8000), +B(0x8000),B(0x8000),B(0x8000),B(0x4001),B(0x4001),B(0x2002),B(0x1004),B(0x0c18), +}, +}; +#endif /* DO_OUTLINE_ARCS */ diff --git a/nx-X11/programs/Xserver/hw/sun/constype.c b/nx-X11/programs/Xserver/hw/sun/constype.c new file mode 100644 index 000000000..06a6c345c --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/constype.c @@ -0,0 +1,216 @@ +/* $XdotOrg: xc/programs/Xserver/hw/sun/constype.c,v 1.3 2005/09/28 17:07:55 alanc Exp $ + * $Xorg: constype.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ + * + * consoletype - utility to print out string identifying Sun console type + * + * Copyright 1988 SRI + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SRI not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SRI makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * Author: Doug Moran, SRI + */ +/* $XFree86: xc/programs/Xserver/hw/sun/constype.c,v 3.8 2003/10/07 21:40:07 herrb Exp $ */ + +/* +SUN-SPOTS DIGEST Thursday, 17 March 1988 Volume 6 : Issue 31 + +Date: Wed, 2 Mar 88 14:50:26 PST +From: Doug Moran <moran@ai.sri.com> +Subject: Program to determine console type + +There have been several requests in this digest for programs to determine +the type of the console. Below is a program that I wrote to produce an +identifying string (I start suntools in my .login file and use this pgm to +determine which arguments to use). + +Caveat: my cluster has only a few of these monitor types, so the pgm has +not been fully tested. + +Note on coding style: the function wu_fbid is actually located in a local +library, accounting for what otherwise might appear to be a strange coding +style. +*/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#else +# if defined(SVR4) || defined(CSRG_BASED) +# define STDC_HEADERS 1 +# endif +# if defined(SVR4) || defined(__bsdi__) +# define HAVE_SYS_FBIO_H 1 +# if defined(SVR4) && defined(sun) +# define HAVE_SYS_VISUAL_IO_H 1 +# endif +# elif defined(CSRG_BASED) +# define HAVE_MACHINE_FBIO_H +# endif +#endif + +#include <stdio.h> +#ifdef STDC_HEADERS +#include <string.h> +#else +/* SunOS */ +#include <strings.h> +#endif +#include <unistd.h> + +static int wu_fbid(const char *devname, char **fbname, int *fbtype); + +int +main (int argc, char **argv) +{ + int fbtype = -1; + char *fbname, *dev; + int print_num = 0; + int error; + + if (argc > 1 && argv[1][0] == '/') { + dev = argv[1]; + argc--; argv++; + } else + dev = "/dev/fb"; + error = wu_fbid(dev, &fbname, &fbtype ); + if (argc > 1 && strncmp (argv[1], "-num", strlen(argv[1])) == 0) + print_num = 1; + + printf ("%s", fbname ? fbname : "tty"); + if (print_num) { + printf (" %d", fbtype); + } + putchar ('\n'); + return error; +} + +#include <sys/ioctl.h> +#include <sys/file.h> +#ifdef HAVE_SYS_FBIO_H +# include <fcntl.h> +# include <sys/fbio.h> +# ifdef HAVE_SYS_VISUAL_IO_H +/* VIS_GETIDENTIFIER ioctl added in Solaris 2.3 */ +# include <sys/visual_io.h> +# endif +#else +# ifndef HAVE_MACHINE_FBIO_H +# include <sun/fbio.h> +# else +# include <machine/fbio.h> +# endif +#endif + +/* Sun doesn't see fit to update <sys/fbio.h> to reflect the addition + * of the TCX + */ +#define XFBTYPE_TCX 21 +#define XFBTYPE_LASTPLUSONE 22 + +/* decoding as of Release 3.4 : fbio.h 1.3 87/01/09 SMI */ + /* the convention for entries in this table is to translate the + * macros for frame buffer codes (in <sun/fbio.h>) to short names + * thus: + * FBTYPE_SUNxBW becomes bwx + * FBTYPE_SUNxCOLOR becomes cgx + * FBTYPE_SUNxGP becomes gpx + * FBTYPE_NOTSUN[1-9] becomes ns[A-J] + */ +static char *decode_fb[] = { + "bw1", "cg1", + "bw2", "cg2", + "gp2", + "cg5", "cg3", + "cg8", "cg4", + "nsA", "nsB", "nsC", +#ifdef FBTYPE_SUNFAST_COLOR + "gx/cg6", +#endif +#ifdef FBTYPE_SUNROP_COLOR + "rop", +#endif +#ifdef FBTYPE_SUNFB_VIDEO + "vid", +#endif +#ifdef FBTYPE_SUNGIFB + "gifb", +#endif +#ifdef FBTYPE_SUNGPLAS + "plas", +#endif +#ifdef FBTYPE_SUNGP3 + "gp3/cg12", +#endif +#ifdef FBTYPE_SUNGT + "gt", +#endif +#ifdef FBTYPE_SUNLEO + "leo/zx", +#endif +#ifdef FBTYPE_MDICOLOR + "mdi/cg14", +#endif + }; + +static int +wu_fbid(const char* devname, char** fbname, int* fbtype) +{ + struct fbgattr fbattr; + int fd, ioctl_ret; +#ifdef VIS_GETIDENTIFIER + int vistype; + struct vis_identifier fbid; +#endif + + if ( (fd = open(devname, O_RDWR, 0)) == -1 ) { + *fbname = "unable to open fb"; + return 2; + } + +#ifdef VIS_GETIDENTIFIER + if ((vistype = ioctl(fd, VIS_GETIDENTIFIER, &fbid)) >= 0) { + *fbname = fbid.name; + *fbtype = vistype; + close(fd); + return 0; + } +#endif + + /* FBIOGATTR fails for early frame buffer types */ + if ((ioctl_ret = ioctl(fd,FBIOGATTR,&fbattr))<0) /*success=>0(false)*/ + ioctl_ret = ioctl(fd, FBIOGTYPE, &fbattr.fbtype); + close(fd); + if ( ioctl_ret == -1 ) { + *fbname = "ioctl on fb failed"; + return 2; + } + *fbtype = fbattr.fbtype.fb_type; + /* The binary is obsolete and needs to be re-compiled: + * the ioctl returned a value beyond what was possible + * when the program was compiled */ + if (fbattr.fbtype.fb_type>=FBTYPE_LASTPLUSONE) { + if (fbattr.fbtype.fb_type == XFBTYPE_TCX) { + *fbname = "tcx"; + return 0; + } else { + *fbname = "unk"; + return 1; + } + } + /* The source is obsolete. The table "decode_fb" does not + * have entries for some of the values returned by the ioctl. + * Compare <sun/fbio.h> to the entries in "decode_fb" */ + if ( decode_fb[fbattr.fbtype.fb_type] == NULL ) { + *fbname = "unk"; + return 1; + } + *fbname = decode_fb[fbattr.fbtype.fb_type]; + return 0; +} diff --git a/nx-X11/programs/Xserver/hw/sun/constype.man b/nx-X11/programs/Xserver/hw/sun/constype.man new file mode 100644 index 000000000..f360825e3 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/constype.man @@ -0,0 +1,80 @@ +.\" $Xorg: constype.man,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ +.\" $XdotOrg: xc/programs/Xserver/hw/sun/constype.man,v 1.3 2005/09/28 17:07:55 alanc Exp $ +.\" $XFree86$ +.\" +.TH CONSTYPE 1 __xorgversion__ +.SH NAME +constype \- print type of Sun console +.SH SYNOPSIS +.B "constype" +[ +.I device_name +] [ +.B \-num +] +.SH DESCRIPTION +.B constype +prints on the standard output the Sun code for the type of display +that the specified device is. +The types output include these: +.sp 2 +.in +0.5i +.nf +bw? Black and White, where ? is 1-4. (eg) 3-50s are bw2 +cg? Colour Graphics display, where ? is 1-6, 8, 12 +gp? Optional Graphics Processor board, where ? is 1-2 +ns? Not Sun display \(em where ? is A-J +.fi +.in -0.5i +.sp 2 +If the OS and device support the VIS_GETIDENTIFIER ioctl, the value +returned from the ioctl is the value printed by constype. Sample types +output for these include: +.sp 2 +.in +0.5i +.nf +SUNWffb Sun Creator 3D (ffb) Graphics Accelerator +SUNWm64 Sun PGX8, PGX24 or PGX64 Frame Buffer +SUNWtext Generic vgatext console for Solaris x86 graphics devices without specific kernel drivers +.fi +.in -0.5i +.sp 2 +This is useful in determining startup values and defaults for window +systems. +.LP +The +.I device_name +argument, if given, is the device to examine. +If not given, +.I /dev/fb +is used. +.LP +The +.B \-num +option causes +.I constype +to follow the type keyword with the numeric value of that type, +as returned by the FBIOGATTR or FBIOGTYPE ioctl and defined in fbio.h. +This is useful if the type is not recognized by the program. +.SH "EXIT STATUS" +The program exits with status 0 if it identified a known console type, +1 if the type was unknown, and 2 if the device could not be opened or +another error occurred. +.SH BUGS +Not tested on all frame buffer types +.SH "SEE ALSO" +.BR visual_io (7I) +.SH COPYRIGHT +Copyright 1988, SRI +.PP +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of SRI not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. SRI makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. +.SH AUTHOR +Doug Moran <moran@ai.sri.com> diff --git a/nx-X11/programs/Xserver/hw/sun/kbd_mode.c b/nx-X11/programs/Xserver/hw/sun/kbd_mode.c new file mode 100644 index 000000000..b59143ac8 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/kbd_mode.c @@ -0,0 +1,155 @@ +/* $Xorg: kbd_mode.c,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ +/* $XdotOrg: xc/programs/Xserver/hw/sun/kbd_mode.c,v 1.3 2005/09/28 01:57:47 alanc Exp $ */ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ +/* $XFree86: kbd_mode.c,v 3.11 2002/10/23 16:23:36 tsi Exp $ */ + +/* +static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13"; + */ + +/* + * Copyright 1986 by Sun Microsystems, Inc. + * + * kbd_mode: set keyboard encoding mode + */ + +#include <sys/types.h> +#include <sys/file.h> +#include <sys/ioctl.h> +#if defined(SVR4) || defined(__SVR4) || defined(__bsdi__) +#include <fcntl.h> +#ifndef __bsdi__ +#include <sys/kbio.h> +#include <sys/kbd.h> +#else +#include <unistd.h> +#include </sys/sparc/dev/kbio.h> +#include </sys/sparc/dev/kbd.h> +#endif +#else +#ifndef CSRG_BASED +#include <sundev/kbio.h> +#include <sundev/kbd.h> +#else +#include <machine/kbio.h> +#include <machine/kbd.h> +#endif +#endif +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +static void die(char*); +static void usage(void); +static int kbd_fd; + +int +main(argc, argv) + int argc; + char** argv; +{ + int code = 0, translate, direct = -1; + char led; + int click; + + if ((kbd_fd = open("/dev/kbd", O_RDONLY, 0)) < 0) { + die("Couldn't open /dev/kbd"); + } + argc--; argv++; + if (argc-- && **argv == '-') { + code = *(++*argv); + } else { + usage(); + } + switch (code) { + case 'a': + case 'A': + translate = TR_ASCII; + direct = 0; + break; + case 'e': + case 'E': + translate = TR_EVENT; + break; + case 'n': + case 'N': + translate = TR_NONE; + break; + case 'u': + case 'U': + translate = TR_UNTRANS_EVENT; + break; + default: + usage(); + } +#ifdef KIOCSLED + led = 0; + if (ioctl(kbd_fd, KIOCSLED, &led)) + die("Couldn't set LEDs"); +#endif +#ifdef KIOCCMD + click = KBD_CMD_NOCLICK; + if (ioctl(kbd_fd, KIOCCMD, &click)) + die("Couldn't set click"); +#endif + if (ioctl(kbd_fd, KIOCTRANS, (caddr_t) &translate)) + die("Couldn't set translation"); + if (direct != -1 && ioctl(kbd_fd, KIOCSDIRECT, (caddr_t) &direct)) + die("Couldn't set redirect"); + return 0; +} + +static void +die(char *msg) +{ + fprintf(stderr, "%s\n", msg); + exit(1); +} + +static void +usage(void) +{ + int translate; + + if (ioctl(kbd_fd, KIOCGTRANS, (caddr_t) &translate)) { + die("Couldn't inquire current translation"); + } + fprintf(stderr, "kbd_mode {-a | -e | -n | -u }\n"); + fprintf(stderr, "\tfor ascii, encoded (normal) SunView events,\n"); + fprintf(stderr, " \tnon-encoded, or unencoded SunView events, resp.\n"); + fprintf(stderr, "Current mode is %s.\n", + ( translate == 0 ? "n (non-translated bytes)" : + ( translate == 1 ? "a (ascii bytes)" : + ( translate == 2 ? "e (encoded events)" : + /* translate == 3 */ "u (unencoded events)")))); + exit(1); +} + + diff --git a/nx-X11/programs/Xserver/hw/sun/kbd_mode.man b/nx-X11/programs/Xserver/hw/sun/kbd_mode.man new file mode 100644 index 000000000..367b4fc9a --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/kbd_mode.man @@ -0,0 +1,53 @@ +.\" $Xorg: kbd_mode.man,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ +.\" Copyright 1987 Sun Microsystems, Inc. +.\" Copyright 1993, 1998 The Open Group +.\" +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation. +.\" +.\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of The Open Group shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealings in this Software without prior written authorization +.\" from The Open Group. +.\" +.\" $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.man,v 1.6 2001/01/27 18:20:41 dawes Exp $ +.\" +.TH KBD_MODE 1 __xorgversion__ +.SH NAME +kbd_mode \- recover the Sun console keyboard +.SH SYNOPSIS +.B kbd_mode +[ -a -e -n -u ] +.SH DESCRIPTION +.I Kbd_mode +resets the Sun console keyboard to a rational state. +.SH OPTIONS +The following options are supported, see \fIkb(4S)\fP for details: +.TP 8 +.B \-a +Causes ASCII to be reported. +.TP 8 +.B \-e +Causes \fIFirm_events\fP to be reported. +.TP 8 +.B \-n +Causes up/down key codes to be reported. +.TP 8 +.B \-u +Causes undecoded keyboard values to be reported. +.SH SEE ALSO +kb(4S) diff --git a/nx-X11/programs/Xserver/hw/sun/sun.h b/nx-X11/programs/Xserver/hw/sun/sun.h new file mode 100644 index 000000000..d01d0a1c2 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sun.h @@ -0,0 +1,446 @@ + +/* $Xorg: sun.h,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ + +/*- + * Copyright (c) 1987 by the Regents of the University of California + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +/* $XFree86: xc/programs/Xserver/hw/sun/sun.h,v 3.12 2001/07/25 15:05:01 dawes Exp $ */ + +#ifndef _SUN_H_ +#define _SUN_H_ + +/* X headers */ +#include <X11/Xos.h> +#undef index /* don't mangle silly Sun structure member names */ +#include <X11/X.h> +#include <X11/Xproto.h> + +/* general system headers */ +#ifndef NOSTDHDRS +# include <stdlib.h> +#else +# include <malloc.h> +extern char *getenv(); +#endif + +/* system headers common to both SunOS and Solaris */ +#include <sys/param.h> +#include <sys/file.h> +#include <sys/filio.h> +#include <sys/ioctl.h> +#include <sys/resource.h> + +#ifdef SVR4 +# ifdef X_POSIX_C_SOURCE +# define _POSIX_C_SOURCE X_POSIX_C_SOURCE +# include <signal.h> +# undef _POSIX_C_SOURCE +# else +# define _POSIX_SOURCE +# include <signal.h> +# undef _POSIX_SOURCE +# endif +#endif + +#include <fcntl.h> + +#ifndef __bsdi__ +# ifndef CSRG_BASED +# ifndef i386 +# include <poll.h> +# else +# include <sys/poll.h> +# endif +# endif +#else +# include <unistd.h> +#endif + +#include <errno.h> +#include <memory.h> +#include <signal.h> + + +/* + * Sun specific headers Sun moved in Solaris, and are different for NetBSD. + * + * Even if only needed by one source file, I have put them here + * to simplify finding them... + */ +#ifdef SVR4 +# include <sys/fbio.h> +# include <sys/kbd.h> +# include <sys/kbio.h> +# include <sys/msio.h> +# include <sys/vuid_event.h> +# include <sys/memreg.h> +# include <stropts.h> +# define usleep(usec) poll((struct pollfd *) 0, (size_t) 0, usec / 1000) +#else +# ifndef CSRG_BASED +# include <sun/fbio.h> +# include <sundev/kbd.h> +# include <sundev/kbio.h> +# include <sundev/msio.h> +# include <sundev/vuid_event.h> +# include <pixrect/pixrect.h> +# include <pixrect/memreg.h> +extern int ioctl(); +extern int getrlimit(); +extern int setrlimit(); +extern int getpagesize(); +# else +# if defined(CSRG_BASED) && !defined(__bsdi__) +# include <machine/fbio.h> +# include <machine/kbd.h> +# include <machine/kbio.h> +# include <machine/vuid_event.h> +# endif +# ifdef __bsdi__ +# include <sys/fbio.h> +# include </sys/sparc/dev/kbd.h> +# include </sys/sparc/dev/kbio.h> +# include </sys/sparc/dev/vuid_event.h> +# endif +# endif +#endif + +/* + * Sun doesn't see fit to add the TCX to <sys/fbio.h> + */ +#ifndef SVR4 +/* On SunOS 4.1.x the TCX pretends to be a CG3 */ +#define XFBTYPE_LASTPLUSONE FBTYPE_LASTPLUSONE +#else +#define XFBTYPE_TCX 21 +#define XFBTYPE_LASTPLUSONE 22 +#endif + +extern int gettimeofday(); + +/* + * Server specific headers + */ +#include "misc.h" +#undef abs /* don't munge function prototypes in headers, sigh */ +#include "scrnintstr.h" +#ifdef NEED_EVENTS +# include "inputstr.h" +#endif +#include "input.h" +#include "colormapst.h" +#include "colormap.h" +#include "cursorstr.h" +#include "cursor.h" +#include "dixstruct.h" +#include "dix.h" +#include "opaque.h" +#include "resource.h" +#include "servermd.h" +#include "windowstr.h" + +/* + * ddx specific headers + */ +#ifndef PSZ +#define PSZ 8 +#endif + +#include "mi/mibstore.h" +#include "mi/mipointer.h" + +extern int monitorResolution; + + +/* Frame buffer devices */ +#ifdef SVR4 +# define CGTWO0DEV "/dev/fbs/cgtwo0" +# define CGTWO1DEV "/dev/fbs/cgtwo1" +# define CGTWO2DEV "/dev/fbs/cgtwo2" +# define CGTWO3DEV "/dev/fbs/cgtwo3" +# define CGTHREE0DEV "/dev/fbs/cgthree0" +# define CGTHREE1DEV "/dev/fbs/cgthree1" +# define CGTHREE2DEV "/dev/fbs/cgthree2" +# define CGTHREE3DEV "/dev/fbs/cgthree3" +# define CGFOUR0DEV "/dev/fbs/cgfour0" +# define CGSIX0DEV "/dev/fbs/cgsix0" +# define CGSIX1DEV "/dev/fbs/cgsix1" +# define CGSIX2DEV "/dev/fbs/cgsix2" +# define CGSIX3DEV "/dev/fbs/cgsix3" +# define BWTWO0DEV "/dev/fbs/bwtwo0" +# define BWTWO1DEV "/dev/fbs/bwtwo1" +# define BWTWO2DEV "/dev/fbs/bwtwo2" +# define BWTWO3DEV "/dev/fbs/bwtwo3" +# define CGEIGHT0DEV "/dev/fbs/cgeight0" +# define TCX0DEV "/dev/fbs/tcx0" +#else +# define CGTWO0DEV "/dev/cgtwo0" +# define CGTWO1DEV "/dev/cgtwo1" +# define CGTWO2DEV "/dev/cgtwo2" +# define CGTWO3DEV "/dev/cgtwo3" +# define CGTHREE0DEV "/dev/cgthree0" +# define CGTHREE1DEV "/dev/cgthree1" +# define CGTHREE2DEV "/dev/cgthree2" +# define CGTHREE3DEV "/dev/cgthree3" +# define CGFOUR0DEV "/dev/cgfour0" +# define CGSIX0DEV "/dev/cgsix0" +# define CGSIX1DEV "/dev/cgsix1" +# define CGSIX2DEV "/dev/cgsix2" +# define CGSIX3DEV "/dev/cgsix3" +# define BWTWO0DEV "/dev/bwtwo0" +# define BWTWO1DEV "/dev/bwtwo1" +# define BWTWO2DEV "/dev/bwtwo2" +# define BWTWO3DEV "/dev/bwtwo3" +# define CGEIGHT0DEV "/dev/cgeight0" +#endif + +/* + * MAXEVENTS is the maximum number of events the mouse and keyboard functions + * will read on a given call to their GetEvents vectors. + */ +#define MAXEVENTS 32 + +/* + * Data private to any sun keyboard. + */ +typedef struct { + int fd; + int type; /* Type of keyboard */ + int layout; /* The layout of the keyboard */ + int click; /* kbd click save state */ + Leds leds; /* last known LED state */ +} sunKbdPrivRec, *sunKbdPrivPtr; + +extern sunKbdPrivRec sunKbdPriv; + +/* + * Data private to any sun pointer device. + */ +typedef struct { + int fd; + int bmask; /* last known button state */ +} sunPtrPrivRec, *sunPtrPrivPtr; + +extern sunPtrPrivRec sunPtrPriv; + +typedef struct { + BYTE key; + CARD8 modifiers; +} SunModmapRec; + +typedef struct { + int width, height; + Bool has_cursor; + CursorPtr pCursor; /* current cursor */ +} sunCursorRec, *sunCursorPtr; + +typedef struct { + ColormapPtr installedMap; + CloseScreenProcPtr CloseScreen; + void (*UpdateColormap)(); + void (*GetColormap)(); + sunCursorRec hardwareCursor; + Bool hasHardwareCursor; +} sunScreenRec, *sunScreenPtr; + +#define GetScreenPrivate(s) ((sunScreenPtr) ((s)->devPrivates[sunScreenIndex].ptr)) +#define SetupScreen(s) sunScreenPtr pPrivate = GetScreenPrivate(s) + +typedef struct { + unsigned char* fb; /* Frame buffer itself */ + int fd; /* frame buffer for ioctl()s, */ + struct fbtype info; /* Frame buffer characteristics */ + void (*EnterLeave)();/* screen switch */ + unsigned char* fbPriv; /* fbattr stuff, for the real type */ +} fbFd; + +typedef Bool (*sunFbInitProc)( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); + +typedef struct { + sunFbInitProc init; /* init procedure for this fb */ + char* name; /* /usr/include/fbio names */ +} sunFbDataRec; + +#ifdef XKB +extern Bool noXkbExtension; +#endif + +extern Bool sunAutoRepeatHandlersInstalled; +extern long sunAutoRepeatInitiate; +extern long sunAutoRepeatDelay; +extern sunFbDataRec sunFbData[]; +extern fbFd sunFbs[]; +extern Bool sunSwapLkeys; +extern Bool sunFlipPixels; +extern Bool sunActiveZaphod; +extern Bool sunFbInfo; +extern Bool sunCG4Frob; +extern Bool sunNoGX; +extern int sunScreenIndex; +extern int* sunProtected; + +extern Bool sunCursorInitialize( + ScreenPtr /* pScreen */ +); + +extern void sunDisableCursor( + ScreenPtr /* pScreen */ +); + +extern int sunChangeKbdTranslation( + int /* fd */, + Bool /* makeTranslated */ +); + +extern void sunNonBlockConsoleOff( +#if defined(SVR4) || defined(CSRG_BASED) + void +#else + char* /* arg */ +#endif +); + +extern void sunEnqueueEvents( + void +); + +extern int sunGXInit( + ScreenPtr /* pScreen */, + fbFd* /* fb */ +); + +extern Bool sunSaveScreen( + ScreenPtr /* pScreen */, + int /* on */ +); + +extern Bool sunScreenInit( + ScreenPtr /* pScreen */ +); + +extern pointer sunMemoryMap( + size_t /* len */, + off_t /* off */, + int /* fd */ +); + +extern Bool sunScreenAllocate( + ScreenPtr /* pScreen */ +); + +extern Bool sunInitCommon( + int /* scrn */, + ScreenPtr /* pScrn */, + off_t /* offset */, + Bool (* /* init1 */)(), + void (* /* init2 */)(), + Bool (* /* cr_cm */)(), + Bool (* /* save */)(), + int /* fb_off */ +); + +extern Firm_event* sunKbdGetEvents( + int /* fd */, + Bool /* on */, + int* /* pNumEvents */, + Bool* /* pAgain */ +); + +extern Firm_event* sunMouseGetEvents( + int /* fd */, + Bool /* on */, + int* /* pNumEvents */, + Bool* /* pAgain */ +); + +extern void sunKbdEnqueueEvent( + DeviceIntPtr /* device */, + Firm_event* /* fe */ +); + +extern void sunMouseEnqueueEvent( + DeviceIntPtr /* device */, + Firm_event* /* fe */ +); + +extern int sunKbdProc( + DeviceIntPtr /* pKeyboard */, + int /* what */ +); + +extern int sunMouseProc( + DeviceIntPtr /* pMouse */, + int /* what */ +); + +extern void sunKbdWait( + void +); + +/*- + * TVTOMILLI(tv) + * Given a struct timeval, convert its time into milliseconds... + */ +#define TVTOMILLI(tv) (((tv).tv_usec/1000)+((tv).tv_sec*1000)) + +extern Bool sunCfbSetupScreen( + ScreenPtr /* pScreen */, + pointer /* pbits */, /* pointer to screen bitmap */ + int /* xsize */, /* in pixels */ + int /* ysize */, + int /* dpix */, /* dots per inch */ + int /* dpiy */, /* dots per inch */ + int /* width */, /* pixel width of frame buffer */ + int /* bpp */ /* bits per pixel of root */ +); + +extern Bool sunCfbFinishScreenInit( + ScreenPtr /* pScreen */, + pointer /* pbits */, /* pointer to screen bitmap */ + int /* xsize */, /* in pixels */ + int /* ysize */, + int /* dpix */, /* dots per inch */ + int /* dpiy */, /* dots per inch */ + int /* width */, /* pixel width of frame buffer */ + int /* bpp */ /* bits per pixel of root */ +); + +extern Bool sunCfbScreenInit( + ScreenPtr /* pScreen */, + pointer /* pbits */, /* pointer to screen bitmap */ + int /* xsize */, /* in pixels */ + int /* ysize */, + int /* dpix */, /* dots per inch */ + int /* dpiy */, /* dots per inch */ + int /* width */, /* pixel width of frame buffer */ + int /* bpp */ /* bits per pixel of root */ +); + +extern void sunInstallColormap( + ColormapPtr /* cmap */ +); + +extern void sunUninstallColormap( + ColormapPtr /* cmap */ +); + +extern int sunListInstalledColormaps( + ScreenPtr /* pScreen */, + Colormap* /* pCmapList */ +); + +#endif diff --git a/nx-X11/programs/Xserver/hw/sun/sunCfb.c b/nx-X11/programs/Xserver/hw/sun/sunCfb.c new file mode 100644 index 000000000..5791e1e82 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunCfb.c @@ -0,0 +1,517 @@ + +/* $Xorg: sunCfb.c,v 1.5 2001/02/09 02:04:43 xorgcvs Exp $ */ + +/* +Copyright 1990, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +/* $XFree86: sunCfb.c,v 3.14 2001/12/14 19:59:42 dawes Exp $ */ + +/* + * Copyright 1987 by the Regents of the University of California + * Copyright 1987 by Adam de Boor, UC Berkeley + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +/****************************************************************/ +/* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ +/****************************************************************/ + +/* + * Copyright 1991, 1992, 1993 Kaleb S. Keithley + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. Kaleb S. Keithley makes no + * representations about the suitability of this software for + * any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include "sun.h" +#include "cfb/cfb.h" +#include "mi/miline.h" + +#define GXZEROLINEBIAS (OCTANT1 | OCTANT3 | OCTANT4 | OCTANT6) + +static void CGUpdateColormap(pScreen, dex, count, rmap, gmap, bmap) + ScreenPtr pScreen; + int dex, count; + u_char *rmap, *gmap, *bmap; +{ + struct fbcmap sunCmap; + + sunCmap.index = dex; + sunCmap.count = count; + sunCmap.red = &rmap[dex]; + sunCmap.green = &gmap[dex]; + sunCmap.blue = &bmap[dex]; + + if (ioctl(sunFbs[pScreen->myNum].fd, FBIOPUTCMAP, &sunCmap) < 0) { + Error("CGUpdateColormap"); + FatalError( "CGUpdateColormap: FBIOPUTCMAP failed\n" ); + } +} + +static void CGGetColormap(pScreen, dex, count, rmap, gmap, bmap) + ScreenPtr pScreen; + int dex, count; + u_char *rmap, *gmap, *bmap; +{ + struct fbcmap sunCmap; + + sunCmap.index = dex; + sunCmap.count = count; + sunCmap.red = &rmap[dex]; + sunCmap.green = &gmap[dex]; + sunCmap.blue = &bmap[dex]; + + if (ioctl(sunFbs[pScreen->myNum].fd, FBIOGETCMAP, &sunCmap) < 0) { + Error("CGGetColormap"); + FatalError( "CGGetColormap: FBIOGETCMAP failed\n" ); + } +} + +void sunInstallColormap(cmap) + ColormapPtr cmap; +{ + SetupScreen(cmap->pScreen); + register int i; + register Entry *pent; + register VisualPtr pVisual = cmap->pVisual; + u_char rmap[256], gmap[256], bmap[256]; + unsigned long rMask, gMask, bMask; + int oRed, oGreen, oBlue; + + if (cmap == pPrivate->installedMap) + return; + if (pPrivate->installedMap) + WalkTree(pPrivate->installedMap->pScreen, TellLostMap, + (pointer) &(pPrivate->installedMap->mid)); + if ((pVisual->class | DynamicClass) == DirectColor) { + if (pVisual->ColormapEntries < 256) { + rMask = pVisual->redMask; + gMask = pVisual->greenMask; + bMask = pVisual->blueMask; + oRed = pVisual->offsetRed; + oGreen = pVisual->offsetGreen; + oBlue = pVisual->offsetBlue; + } else { + rMask = gMask = bMask = 255; + oRed = oGreen = oBlue = 0; + } + for (i = 0; i < 256; i++) { + rmap[i] = cmap->red[(i & rMask) >> oRed].co.local.red >> 8; + gmap[i] = cmap->green[(i & gMask) >> oGreen].co.local.green >> 8; + bmap[i] = cmap->blue[(i & bMask) >> oBlue].co.local.blue >> 8; + } + } else { + (*pPrivate->GetColormap) (cmap->pScreen, 0, 256, rmap, gmap, bmap); + for (i = 0, pent = cmap->red; + i < pVisual->ColormapEntries; + i++, pent++) { + if (pent->fShared) { + rmap[i] = pent->co.shco.red->color >> 8; + gmap[i] = pent->co.shco.green->color >> 8; + bmap[i] = pent->co.shco.blue->color >> 8; + } + else if (pent->refcnt != 0) { + rmap[i] = pent->co.local.red >> 8; + gmap[i] = pent->co.local.green >> 8; + bmap[i] = pent->co.local.blue >> 8; + } + } + } + pPrivate->installedMap = cmap; + (*pPrivate->UpdateColormap) (cmap->pScreen, 0, 256, rmap, gmap, bmap); + WalkTree(cmap->pScreen, TellGainedMap, (pointer) &(cmap->mid)); +} + +void sunUninstallColormap(cmap) + ColormapPtr cmap; +{ + SetupScreen(cmap->pScreen); + if (cmap == pPrivate->installedMap) { + Colormap defMapID = cmap->pScreen->defColormap; + + if (cmap->mid != defMapID) { + ColormapPtr defMap = (ColormapPtr) LookupIDByType(defMapID, + RT_COLORMAP); + + if (defMap) + (*cmap->pScreen->InstallColormap)(defMap); + else + ErrorF("sunFbs: Can't find default colormap\n"); + } + } +} + +int sunListInstalledColormaps(pScreen, pCmapList) + ScreenPtr pScreen; + Colormap *pCmapList; +{ + SetupScreen(pScreen); + *pCmapList = pPrivate->installedMap->mid; + return (1); +} + +static void CGStoreColors(pmap, ndef, pdefs) + ColormapPtr pmap; + int ndef; + xColorItem *pdefs; +{ + SetupScreen(pmap->pScreen); + u_char rmap[256], gmap[256], bmap[256]; + xColorItem expanddefs[256]; + register int i; + + if (pPrivate->installedMap != NULL && pPrivate->installedMap != pmap) + return; + if ((pmap->pVisual->class | DynamicClass) == DirectColor) { + ndef = cfbExpandDirectColors(pmap, ndef, pdefs, expanddefs); + pdefs = expanddefs; + } + while (ndef--) { + i = pdefs->pixel; + rmap[i] = pdefs->red >> 8; + gmap[i] = pdefs->green >> 8; + bmap[i] = pdefs->blue >> 8; + (*pPrivate->UpdateColormap) (pmap->pScreen, i, 1, rmap, gmap, bmap); + pdefs++; + } +} + +static void CGScreenInit (pScreen) + ScreenPtr pScreen; +{ +#ifndef STATIC_COLOR /* { */ + SetupScreen (pScreen); + pScreen->InstallColormap = sunInstallColormap; + pScreen->UninstallColormap = sunUninstallColormap; + pScreen->ListInstalledColormaps = sunListInstalledColormaps; + pScreen->StoreColors = CGStoreColors; + pPrivate->UpdateColormap = CGUpdateColormap; + pPrivate->GetColormap = CGGetColormap; + if (sunFlipPixels) { + Pixel pixel = pScreen->whitePixel; + pScreen->whitePixel = pScreen->blackPixel; + pScreen->blackPixel = pixel; + } +#endif /* } */ +} + +static void checkMono (argc, argv) + int argc; + char** argv; +{ + int i; + + for (i = 1; i < argc; i++) + if (strcmp (argv[i], "-mono") == 0) + ErrorF ("-mono not appropriate for CG3/CG4/CG6\n"); +} + +/* + * CG3_MMAP_OFFSET is #defined in <pixrect/cg3var.h> or <sys/cg3var.h> + * on SunOS and Solaris respectively. Under Solaris, cg3var.h + * #includes a non-existent file, and causes the make to abort. Other + * systems may not have cg3var.h at all. Since all cg3var.h is needed + * for is this one #define, we'll just #define it here and let it go at that. + */ + +#define CG3_MMAP_OFFSET 0x04000000 + +Bool sunCG3Init (screen, pScreen, argc, argv) + int screen; /* what screen am I going to be */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char **argv; /* The arguments themselves. Don't change! */ +{ + checkMono (argc, argv); + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + return sunInitCommon (screen, pScreen, (off_t) CG3_MMAP_OFFSET, + sunCfbScreenInit, CGScreenInit, + cfbCreateDefColormap, sunSaveScreen, 0); +} + +Bool sunTCXInit (screen, pScreen, argc, argv) + int screen; /* what screen am I going to be */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char **argv; /* The arguments themselves. Don't change! */ +{ + checkMono (argc, argv); + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + return sunInitCommon (screen, pScreen, (off_t) 0, + sunCfbScreenInit, CGScreenInit, + cfbCreateDefColormap, sunSaveScreen, 0); +} + +#if !defined(i386) /* { */ + +#ifdef SVR4 /* { */ +#ifdef INCLUDE_CG2_HEADER /* { */ +#include <sys/cg2reg.h> +#endif /* } INCLUDE_CG2_HEADER */ +#else +#ifndef CSRG_BASED /* { */ +#include <pixrect/cg2reg.h> +#else +#if defined(__sparc__) || defined(__sparc) /* { */ +#if !defined(__bsdi__) +#include <machine/cgtworeg.h> +#endif +#else +#include <machine/cg2reg.h> +#endif /* } */ +#endif /* } */ +#endif /* } */ + +#ifdef INCLUDE_CG2_HEADER +typedef struct { + struct cg2memfb mem; + struct cg2fb regs; +} *CG2Ptr; + +static void CG2UpdateColormap(pScreen, index, count, rmap, gmap,bmap) + ScreenPtr pScreen; + int index, count; + u_char *rmap, *gmap, *bmap; +{ + CG2Ptr fb = (CG2Ptr) sunFbs[pScreen->myNum].fb; + volatile struct cg2statusreg *regp = &fb->regs.status.reg; + + regp->update_cmap = 0; + while (count--) { + fb->regs.redmap[index] = rmap[index]; + fb->regs.greenmap[index] = gmap[index]; + fb->regs.bluemap[index] = bmap[index]; + index++; + } + regp->update_cmap = 1; +} + +static void CG2GetColormap(pScreen, index, count, rmap, gmap,bmap) + ScreenPtr pScreen; + int index, count; + u_char *rmap, *gmap, *bmap; +{ + CG2Ptr fb = (CG2Ptr) sunFbs[pScreen->myNum].fb; + + /* I don't even know if this works */ + while (count--) { + rmap[index] = fb->regs.redmap[index]; + gmap[index] = fb->regs.greenmap[index]; + bmap[index] = fb->regs.bluemap[index]; + index++; + } +} + +static Bool CG2SaveScreen (pScreen, on) + ScreenPtr pScreen; + int on; +{ + CG2Ptr fb = (CG2Ptr) sunFbs[pScreen->myNum].fb; + volatile struct cg2statusreg *regp = &fb->regs.status.reg; + + if (on != SCREEN_SAVER_FORCER) + regp->video_enab = (on == SCREEN_SAVER_ON) ? 0 : 1; + return TRUE; +} + +static void CG2ScreenInit (pScreen) + ScreenPtr pScreen; +{ + SetupScreen (pScreen); + CGScreenInit (pScreen); + pPrivate->UpdateColormap = CG2UpdateColormap; + pPrivate->GetColormap = CG2GetColormap; +} + +Bool sunCG2Init (screen, pScreen, argc, argv) + int screen; /* what screen am I going to be */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char** argv; /* The arguments themselves. Don't change! */ +{ + int i; + Bool ret; + Bool mono = FALSE; + + for (i = 1; i < argc; i++) + if (strcmp (argv[i], "-mono") == 0) + mono = TRUE; + + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + pScreen->SaveScreen = CG2SaveScreen; + if (mono) { + pScreen->whitePixel = 0; + pScreen->blackPixel = 1; + ret = sunInitCommon (screen, pScreen, (off_t) 0, + mfbScreenInit, NULL, + mfbCreateDefColormap, CG2SaveScreen, 0); + ((CG2Ptr) sunFbs[screen].fb)->regs.ppmask.reg = 1; + } else { + ret = sunInitCommon (screen, pScreen, (off_t) 0, + sunCfbScreenInit, CG2ScreenInit, + cfbCreateDefColormap, CG2SaveScreen, + (int) &((struct cg2memfb *) 0)->pixplane); + ((CG2Ptr) sunFbs[screen].fb)->regs.ppmask.reg = 0xFF; + } + return ret; +} +#endif /* INCLUDE_CG2_HEADER */ + +#define CG4_HEIGHT 900 +#define CG4_WIDTH 1152 + +#define CG4_MELEN (128*1024) + +typedef struct { + u_char mpixel[CG4_MELEN]; /* bit-per-pixel memory */ + u_char epixel[CG4_MELEN]; /* enable plane */ + u_char cpixel[CG4_HEIGHT][CG4_WIDTH]; /* byte-per-pixel memory */ +} *CG4Ptr; + +static void CG4Switch (pScreen, select) + ScreenPtr pScreen; + int select; +{ + CG4Ptr fb = (CG4Ptr) sunFbs[pScreen->myNum].fb; + + (void) memset ((char *)fb->epixel, select ? ~0 : 0, CG4_MELEN); +} + +Bool sunCG4Init (screen, pScreen, argc, argv) + int screen; /* what screen am I going to be */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char** argv; /* The arguments themselves. Don't change! */ +{ + checkMono (argc, argv); + if (sunCG4Frob) + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + else + sunFbs[screen].EnterLeave = CG4Switch; + return sunInitCommon (screen, pScreen, (off_t) 0, + sunCfbScreenInit, CGScreenInit, + cfbCreateDefColormap, sunSaveScreen, (int) ((CG4Ptr) 0)->cpixel); +} + +#ifdef FBTYPE_SUNFAST_COLOR /* { */ + +#define CG6_MMAP_OFFSET 0x70000000 +#define CG6_IMAGE_OFFSET 0x16000 + +Bool sunCG6Init (screen, pScreen, argc, argv) + int screen; /* The index of pScreen in the ScreenInfo */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char** argv; /* The arguments themselves. Don't change! */ +{ + pointer fb; + + checkMono (argc, argv); + if (!sunScreenAllocate (pScreen)) + return FALSE; + if (!sunFbs[screen].fb) { +/* Sun's VME, Sbus, and SVR4 drivers all return different values */ +#define FBSIZE (size_t) sunFbs[screen].info.fb_width * \ + sunFbs[screen].info.fb_height + CG6_IMAGE_OFFSET + if ((fb = sunMemoryMap (FBSIZE, + (off_t) CG6_MMAP_OFFSET, + sunFbs[screen].fd)) == NULL) + return FALSE; + sunFbs[screen].fb = fb; +#undef FBSIZE + } + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + if (!sunCfbSetupScreen (pScreen, + sunFbs[screen].fb + CG6_IMAGE_OFFSET, + sunFbs[screen].info.fb_width, + sunFbs[screen].info.fb_height, + monitorResolution, monitorResolution, + sunFbs[screen].info.fb_width, + sunFbs[screen].info.fb_depth)) + return FALSE; + if (sunNoGX == FALSE) { + if (!sunGXInit (pScreen, &sunFbs[screen])) + return FALSE; + } + if (!sunCfbFinishScreenInit(pScreen, + sunFbs[screen].fb + CG6_IMAGE_OFFSET, + sunFbs[screen].info.fb_width, + sunFbs[screen].info.fb_height, + monitorResolution, monitorResolution, + sunFbs[screen].info.fb_width, + sunFbs[screen].info.fb_depth)) + return FALSE; + if (sunNoGX == FALSE) { + miSetZeroLineBias(pScreen, GXZEROLINEBIAS); + } + miInitializeBackingStore(pScreen); + CGScreenInit (pScreen); + if (!sunScreenInit (pScreen)) + return FALSE; + sunSaveScreen (pScreen, SCREEN_SAVER_OFF); + return cfbCreateDefColormap(pScreen); +} +#endif /* } */ +#endif /* } */ diff --git a/nx-X11/programs/Xserver/hw/sun/sunCfb24.c b/nx-X11/programs/Xserver/hw/sun/sunCfb24.c new file mode 100644 index 000000000..fa3a58e85 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunCfb24.c @@ -0,0 +1,139 @@ +/* $Xorg: sunCfb24.c,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ */ + +/* + +Copyright 1994, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X +CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings in +this Software without prior written authorization from The Open Group. + +*/ +/* $XFree86: xc/programs/Xserver/hw/sun/sunCfb24.c,v 1.2 2001/10/28 03:33:10 tsi Exp $ */ + +/* + * The CG8 is similar to the CG4 in that it has a mono plane, an enable + * plane, and a color plane. While the CG4 only has an 8-bit color + * plane the CG8 has a 24-bit color plane. + * + * If you have a CG4 you know that you can switch between the mono and + * the color screens merely by dragging the pointer off the edge of the + * screen, causing the other screen to be switched in. However this is + * the cause of some consternation on the part of those people who have + * both a CG4 and another frame buffer. + * + * Because of this problem, and some other considerations, I have chosen + * to ignore the mono plane of the CG8 in this code. + */ + +#define PSZ 32 +#include "sun.h" +#include "cfb/cfb.h" + +#define PIXPG_24BIT_COLOR 5 +#define PIXPG_24BIT_COLOR_INDEX (PIXPG_24BIT_COLOR << 25) +#define PR_FORCE_UPDATE (1 << 24) + +static void CG24UpdateColormap(pScreen, index, count, rmap, gmap, bmap) + ScreenPtr pScreen; + int index, count; + u_char *rmap, *gmap, *bmap; +{ + struct fbcmap sunCmap; + + sunCmap.index = index | PIXPG_24BIT_COLOR_INDEX | PR_FORCE_UPDATE; + sunCmap.count = count; + sunCmap.red = &rmap[index]; + sunCmap.green = &gmap[index]; + sunCmap.blue = &bmap[index]; + + if (ioctl(sunFbs[pScreen->myNum].fd, FBIOPUTCMAP, &sunCmap) == -1) + FatalError( "CG24UpdateColormap: FBIOPUTCMAP failed\n"); +} + +static void CG24StoreColors (pmap, ndef, pdefs) + ColormapPtr pmap; + int ndef; + xColorItem* pdefs; +{ + u_char rmap[256], gmap[256], bmap[256]; + SetupScreen (pmap->pScreen); + VisualPtr pVisual = pmap->pVisual; + int i; + + if (pPrivate->installedMap != NULL && pPrivate->installedMap != pmap) + return; + for (i = 0; i < 256; i++) { + rmap[i] = pmap->red[i].co.local.red >> 8; + gmap[i] = pmap->green[i].co.local.green >> 8; + bmap[i] = pmap->blue[i].co.local.blue >> 8; + } + while (ndef--) { + i = pdefs->pixel; + if (pdefs->flags & DoRed) + rmap[(i & pVisual->redMask) >> pVisual->offsetRed] = (pdefs->red >> 8); + if (pdefs->flags & DoGreen) + gmap[(i & pVisual->greenMask) >> pVisual->offsetGreen] = (pdefs->green >> 8); + if (pdefs->flags & DoBlue) + bmap[(i & pVisual->blueMask) >> pVisual->offsetBlue] = (pdefs->blue >> 8); + pdefs++; + } + CG24UpdateColormap (pmap->pScreen, 0, 256, rmap, gmap, bmap); +} + +#define CG8_COLOR_OFFSET 0x40000 + +static void CG24ScreenInit (pScreen) + ScreenPtr pScreen; +{ +#ifndef STATIC_COLOR + SetupScreen (pScreen); +#endif + int i; + + /* Make sure the overlay plane is disabled */ + for (i = 0; i < CG8_COLOR_OFFSET; i++) + sunFbs[pScreen->myNum].fb[i] = 0; + +#ifndef STATIC_COLOR + pScreen->InstallColormap = sunInstallColormap; + pScreen->UninstallColormap = sunUninstallColormap; + pScreen->ListInstalledColormaps = sunListInstalledColormaps; + pScreen->StoreColors = CG24StoreColors; + pPrivate->UpdateColormap = CG24UpdateColormap; + if (sunFlipPixels) { + Pixel pixel = pScreen->whitePixel; + pScreen->whitePixel = pScreen->blackPixel; + pScreen->blackPixel = pixel; + } +#endif +} + +Bool sunCG8Init (screen, pScreen, argc, argv) + int screen; /* what screen am I going to be */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char **argv; /* The arguments themselves. Don't change! */ +{ + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + return sunInitCommon (screen, pScreen, (off_t) 0, + cfb32ScreenInit, CG24ScreenInit, + cfbCreateDefColormap, sunSaveScreen, CG8_COLOR_OFFSET); +} + diff --git a/nx-X11/programs/Xserver/hw/sun/sunCursor.c b/nx-X11/programs/Xserver/hw/sun/sunCursor.c new file mode 100644 index 000000000..2d653c753 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunCursor.c @@ -0,0 +1,281 @@ +/* $Xorg: sunCursor.c,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ */ +/* + +Copyright 1988 Sun Microsystems, Inc. +Copyright 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ +/* $XFree86: xc/programs/Xserver/hw/sun/sunCursor.c,v 3.5 2001/12/14 19:59:43 dawes Exp $ */ + +/*- + * sunCursor.c -- + * Functions for maintaining the Sun software cursor... + * + */ + +#define NEED_EVENTS +#include "sun.h" +#include "cfb.h" +#include "mfb.h" + +#ifdef FBIOGCURMAX /* has hardware cursor kernel support */ + +#define GetCursorPrivate(s) (&(GetScreenPrivate(s)->hardwareCursor)) +#define SetupCursor(s) sunCursorPtr pCurPriv = GetCursorPrivate(s) + +static void sunLoadCursor(); + +static Bool +sunRealizeCursor (pScreen, pCursor) + ScreenPtr pScreen; + CursorPtr pCursor; +{ + SetupCursor(pScreen); + int x, y; + + /* miRecolorCursor does this */ + if (pCurPriv->pCursor == pCursor) + { + miPointerPosition (&x, &y); + sunLoadCursor (pScreen, pCursor, x, y); + } + return TRUE; +} + +static Bool +sunUnrealizeCursor (pScreen, pCursor) + ScreenPtr pScreen; + CursorPtr pCursor; +{ + return TRUE; +} + +static void +sunCursorRepad (pScreen, bits, src_bits, dst_bits, ptSrc, w, h) + ScreenPtr pScreen; + CursorBitsPtr bits; + unsigned char *src_bits, *dst_bits; + DDXPointPtr ptSrc; + int w, h; +{ + PixmapPtr src, dst; + BoxRec box; + RegionRec rgnDst; + + if (!(src = GetScratchPixmapHeader(pScreen, bits->width, bits->height, + /*bpp*/ 1, /*depth*/ 1, + PixmapBytePad(bits->width,1), src_bits))) + return; + if (!(dst = GetScratchPixmapHeader(pScreen, w, h, /*bpp*/ 1, /*depth*/ 1, + PixmapBytePad(w,1), dst_bits))) + { + FreeScratchPixmapHeader(src); + return; + } + box.x1 = 0; + box.y1 = 0; + box.x2 = w; + box.y2 = h; + REGION_INIT(pScreen, &rgnDst, &box, 1); + mfbDoBitblt(&src->drawable, &dst->drawable, GXcopy, &rgnDst, ptSrc); + REGION_UNINIT(pScreen, &rgnDst); + FreeScratchPixmapHeader(src); + FreeScratchPixmapHeader(dst); +} + +static void +sunLoadCursor (pScreen, pCursor, x, y) + ScreenPtr pScreen; + CursorPtr pCursor; + int x, y; +{ + SetupCursor(pScreen); + struct fbcursor fbcursor; + int w, h; + unsigned char r[2], g[2], b[2]; + DDXPointRec ptSrc; + unsigned char source_temp[1024], mask_temp[1024]; + + fbcursor.set = FB_CUR_SETALL; + fbcursor.enable = 1; + fbcursor.pos.x = x; + fbcursor.pos.y = y; + fbcursor.hot.x = pCursor->bits->xhot; + fbcursor.hot.y = pCursor->bits->yhot; + r[0] = pCursor->backRed >> 8; + g[0] = pCursor->backGreen >> 8; + b[0] = pCursor->backBlue >> 8; + r[1] = pCursor->foreRed >> 8; + g[1] = pCursor->foreGreen >> 8; + b[1] = pCursor->foreBlue >> 8; + fbcursor.cmap.index = 0; + fbcursor.cmap.count = 2; + fbcursor.cmap.red = r; + fbcursor.cmap.green = g; + fbcursor.cmap.blue = b; + fbcursor.image = (char *) pCursor->bits->source; + fbcursor.mask = (char *) pCursor->bits->mask; + w = pCursor->bits->width; + h = pCursor->bits->height; + if (w > pCurPriv->width || h > pCurPriv->height) { + ptSrc.x = 0; + ptSrc.y = 0; + if (w > pCurPriv->width) + w = pCurPriv->width; + if (h > pCurPriv->height) + h = pCurPriv->height; + sunCursorRepad (pScreen, pCursor->bits, pCursor->bits->source, + source_temp, &ptSrc, w, h); + sunCursorRepad (pScreen, pCursor->bits, pCursor->bits->mask, + mask_temp, &ptSrc, w, h); + fbcursor.image = (char *) source_temp; + fbcursor.mask = (char *) mask_temp; + } + fbcursor.size.x = w; + fbcursor.size.y = h; +#ifndef Lynx + (void) ioctl (sunFbs[pScreen->myNum].fd, FBIOSCURSOR, &fbcursor); +#else + (void) sunIoctl (&sunFbs[pScreen->myNum], FBIOSCURSOR, &fbcursor); +#endif +} + +static void +sunSetCursor (pScreen, pCursor, x, y) + ScreenPtr pScreen; + CursorPtr pCursor; + int x, y; +{ + SetupCursor(pScreen); + + if (pCursor) + sunLoadCursor (pScreen, pCursor, x, y); + else + sunDisableCursor (pScreen); + pCurPriv->pCursor = pCursor; +} + +static void +sunMoveCursor (pScreen, x, y) + ScreenPtr pScreen; + int x, y; +{ + struct fbcurpos pos; + + pos.x = x; + pos.y = y; +#ifndef Lynx + ioctl (sunFbs[pScreen->myNum].fd, FBIOSCURPOS, &pos); +#else + sunIoctl (&sunFbs[pScreen->myNum], FBIOSCURPOS, &pos); +#endif +} + +miPointerSpriteFuncRec sunPointerSpriteFuncs = { + sunRealizeCursor, + sunUnrealizeCursor, + sunSetCursor, + sunMoveCursor, +}; + +static void +sunQueryBestSize (class, pwidth, pheight, pScreen) + int class; + unsigned short *pwidth, *pheight; + ScreenPtr pScreen; +{ + SetupCursor (pScreen); + + switch (class) + { + case CursorShape: + if (*pwidth > pCurPriv->width) + *pwidth = pCurPriv->width; + if (*pheight > pCurPriv->height) + *pheight = pCurPriv->height; + if (*pwidth > pScreen->width) + *pwidth = pScreen->width; + if (*pheight > pScreen->height) + *pheight = pScreen->height; + break; + default: + mfbQueryBestSize (class, pwidth, pheight, pScreen); + break; + } +} + +extern miPointerScreenFuncRec sunPointerScreenFuncs; + +#endif + +Bool sunCursorInitialize ( + ScreenPtr pScreen) +{ +#ifdef FBIOGCURMAX + SetupCursor (pScreen); + struct fbcurpos maxsize; + + pCurPriv->has_cursor = FALSE; +#ifndef Lynx + if (ioctl (sunFbs[pScreen->myNum].fd, FBIOGCURMAX, &maxsize) == -1) +#else + if (sunIoctl (&sunFbs[pScreen->myNum], FBIOGCURMAX, &maxsize) == -1) +#endif + return FALSE; + pCurPriv->width = maxsize.x; + pCurPriv->height= maxsize.y; + pScreen->QueryBestSize = sunQueryBestSize; + miPointerInitialize (pScreen, + &sunPointerSpriteFuncs, + &sunPointerScreenFuncs, + FALSE); + pCurPriv->has_cursor = TRUE; + pCurPriv->pCursor = NULL; + return TRUE; +#else + return FALSE; +#endif +} + +void sunDisableCursor ( + ScreenPtr pScreen) +{ +#ifdef FBIOGCURMAX + SetupCursor (pScreen); + struct fbcursor fbcursor; + + if (pCurPriv->has_cursor) + { + fbcursor.set = FB_CUR_SETCUR; + fbcursor.enable = 0; +#ifndef Lynx + (void) ioctl (sunFbs[pScreen->myNum].fd, FBIOSCURSOR, &fbcursor); +#else + (void) sunIoctl (&sunFbs[pScreen->myNum], FBIOSCURSOR, &fbcursor); +#endif + pCurPriv->pCursor = NULL; + } +#endif +} diff --git a/nx-X11/programs/Xserver/hw/sun/sunFbs.c b/nx-X11/programs/Xserver/hw/sun/sunFbs.c new file mode 100644 index 000000000..1acf2517b --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunFbs.c @@ -0,0 +1,259 @@ + +/* $Xorg: sunFbs.c,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ */ + +/* +Copyright 1990, 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +/* + * Copyright 1987 by the Regents of the University of California + * Copyright 1987 by Adam de Boor, UC Berkeley + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +/* $XFree86: xc/programs/Xserver/hw/sun/sunFbs.c,v 1.7 2002/12/06 00:28:50 tsi Exp $ */ + +/****************************************************************/ +/* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ +/****************************************************************/ + +#include "sun.h" +#include <sys/mman.h> + +int sunScreenIndex; + +static unsigned long generation = 0; + +pointer sunMemoryMap ( + size_t len, + off_t off, + int fd) +{ + int pagemask, mapsize; + caddr_t addr; + pointer mapaddr; + +#ifdef SVR4 + pagemask = sysconf(_SC_PAGESIZE) - 1; +#else + pagemask = getpagesize() - 1; +#endif + mapsize = ((int) len + pagemask) & ~pagemask; + addr = 0; + +#if !defined(__bsdi__) && !defined(_MAP_NEW) && !defined(__NetBSD__) && !defined(__OpenBSD__) + if ((addr = (caddr_t) valloc (mapsize)) == NULL) { + Error ("Couldn't allocate frame buffer memory"); + (void) close (fd); + return NULL; + } +#endif + +#if !defined(__NetBSD__) && !defined(__OpenBSD__) + /* + * try and make it private first, that way once we get it, an + * interloper, e.g. another server, can't get this frame buffer, + * and if another server already has it, this one won't. + */ + if ((int)(mapaddr = (pointer) mmap (addr, + mapsize, + PROT_READ | PROT_WRITE, MAP_PRIVATE, + fd, off)) == -1) +#endif + mapaddr = (pointer) mmap (addr, + mapsize, + PROT_READ | PROT_WRITE, MAP_SHARED, + fd, off); + if (mapaddr == (pointer) -1) { + Error ("mapping frame buffer memory"); + (void) close (fd); + mapaddr = (pointer) NULL; + } + return mapaddr; +} + +Bool sunScreenAllocate ( + ScreenPtr pScreen) +{ + sunScreenPtr pPrivate; + extern int AllocateScreenPrivateIndex(); + + if (generation != serverGeneration) + { + sunScreenIndex = AllocateScreenPrivateIndex(); + if (sunScreenIndex < 0) + return FALSE; + generation = serverGeneration; + } + pPrivate = (sunScreenPtr) xalloc (sizeof (sunScreenRec)); + if (!pPrivate) + return FALSE; + + pScreen->devPrivates[sunScreenIndex].ptr = (pointer) pPrivate; + return TRUE; +} + +Bool sunSaveScreen ( + ScreenPtr pScreen, + int on) +{ + int state; + + if (on != SCREEN_SAVER_FORCER) + { + if (on == SCREEN_SAVER_ON) + state = 0; + else + state = 1; + (void) ioctl(sunFbs[pScreen->myNum].fd, FBIOSVIDEO, &state); + } + return( TRUE ); +} + +static Bool closeScreen (i, pScreen) + int i; + ScreenPtr pScreen; +{ + SetupScreen(pScreen); + Bool ret; + + (void) OsSignal (SIGIO, SIG_IGN); + sunDisableCursor (pScreen); + pScreen->CloseScreen = pPrivate->CloseScreen; + ret = (*pScreen->CloseScreen) (i, pScreen); + (void) (*pScreen->SaveScreen) (pScreen, SCREEN_SAVER_OFF); + xfree ((pointer) pPrivate); + return ret; +} + +Bool sunScreenInit ( + ScreenPtr pScreen) +{ + SetupScreen(pScreen); + extern void sunBlockHandler(); + extern void sunWakeupHandler(); + static ScreenPtr autoRepeatScreen; + extern miPointerScreenFuncRec sunPointerScreenFuncs; + + pPrivate->installedMap = 0; + pPrivate->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = closeScreen; + pScreen->SaveScreen = sunSaveScreen; +#ifdef XKB + if (noXkbExtension) { +#endif + /* + * Block/Unblock handlers + */ + if (sunAutoRepeatHandlersInstalled == FALSE) { + autoRepeatScreen = pScreen; + sunAutoRepeatHandlersInstalled = TRUE; + } + + if (pScreen == autoRepeatScreen) { + pScreen->BlockHandler = sunBlockHandler; + pScreen->WakeupHandler = sunWakeupHandler; + } +#ifdef XKB + } +#endif + if (!sunCursorInitialize (pScreen)) + miDCInitialize (pScreen, &sunPointerScreenFuncs); + return TRUE; +} + +Bool sunInitCommon ( + int scrn, + ScreenPtr pScrn, + off_t offset, + Bool (*init1)(), + void (*init2)(), + Bool (*cr_cm)(), + Bool (*save)(), + int fb_off) +{ + unsigned char* fb = sunFbs[scrn].fb; + + if (!sunScreenAllocate (pScrn)) + return FALSE; + if (!fb) { + if ((fb = sunMemoryMap ((size_t) sunFbs[scrn].info.fb_size, + offset, + sunFbs[scrn].fd)) == NULL) + return FALSE; + sunFbs[scrn].fb = fb; + } + /* mfbScreenInit() or cfbScreenInit() */ + if (!(*init1)(pScrn, fb + fb_off, + sunFbs[scrn].info.fb_width, + sunFbs[scrn].info.fb_height, + monitorResolution, monitorResolution, + sunFbs[scrn].info.fb_width, + sunFbs[scrn].info.fb_depth)) + return FALSE; + miInitializeBackingStore(pScrn); + /* sunCGScreenInit() if cfb... */ + if (init2) + (*init2)(pScrn); + if (!sunScreenInit(pScrn)) + return FALSE; + (void) (*save) (pScrn, SCREEN_SAVER_OFF); + return (*cr_cm)(pScrn); +} + diff --git a/nx-X11/programs/Xserver/hw/sun/sunGX.c b/nx-X11/programs/Xserver/hw/sun/sunGX.c new file mode 100644 index 000000000..b6ecaac57 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunGX.c @@ -0,0 +1,2906 @@ +/* +static char *rid="$Xorg: sunGX.c,v 1.5 2001/02/09 02:04:44 xorgcvs Exp $"; + */ +/* +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author: Keith Packard, MIT X Consortium + */ + +/* $XFree86: xc/programs/Xserver/hw/sun/sunGX.c,v 1.8 2003/07/19 13:22:28 tsi Exp $ */ + +#include "sun.h" + +#include <X11/Xmd.h> +#include "gcstruct.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "mistruct.h" +#include <X11/fonts/fontstruct.h> +#include "dixfontstr.h" +#include "cfb/cfb.h" +#include "cfb/cfbmskbits.h" +#include "cfb/cfb8bit.h" +#include "fastblt.h" +#include "mergerop.h" +#include "sunGX.h" +#include "migc.h" +#include "mispans.h" + +#define sunGXFillSpan(gx,y,x1,x2,r) {\ + (gx)->apointy = (y); \ + (gx)->apointx = (x1); \ + (gx)->arectx = (x2); \ + GXDrawDone(gx,r); \ +} + +#define GXSetClip(gx,pbox) {\ + (gx)->clipminx = (pbox)->x1; \ + (gx)->clipminy = (pbox)->y1; \ + (gx)->clipmaxx = (pbox)->x2 - 1; \ + (gx)->clipmaxy = (pbox)->y2 - 1; \ +} + +#define GXSetOff(gx,x,y) {\ + (gx)->offx = (x); \ + (gx)->offy = (y); \ +} + +#define GXResetClip(gx,pScreen) { \ + (gx)->clipminx = 0; \ + (gx)->clipminy = 0; \ + (gx)->clipmaxx = (pScreen)->width - 1; \ + (gx)->clipmaxy = (pScreen)->height - 1; \ +} + +#define GXResetOff(gx) {\ + (gx)->offx = 0; \ + (gx)->offy = 0; \ +} + +#define sunGXGetAddrRange(pDrawable,extents,base,lo,hi) {\ + int __x__; \ + cfbGetWindowByteWidthAndPointer((WindowPtr)pDrawable,__x__,base); \ + lo = (base) + WIDTH_MUL((extents)->y1) + (extents)->x1; \ + hi = (base) + WIDTH_MUL((extents)->y2 - 1) + (extents)->x2 - 1; \ + (base) = (base) + WIDTH_MUL(pDrawable->y) + pDrawable->x; \ +} + +/* + rop_tables + ========== + lookup tables for GX raster ops, with the plane_mask,pixel_mask,pattern_mask + ,attrib_sel, polygon_draw,raster_mode encoded into the top half. + There is a lookup table for each commonly used combination. +*/ + +/* rops for bit blit / copy area + with: + Plane Mask - use plane mask reg. + Pixel Mask - use all ones. + Patt Mask - use all ones. +*/ + +#define POLY_O GX_POLYG_OVERLAP +#define POLY_N GX_POLYG_NONOVERLAP + +#define ROP_STANDARD (GX_PLANE_MASK |\ + GX_PIXEL_ONES |\ + GX_ATTR_SUPP |\ + GX_RAST_BOOL |\ + GX_PLOT_PLOT) + +/* fg = don't care bg = don't care */ + +#define ROP_BLIT(O,I) (ROP_STANDARD | \ + GX_PATTERN_ONES |\ + GX_ROP_11_1(I) |\ + GX_ROP_11_0(O) |\ + GX_ROP_10_1(I) |\ + GX_ROP_10_0(O) |\ + GX_ROP_01_1(I) |\ + GX_ROP_01_0(O) |\ + GX_ROP_00_1(I) |\ + GX_ROP_00_0(O)) + +/* fg = fgPixel bg = don't care */ + +#define ROP_FILL(O,I) (ROP_STANDARD | \ + GX_PATTERN_ONES |\ + GX_ROP_11_1(I) |\ + GX_ROP_11_0(I) |\ + GX_ROP_10_1(I) |\ + GX_ROP_10_0(I) | \ + GX_ROP_01_1(O) |\ + GX_ROP_01_0(O) |\ + GX_ROP_00_1(O) |\ + GX_ROP_00_0(O)) + +/* fg = fgPixel bg = don't care */ + +#define ROP_STIP(O,I) (ROP_STANDARD |\ + GX_ROP_11_1(I) |\ + GX_ROP_11_0(GX_ROP_NOOP) |\ + GX_ROP_10_1(I) |\ + GX_ROP_10_0(GX_ROP_NOOP) | \ + GX_ROP_01_1(O) |\ + GX_ROP_01_0(GX_ROP_NOOP) |\ + GX_ROP_00_1(O) |\ + GX_ROP_00_0(GX_ROP_NOOP)) + +/* fg = fgPixel bg = bgPixel */ + +#define ROP_OSTP(O,I) (ROP_STANDARD |\ + GX_ROP_11_1(I) |\ + GX_ROP_11_0(I) |\ + GX_ROP_10_1(I) |\ + GX_ROP_10_0(O) |\ + GX_ROP_01_1(O) |\ + GX_ROP_01_0(I) |\ + GX_ROP_00_1(O) |\ + GX_ROP_00_0(O)) + +#define ROP_ITXT(O,I) (ROP_STANDARD |\ + GX_PATTERN_ONES |\ + GX_ROP_11_1(I) |\ + GX_ROP_11_0(I) |\ + GX_ROP_10_1(I) |\ + GX_ROP_10_0(O) |\ + GX_ROP_01_1(O) |\ + GX_ROP_01_0(I) |\ + GX_ROP_00_1(O) |\ + GX_ROP_00_0(O)) + +#define ROP_PTXT(O,I) (ROP_STANDARD |\ + GX_PATTERN_ONES |\ + GX_ROP_11_1(I) |\ + GX_ROP_11_0(GX_ROP_NOOP) |\ + GX_ROP_10_1(I) |\ + GX_ROP_10_0(GX_ROP_NOOP) | \ + GX_ROP_01_1(O) |\ + GX_ROP_01_0(GX_ROP_NOOP) |\ + GX_ROP_00_1(O) |\ + GX_ROP_00_0(GX_ROP_NOOP)) + +static Uint gx_blit_rop_table[16]={ + ROP_BLIT(GX_ROP_CLEAR, GX_ROP_CLEAR), /* GXclear */ + ROP_BLIT(GX_ROP_CLEAR, GX_ROP_NOOP), /* GXand */ + ROP_BLIT(GX_ROP_CLEAR, GX_ROP_INVERT), /* GXandReverse */ + ROP_BLIT(GX_ROP_CLEAR, GX_ROP_SET), /* GXcopy */ + ROP_BLIT(GX_ROP_NOOP, GX_ROP_CLEAR), /* GXandInverted */ + ROP_BLIT(GX_ROP_NOOP, GX_ROP_NOOP), /* GXnoop */ + ROP_BLIT(GX_ROP_NOOP, GX_ROP_INVERT), /* GXxor */ + ROP_BLIT(GX_ROP_NOOP, GX_ROP_SET), /* GXor */ + ROP_BLIT(GX_ROP_INVERT, GX_ROP_CLEAR), /* GXnor */ + ROP_BLIT(GX_ROP_INVERT, GX_ROP_NOOP), /* GXequiv */ + ROP_BLIT(GX_ROP_INVERT, GX_ROP_INVERT), /* GXinvert */ + ROP_BLIT(GX_ROP_INVERT, GX_ROP_SET), /* GXorReverse */ + ROP_BLIT(GX_ROP_SET, GX_ROP_CLEAR), /* GXcopyInverted */ + ROP_BLIT(GX_ROP_SET, GX_ROP_NOOP), /* GXorInverted */ + ROP_BLIT(GX_ROP_SET, GX_ROP_INVERT), /* GXnand */ + ROP_BLIT(GX_ROP_SET, GX_ROP_SET), /* GXset */ +}; + +/* rops for solid drawing + with: + Plane Mask - use plane mask reg. + Pixel Mask - use all ones. + Patt Mask - use all ones. +*/ + +static Uint gx_solid_rop_table[16]={ + ROP_FILL(GX_ROP_CLEAR, GX_ROP_CLEAR), /* GXclear */ + ROP_FILL(GX_ROP_CLEAR, GX_ROP_NOOP), /* GXand */ + ROP_FILL(GX_ROP_CLEAR, GX_ROP_INVERT), /* GXandReverse */ + ROP_FILL(GX_ROP_CLEAR, GX_ROP_SET), /* GXcopy */ + ROP_FILL(GX_ROP_NOOP, GX_ROP_CLEAR), /* GXandInverted */ + ROP_FILL(GX_ROP_NOOP, GX_ROP_NOOP), /* GXnoop */ + ROP_FILL(GX_ROP_NOOP, GX_ROP_INVERT), /* GXxor */ + ROP_FILL(GX_ROP_NOOP, GX_ROP_SET), /* GXor */ + ROP_FILL(GX_ROP_INVERT, GX_ROP_CLEAR), /* GXnor */ + ROP_FILL(GX_ROP_INVERT, GX_ROP_NOOP), /* GXequiv */ + ROP_FILL(GX_ROP_INVERT, GX_ROP_INVERT), /* GXinvert */ + ROP_FILL(GX_ROP_INVERT, GX_ROP_SET), /* GXorReverse */ + ROP_FILL(GX_ROP_SET, GX_ROP_CLEAR), /* GXcopyInverted */ + ROP_FILL(GX_ROP_SET, GX_ROP_NOOP), /* GXorInverted */ + ROP_FILL(GX_ROP_SET, GX_ROP_INVERT), /* GXnand */ + ROP_FILL(GX_ROP_SET, GX_ROP_SET), /* GXset */ +}; + +static Uint gx_stipple_rop_table[16]={ + ROP_STIP(GX_ROP_CLEAR, GX_ROP_CLEAR), /* GXclear */ + ROP_STIP(GX_ROP_CLEAR, GX_ROP_NOOP), /* GXand */ + ROP_STIP(GX_ROP_CLEAR, GX_ROP_INVERT), /* GXandReverse */ + ROP_STIP(GX_ROP_CLEAR, GX_ROP_SET), /* GXcopy */ + ROP_STIP(GX_ROP_NOOP, GX_ROP_CLEAR), /* GXandInverted */ + ROP_STIP(GX_ROP_NOOP, GX_ROP_NOOP), /* GXnoop */ + ROP_STIP(GX_ROP_NOOP, GX_ROP_INVERT), /* GXxor */ + ROP_STIP(GX_ROP_NOOP, GX_ROP_SET), /* GXor */ + ROP_STIP(GX_ROP_INVERT, GX_ROP_CLEAR), /* GXnor */ + ROP_STIP(GX_ROP_INVERT, GX_ROP_NOOP), /* GXequiv */ + ROP_STIP(GX_ROP_INVERT, GX_ROP_INVERT), /* GXinvert */ + ROP_STIP(GX_ROP_INVERT, GX_ROP_SET), /* GXorReverse */ + ROP_STIP(GX_ROP_SET, GX_ROP_CLEAR), /* GXcopyInverted */ + ROP_STIP(GX_ROP_SET, GX_ROP_NOOP), /* GXorInverted */ + ROP_STIP(GX_ROP_SET, GX_ROP_INVERT), /* GXnand */ + ROP_STIP(GX_ROP_SET, GX_ROP_SET), /* GXset */ +}; + +static Uint gx_opaque_stipple_rop_table[16]={ + ROP_OSTP(GX_ROP_CLEAR, GX_ROP_CLEAR), /* GXclear */ + ROP_OSTP(GX_ROP_CLEAR, GX_ROP_NOOP), /* GXand */ + ROP_OSTP(GX_ROP_CLEAR, GX_ROP_INVERT), /* GXandReverse */ + ROP_OSTP(GX_ROP_CLEAR, GX_ROP_SET), /* GXcopy */ + ROP_OSTP(GX_ROP_NOOP, GX_ROP_CLEAR), /* GXandInverted */ + ROP_OSTP(GX_ROP_NOOP, GX_ROP_NOOP), /* GXnoop */ + ROP_OSTP(GX_ROP_NOOP, GX_ROP_INVERT), /* GXxor */ + ROP_OSTP(GX_ROP_NOOP, GX_ROP_SET), /* GXor */ + ROP_OSTP(GX_ROP_INVERT, GX_ROP_CLEAR), /* GXnor */ + ROP_OSTP(GX_ROP_INVERT, GX_ROP_NOOP), /* GXequiv */ + ROP_OSTP(GX_ROP_INVERT, GX_ROP_INVERT), /* GXinvert */ + ROP_OSTP(GX_ROP_INVERT, GX_ROP_SET), /* GXorReverse */ + ROP_OSTP(GX_ROP_SET, GX_ROP_CLEAR), /* GXcopyInverted */ + ROP_OSTP(GX_ROP_SET, GX_ROP_NOOP), /* GXorInverted */ + ROP_OSTP(GX_ROP_SET, GX_ROP_INVERT), /* GXnand */ + ROP_OSTP(GX_ROP_SET, GX_ROP_SET), /* GXset */ +}; + +int sunGXScreenPrivateIndex; +int sunGXGCPrivateIndex; +int sunGXWindowPrivateIndex; +int sunGXGeneration; + +/* + sunGXDoBitBlt + ============= + Bit Blit for all window to window blits. +*/ +static void +sunGXDoBitblt(pSrc, pDst, alu, prgnDst, pptSrc, planemask) + DrawablePtr pSrc, pDst; + int alu; + RegionPtr prgnDst; + DDXPointPtr pptSrc; + unsigned long planemask; +{ + register sunGXPtr gx = sunGXGetScreenPrivate (pSrc->pScreen); + register long r; + register BoxPtr pboxTmp; + register DDXPointPtr pptTmp; + register int nbox; + BoxPtr pboxNext,pboxBase,pbox; + + /* setup GX ( need fg of 0xff for blits ) */ + GXBlitInit(gx,gx_blit_rop_table[alu]|POLY_O,planemask); + + pbox = REGION_RECTS(prgnDst); + nbox = REGION_NUM_RECTS(prgnDst); + + /* need to blit rectangles in different orders, depending on the direction of copy + so that an area isnt overwritten before it is blitted */ + if( (pptSrc->y < pbox->y1) && (nbox > 1) ){ + + if( (pptSrc->x < pbox->x1) && (nbox > 1) ){ + + /* reverse order of bands and rects in each band */ + pboxTmp=pbox+nbox; + pptTmp=pptSrc+nbox; + + while (nbox--){ + pboxTmp--; + pptTmp--; + gx->x0=pptTmp->x; + gx->y0=pptTmp->y; + gx->x1=pptTmp->x+(pboxTmp->x2-pboxTmp->x1)-1; + gx->y1=pptTmp->y+(pboxTmp->y2-pboxTmp->y1)-1; + gx->x2=pboxTmp->x1; + gx->y2=pboxTmp->y1; + gx->x3=pboxTmp->x2-1; + gx->y3=pboxTmp->y2-1; + GXBlitDone(gx,r); + } + } + else{ + + /* keep ordering in each band, reverse order of bands */ + pboxBase = pboxNext = pbox+nbox-1; + + while (pboxBase >= pbox){ /* for each band */ + + /* find first box in band */ + while ((pboxNext >= pbox) && + (pboxBase->y1 == pboxNext->y1)) + pboxNext--; + + pboxTmp = pboxNext+1; /* first box in band */ + pptTmp = pptSrc + (pboxTmp - pbox); /* first point in band */ + + while (pboxTmp <= pboxBase){ /* for each box in band */ + gx->x0=pptTmp->x; + gx->y0=pptTmp->y; + gx->x1=pptTmp->x+(pboxTmp->x2-pboxTmp->x1)-1; + gx->y1=pptTmp->y+(pboxTmp->y2-pboxTmp->y1)-1; + gx->x2=pboxTmp->x1; + gx->y2=pboxTmp->y1; + gx->x3=pboxTmp->x2-1; + gx->y3=pboxTmp->y2-1; + ++pboxTmp; + ++pptTmp; + GXBlitDone(gx,r); + } + pboxBase = pboxNext; + } + } + } + else{ + + if( (pptSrc->x < pbox->x1) && (nbox > 1) ){ + + /* reverse order of rects in each band */ + pboxBase = pboxNext = pbox; + + while (pboxBase < pbox+nbox){ /* for each band */ + + /* find last box in band */ + while ((pboxNext < pbox+nbox) && + (pboxNext->y1 == pboxBase->y1)) + pboxNext++; + + pboxTmp = pboxNext; /* last box in band */ + pptTmp = pptSrc + (pboxTmp - pbox); /* last point in band */ + + while (pboxTmp != pboxBase){ /* for each box in band */ + --pboxTmp; + --pptTmp; + gx->x0=pptTmp->x; + gx->y0=pptTmp->y; + gx->x1=pptTmp->x+(pboxTmp->x2-pboxTmp->x1)-1; + gx->y1=pptTmp->y+(pboxTmp->y2-pboxTmp->y1)-1; + gx->x2=pboxTmp->x1; + gx->y2=pboxTmp->y1; + gx->x3=pboxTmp->x2-1; + gx->y3=pboxTmp->y2-1; + GXBlitDone(gx,r); + } + pboxBase = pboxNext; + } + } + else{ + + /* dont need to change order of anything */ + pptTmp=pptSrc; + pboxTmp=pbox; + + while(nbox--){ + gx->x0=pptTmp->x; + gx->y0=pptTmp->y; + gx->x1=pptTmp->x+(pboxTmp->x2-pboxTmp->x1)-1; + gx->y1=pptTmp->y+(pboxTmp->y2-pboxTmp->y1)-1; + gx->x2=pboxTmp->x1; + gx->y2=pboxTmp->y1; + gx->x3=pboxTmp->x2-1; + gx->y3=pboxTmp->y2-1; + pboxTmp++; + pptTmp++; + GXBlitDone(gx,r); + } + } + } + GXWait(gx,r); +} + +RegionPtr +sunGXCopyArea(pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty) + register DrawablePtr pSrcDrawable; + register DrawablePtr pDstDrawable; + GC *pGC; + int srcx, srcy; + int width, height; + int dstx, dsty; +{ + if (pSrcDrawable->type != DRAWABLE_WINDOW) + return cfbCopyArea (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty); + return cfbBitBlt (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, sunGXDoBitblt, 0); +} + +static unsigned long copyPlaneFG, copyPlaneBG; + +static void +sunGXCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask, bitPlane) + DrawablePtr pSrcDrawable; + DrawablePtr pDstDrawable; + int rop; + RegionPtr prgnDst; + DDXPointPtr pptSrc; + unsigned long planemask; + unsigned long bitPlane; +{ + register sunGXPtr gx = sunGXGetScreenPrivate (pDstDrawable->pScreen); + int srcx, srcy, dstx, dsty, width, height; + int dstLastx, dstRightx; + int xoffSrc, widthSrc, widthRest; + int widthLast; + unsigned long *psrcBase, *psrc; + unsigned long bits, tmp; + register int leftShift, rightShift; + register int nl, nlMiddle; + int nbox; + BoxPtr pbox; + register int r; + + GXDrawInit (gx, copyPlaneFG, + gx_opaque_stipple_rop_table[rop]|GX_PATTERN_ONES, + planemask); + gx->bg = copyPlaneBG; + gx->mode = GX_BLIT_NOSRC | GX_MODE_COLOR1; + + cfbGetLongWidthAndPointer (pSrcDrawable, widthSrc, psrcBase) + + nbox = REGION_NUM_RECTS(prgnDst); + pbox = REGION_RECTS(prgnDst); + gx->incx = 32; + gx->incy = 0; + while (nbox--) + { + dstx = pbox->x1; + dsty = pbox->y1; + srcx = pptSrc->x; + srcy = pptSrc->y; + dstLastx = pbox->x2; + width = dstLastx - dstx; + height = pbox->y2 - dsty; + pbox++; + pptSrc++; + if (!width) + continue; + psrc = psrcBase + srcy * widthSrc + (srcx >> 5); + dstLastx--; + dstRightx = dstx + 31; + nlMiddle = (width + 31) >> 5; + widthLast = width & 31; + xoffSrc = srcx & 0x1f; + leftShift = xoffSrc; + rightShift = 32 - leftShift; + widthRest = widthSrc - nlMiddle; + if (widthLast) + nlMiddle--; + if (leftShift == 0) + { + while (height--) + { + gx->x0 = dstx; + gx->x1 = dstRightx; + gx->y0 = dsty++; + nl = nlMiddle; + while (nl--) + gx->font = *psrc++; + if (widthLast) + { + gx->x1 = dstLastx; + gx->font = *psrc++; + } + psrc += widthRest; + } + } + else + { + widthRest--; + while (height--) + { + gx->x0 = dstx; + gx->x1 = dstRightx; + gx->y0 = dsty++; + bits = *psrc++; + nl = nlMiddle; + while (nl--) + { + tmp = BitLeft(bits, leftShift); + bits = *psrc++; + tmp |= BitRight(bits, rightShift); + gx->font = tmp; + } + if (widthLast) + { + tmp = BitLeft(bits, leftShift); + bits = *psrc++; + tmp |= BitRight(bits, rightShift); + gx->x1 = dstLastx; + gx->font = tmp; + } + psrc += widthRest; + } + } + } + GXWait (gx, r); + gx->incx = 0; + gx->incy = 0; + gx->mode = GX_BLIT_SRC | GX_MODE_COLOR8; +} + +RegionPtr sunGXCopyPlane(pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane) + DrawablePtr pSrcDrawable; + DrawablePtr pDstDrawable; + GCPtr pGC; + int srcx, srcy; + int width, height; + int dstx, dsty; + unsigned long bitPlane; +{ + RegionPtr ret; + + if (pSrcDrawable->bitsPerPixel == 1 && pDstDrawable->bitsPerPixel == 8) + { + if (bitPlane == 1) + { + copyPlaneFG = pGC->fgPixel; + copyPlaneBG = pGC->bgPixel; + ret = cfbBitBlt (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, sunGXCopyPlane1to8, bitPlane); + } + else + ret = miHandleExposures (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); + } + else if (pSrcDrawable->bitsPerPixel == 8 && pDstDrawable->bitsPerPixel == 1) + { + extern int InverseAlu[16]; + int oldalu; + + oldalu = pGC->alu; + if ((pGC->fgPixel & 1) == 0 && (pGC->bgPixel&1) == 1) + pGC->alu = InverseAlu[pGC->alu]; + else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1)) + pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel); + ret = cfbCopyPlaneReduce (pSrcDrawable, pDstDrawable, + pGC, srcx, srcy, width, height, dstx, dsty, cfbCopyPlane8to1, bitPlane); + pGC->alu = oldalu; + } + else + { + PixmapPtr pBitmap; + ScreenPtr pScreen = pSrcDrawable->pScreen; + GCPtr pGC1; + + pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1); + if (!pBitmap) + return NULL; + pGC1 = GetScratchGC (1, pScreen); + if (!pGC1) + { + (*pScreen->DestroyPixmap) (pBitmap); + return NULL; + } + /* + * don't need to set pGC->fgPixel,bgPixel as copyPlane8to1 + * ignores pixel values, expecting the rop to "do the + * right thing", which GXcopy will. + */ + ValidateGC ((DrawablePtr) pBitmap, pGC1); + /* no exposures here, scratch GC's don't get graphics expose */ + (void) cfbCopyPlaneReduce (pSrcDrawable, (DrawablePtr) pBitmap, + pGC1, srcx, srcy, width, height, 0, 0, cfbCopyPlane8to1, bitPlane); + copyPlaneFG = pGC->fgPixel; + copyPlaneBG = pGC->bgPixel; + (void) cfbBitBlt ((DrawablePtr) pBitmap, pDstDrawable, pGC, + 0, 0, width, height, dstx, dsty, sunGXCopyPlane1to8, 1); + FreeScratchGC (pGC1); + (*pScreen->DestroyPixmap) (pBitmap); + /* compute resultant exposures */ + ret = miHandleExposures (pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, + dstx, dsty, bitPlane); + } + return ret; +} + +void +sunGXFillRectAll (pDrawable, pGC, nBox, pBox) + DrawablePtr pDrawable; + GCPtr pGC; + int nBox; + BoxPtr pBox; +{ + register sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + register sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + register int r; + + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_N,pGC->planemask); + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + while (nBox--) { + gx->arecty = pBox->y1; + gx->arectx = pBox->x1; + gx->arecty = pBox->y2; + gx->arectx = pBox->x2; + pBox++; + GXDrawDone(gx,r); + } + GXWait(gx,r); +} + +#define NUM_STACK_RECTS 1024 + +void +sunGXPolyFillRect(pDrawable, pGC, nrectFill, prectInit) + DrawablePtr pDrawable; + register GCPtr pGC; + int nrectFill; /* number of rectangles to fill */ + xRectangle *prectInit; /* Pointer to first rectangle to fill */ +{ + xRectangle *prect; + RegionPtr prgnClip; + register BoxPtr pbox; + register BoxPtr pboxClipped; + BoxPtr pboxClippedBase; + BoxPtr pextent; + BoxRec stackRects[NUM_STACK_RECTS]; + int numRects; + int n; + int xorg, yorg; + + prgnClip = pGC->pCompositeClip; + prect = prectInit; + xorg = pDrawable->x; + yorg = pDrawable->y; + if (xorg || yorg) + { + prect = prectInit; + n = nrectFill; + while(n--) + { + prect->x += xorg; + prect->y += yorg; + prect++; + } + } + + prect = prectInit; + + numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; + if (numRects > NUM_STACK_RECTS) + { + pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); + if (!pboxClippedBase) + return; + } + else + pboxClippedBase = stackRects; + + pboxClipped = pboxClippedBase; + + if (REGION_NUM_RECTS(prgnClip) == 1) + { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_RECTS(prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) + { + if ((pboxClipped->x1 = prect->x) < x1) + pboxClipped->x1 = x1; + + if ((pboxClipped->y1 = prect->y) < y1) + pboxClipped->y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + pboxClipped->x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + pboxClipped->y2 = by2; + + prect++; + if ((pboxClipped->x1 < pboxClipped->x2) && + (pboxClipped->y1 < pboxClipped->y2)) + { + pboxClipped++; + } + } + } + else + { + int x1, y1, x2, y2, bx2, by2; + + pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + x1 = pextent->x1; + y1 = pextent->y1; + x2 = pextent->x2; + y2 = pextent->y2; + while (nrectFill--) + { + BoxRec box; + + if ((box.x1 = prect->x) < x1) + box.x1 = x1; + + if ((box.y1 = prect->y) < y1) + box.y1 = y1; + + bx2 = (int) prect->x + (int) prect->width; + if (bx2 > x2) + bx2 = x2; + box.x2 = bx2; + + by2 = (int) prect->y + (int) prect->height; + if (by2 > y2) + by2 = y2; + box.y2 = by2; + + prect++; + + if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) + continue; + + n = REGION_NUM_RECTS (prgnClip); + pbox = REGION_RECTS(prgnClip); + + /* clip the rectangle to each box in the clip region + this is logically equivalent to calling Intersect() + */ + while(n--) + { + pboxClipped->x1 = max(box.x1, pbox->x1); + pboxClipped->y1 = max(box.y1, pbox->y1); + pboxClipped->x2 = min(box.x2, pbox->x2); + pboxClipped->y2 = min(box.y2, pbox->y2); + pbox++; + + /* see if clipping left anything */ + if(pboxClipped->x1 < pboxClipped->x2 && + pboxClipped->y1 < pboxClipped->y2) + { + pboxClipped++; + } + } + } + } + if (pboxClipped != pboxClippedBase) + sunGXFillRectAll(pDrawable, pGC, + pboxClipped-pboxClippedBase, pboxClippedBase); + if (pboxClippedBase != stackRects) + DEALLOCATE_LOCAL(pboxClippedBase); +} + +void +sunGXFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted) + DrawablePtr pDrawable; + GCPtr pGC; + int n; /* number of spans to fill */ + DDXPointPtr ppt; /* pointer to list of start points */ + int *pwidth; /* pointer to list of n widths */ + int fSorted; +{ + int x, y; + int width; + /* next three parameters are post-clip */ + int nTmp; + int *pwidthFree;/* copies of the pointers to free */ + DDXPointPtr pptFree; + register sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + cfbPrivGCPtr devPriv = cfbGetGCPrivate(pGC); + register sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + register int r; + BoxPtr extents; + + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_O,pGC->planemask) + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + if (devPriv->oneRect) + { + extents = &pGC->pCompositeClip->extents; + GXSetClip (gx, extents); + } + else + { + nTmp = n * miFindMaxBand(pGC->pCompositeClip); + pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int)); + pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec)); + if(!pptFree || !pwidthFree) + { + if (pptFree) DEALLOCATE_LOCAL(pptFree); + if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + return; + } + n = miClipSpans(pGC->pCompositeClip, ppt, pwidth, n, + pptFree, pwidthFree, fSorted); + pwidth = pwidthFree; + ppt = pptFree; + } + while (n--) + { + x = ppt->x; + y = ppt->y; + ppt++; + width = *pwidth++; + if (width) + { + sunGXFillSpan(gx,y,x,x + width - 1,r); + } + } + GXWait(gx,r); + if (devPriv->oneRect) + { + GXResetClip (gx, pDrawable->pScreen); + } + else + { + DEALLOCATE_LOCAL(pptFree); + DEALLOCATE_LOCAL(pwidthFree); + } +} + +#ifdef NOTDEF +/* cfb is faster for dots */ +void +sunGXPolyPoint(pDrawable, pGC, mode, npt, pptInit) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; + int npt; + xPoint *pptInit; +{ + register sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + RegionPtr cclip; + int nbox; + register int i; + register BoxPtr pbox; + cfbPrivGCPtr devPriv; + xPoint *ppt; + int x, y; + int r; + int off; + + devPriv = (cfbPrivGC *)(pGC->devPrivates[cfbGCPrivateIndex].ptr); + if (devPriv->rop == GXnoop) + return; + cclip = pGC->pCompositeClip; + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu],pGC->planemask); + gx->offx = pDrawable->x; + gx->offy = pDrawable->y; + for (nbox = REGION_NUM_RECTS(cclip), pbox = REGION_RECTS(cclip); + --nbox >= 0; + pbox++) + { + sunGXSetClip(gx,pbox); + if (mode != CoordModeOrigin) + { + x = 0; + y = 0; + for (ppt = pptInit, i = npt; --i >= 0;) + { + gx->apointy = y += ppt->y; + gx->apointx = x += ppt->x; + ++ppt; + GXDrawDone(gx,r); + } + } + else + { + for (ppt = pptInit, i = npt; --i >= 0;) + { + gx->apointy = ppt->y; + gx->apointx = ppt->x; + ++ppt; + GXDrawDone(gx,r); + } + } + } + GXWait(gx,r); + GXResetOff (gx); + GXResetClip(gx,pDrawable->pScreen); +} +#endif + +#include "mifillarc.h" + +#define FILLSPAN(gx,y,x1,x2,r) {\ + if (x2 >= x1) {\ + sunGXFillSpan(gx,y,x1,x2,r) \ + } \ +} + +#define FILLSLICESPANS(flip,y) \ + if (!flip) \ + { \ + FILLSPAN(gx,y,xl,xr,r) \ + } \ + else \ + { \ + xc = xorg - x; \ + FILLSPAN(gx, y, xc, xr, r) \ + xc += slw - 1; \ + FILLSPAN(gx, y, xl, xc, r) \ + } + +static void +sunGXFillEllipse (pDraw, gx, arc) + DrawablePtr pDraw; + sunGXPtr gx; + xArc *arc; +{ + int x, y, e; + int yk, xk, ym, xm, dx, dy, xorg, yorg; + int y_top, y_bot; + miFillArcRec info; + register int xpos; + int r; + int slw; + + miFillArcSetup(arc, &info); + MIFILLARCSETUP(); + y_top = yorg - y; + y_bot = yorg + y + dy; + while (y) + { + y_top++; + y_bot--; + MIFILLARCSTEP(slw); + if (!slw) + continue; + xpos = xorg - x; + sunGXFillSpan (gx,y_top,xpos,xpos+slw - 1,r); + if (miFillArcLower(slw)) + sunGXFillSpan (gx,y_bot,xpos,xpos+slw - 1,r); + } +} + + +static void +sunGXFillArcSlice (pDraw, pGC, gx, arc) + DrawablePtr pDraw; + GCPtr pGC; + sunGXPtr gx; + xArc *arc; +{ + int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; + register int x, y, e; + miFillArcRec info; + miArcSliceRec slice; + int xl, xr, xc; + int y_top, y_bot; + int r; + + miFillArcSetup(arc, &info); + miFillArcSliceSetup(arc, &slice, pGC); + MIFILLARCSETUP(); + y_top = yorg - y; + y_bot = yorg + y + dy; + while (y > 0) + { + y_top++; + y_bot--; + MIFILLARCSTEP(slw); + MIARCSLICESTEP(slice.edge1); + MIARCSLICESTEP(slice.edge2); + if (miFillSliceUpper(slice)) + { + MIARCSLICEUPPER(xl, xr, slice, slw); + FILLSLICESPANS(slice.flip_top, y_top); + } + if (miFillSliceLower(slice)) + { + MIARCSLICELOWER(xl, xr, slice, slw); + FILLSLICESPANS(slice.flip_bot, y_bot); + } + } +} + +#define FAST_CIRCLES +#ifdef FAST_CIRCLES +#if (BITMAP_BIT_ORDER == MSBFirst) +#define Bits32(v) (v) +#define Bits16(v) (v) +#define Bits8(v) (v) +#else +#define FlipBits2(a) ((((a) & 0x1) << 1) | (((a) & 0x2) >> 1)) +#define FlipBits4(a) ((FlipBits2(a) << 2) | FlipBits2(a >> 2)) +#define FlipBits8(a) ((FlipBits4(a) << 4) | FlipBits4(a >> 4)) +#define FlipBits16(a) ((FlipBits8(a) << 8) | FlipBits8(a >> 8)) +#define FlipBits32(a) ((FlipBits16(a) << 16) | FlipBits16(a >> 16)) +#define Bits32(v) FlipBits32(v) +#define Bits16(v) FlipBits16(v) +#define Bits8(v) FlipBits8(v) +#endif + +#define B(x) Bits16(x) +#define DO_FILLED_ARCS +#include "circleset.h" +#undef B +#undef Bits8 +#undef Bits16 +#undef Bits32 +#define UNSET_CIRCLE if (old_width) \ + { \ + gx->alu = gx_solid_rop_table[pGC->alu]; \ + old_width = -old_width; \ + } + +#else +#define UNSET_CIRCLE +#endif + +void +sunGXPolyFillArc (pDraw, pGC, narcs, parcs) + DrawablePtr pDraw; + GCPtr pGC; + int narcs; + xArc *parcs; +{ + register xArc *arc; + register int i; + int x, y; + BoxRec box; + BoxPtr extents = NULL; + RegionPtr cclip; + register sunGXPtr gx = sunGXGetScreenPrivate (pDraw->pScreen); + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + cfbPrivGCPtr devPriv; + register int r; +#ifdef FAST_CIRCLES + int old_width = 0; +#endif + + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_O,pGC->planemask); + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + devPriv = (cfbPrivGC *)(pGC->devPrivates[cfbGCPrivateIndex].ptr); + cclip = pGC->pCompositeClip; + GXSetOff(gx,pDraw->x,pDraw->y) + if (devPriv->oneRect) { + extents = &cclip->extents; + GXSetClip(gx,extents); + } + for (arc = parcs, i = narcs; --i >= 0; arc++) + { + if (miFillArcEmpty(arc)) + continue; + if (miCanFillArc(arc)) + { + x = arc->x; + y = arc->y; + if (!devPriv->oneRect) + { + box.x1 = x + pDraw->x; + box.y1 = y + pDraw->y; + box.x2 = box.x1 + (int)arc->width + 1; + box.y2 = box.y1 + (int)arc->height + 1; + } + if (devPriv->oneRect || + RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) + { + if ((arc->angle2 >= FULLCIRCLE) || + (arc->angle2 <= -FULLCIRCLE)) + { +#ifdef FAST_CIRCLES +/* who really needs fast filled circles? */ + if (arc->width == arc->height && arc->width <= 16 && + !gxPriv->stipple) + { + int offx, offy; + if (arc->width != old_width) + { + int i; + Uint *sp; + VUint *dp; + + if (old_width != -arc->width) + { + sp = (Uint *) filled_arcs[arc->width-1]; + dp = gx->pattern; + i = 8; + while (i--) + dp[i] = sp[i]; + } + gx->alu = gx_stipple_rop_table[pGC->alu]|GX_PATTERN_MASK; + old_width = arc->width; + } + offx = 16 - ((x + pDraw->x) & 0x0f); + offy = 16 - ((y + pDraw->y) & 0x0f); + gx->patalign = (offx << 16) | offy; + gx->arecty = y; + gx->arectx = x; + gx->arecty = y + old_width-1; + gx->arectx = x + old_width-1; + GXDrawDone (gx, r); + } + else +#endif + { + UNSET_CIRCLE + sunGXFillEllipse (pDraw, gx, arc); + } + } + else + { + UNSET_CIRCLE + sunGXFillArcSlice (pDraw, pGC, gx, arc); + } + continue; + } + } + UNSET_CIRCLE + GXWait (gx,r); + GXResetOff (gx); + if (devPriv->oneRect) + GXResetClip (gx, pDraw->pScreen); + miPolyFillArc(pDraw, pGC, 1, arc); + GXSetOff (gx, pDraw->x, pDraw->y); + if (devPriv->oneRect) + GXSetClip (gx, extents); + } + GXWait (gx, r); + GXResetOff (gx); + if (devPriv->oneRect) + GXResetClip (gx, pDraw->pScreen); +} + +void +sunGXFillPoly1Rect (pDrawable, pGC, shape, mode, count, ptsIn) + DrawablePtr pDrawable; + GCPtr pGC; + int count; + DDXPointPtr ptsIn; +{ + BoxPtr extents; + int x1, x2, x3, x4; + int y1, y2, y3, y4; + sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + int r; + typedef struct { + Uint x; + Uint y; + Uint z; + } GXPointRec, *GXPointPtr; + GXPointPtr tri, qua; + + if (count < 3) + return; + if (shape != Convex && count > 4) + { + miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); + return; + } + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_N,pGC->planemask); + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + extents = &pGC->pCompositeClip->extents; + GXSetOff(gx,pDrawable->x, pDrawable->y); + GXSetClip(gx,extents); + if (mode == CoordModeOrigin) + { + tri = (GXPointPtr) &gx->atrix; + qua = (GXPointPtr) &gx->aquadx; + } + else + { + tri = (GXPointPtr) &gx->rtrix; + qua = (GXPointPtr) &gx->rquadx; + } + if (count == 3) { + gx->apointy = ptsIn[0].y; + gx->apointx = ptsIn[0].x; + tri->y = ptsIn[1].y; + tri->x = ptsIn[1].x; + tri->y = ptsIn[2].y; + tri->x = ptsIn[2].x; + GXDrawDone (gx, r); + } + else if (count == 4) + { + gx->apointy = ptsIn[0].y; + gx->apointx = ptsIn[0].x; + qua->y = ptsIn[1].y; + qua->x = ptsIn[1].x; + qua->y = ptsIn[2].y; + qua->x = ptsIn[2].x; + qua->y = ptsIn[3].y; + qua->x = ptsIn[3].x; + GXDrawDone (gx, r); + if (r < 0 && shape != Convex) + { + GXWait(gx,r); + GXResetOff(gx); + GXResetClip(gx,pDrawable->pScreen); + miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); + return; + } + } + else + { + y1 = ptsIn[0].y; + x1 = ptsIn[0].x; + y2 = ptsIn[1].y; + x2 = ptsIn[1].x; + count -= 2; + ptsIn += 2; + while (count) { + x3 = ptsIn->x; + y3 = ptsIn->y; + ptsIn++; + count--; + gx->apointy = y1; + gx->apointx = x1; + if (count == 0) { + tri->y = y2; + tri->x = x2; + tri->y = y3; + tri->x = x3; + } + else + { + y4 = ptsIn->y; + x4 = ptsIn->x; + ptsIn++; + count--; + qua->y = y2; + qua->x = x2; + qua->y = y3; + qua->x = x3; + qua->y = y4; + qua->x = x4; + if (mode == CoordModeOrigin) + { + x2 = x4; + y2 = y4; + } + else + { + x2 = x2 + x3 + x4; + y2 = y2 + y3 + y4; + } + } + GXDrawDone (gx, r); + } + } + GXWait(gx,r); + GXResetOff(gx); + GXResetClip(gx,pDrawable->pScreen); +} + +/* + * Note that the GX does not allow CapNotLast, so the code fakes it. This is + * expensive to do as the GX is asynchronous and must be synced with GXWait + * before fetching and storing the final line point. If only the hardware was + * designed for X. + */ + +/* hard code the screen width; otherwise we'd have to check or mul */ + +#define WIDTH_MUL(y) (((y) << 10) + ((y) << 7)) +#define GX_WIDTH 1152 +#define WID_OK(s) ((s)->width == GX_WIDTH) + +void +sunGXPolySeg1Rect (pDrawable, pGC, nseg, pSeg) + DrawablePtr pDrawable; + GCPtr pGC; + int nseg; + xSegment *pSeg; +{ + sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + BoxPtr extents; + int x, y; + int r; + unsigned char *baseAddr, *loAddr, *hiAddr, *saveAddr = 0, save = 0; + + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_O,pGC->planemask); + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + GXSetOff (gx, pDrawable->x, pDrawable->y); + + extents = &pGC->pCompositeClip->extents; + GXSetClip (gx, extents); + if (pGC->capStyle == CapNotLast) + { + sunGXGetAddrRange(pDrawable,extents,baseAddr,loAddr,hiAddr); + while (nseg--) + { + gx->aliney = pSeg->y1; + gx->alinex = pSeg->x1; + y = pSeg->y2; + x = pSeg->x2; + saveAddr = baseAddr + WIDTH_MUL(y) + x; + if (saveAddr < loAddr || hiAddr < saveAddr) + saveAddr = 0; + else + save = *saveAddr; + gx->aliney = y; + gx->alinex = x; + GXDrawDone (gx, r); + if (saveAddr) + { + GXWait(gx,r); + *saveAddr = save; + } + pSeg++; + } + } + else + { + while (nseg--) + { + gx->aliney = pSeg->y1; + gx->alinex = pSeg->x1; + gx->aliney = pSeg->y2; + gx->alinex = pSeg->x2; + pSeg++; + GXDrawDone (gx, r); + } + } + GXWait (gx, r); + GXResetOff (gx); + GXResetClip (gx, pDrawable->pScreen); +} + +void +sunGXPolylines1Rect (pDrawable, pGC, mode, npt, ppt) + DrawablePtr pDrawable; + GCPtr pGC; + int mode; + int npt; + DDXPointPtr ppt; +{ + sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + BoxPtr extents; + unsigned char *baseAddr, *loAddr, *hiAddr, *saveAddr, save = 0; + int r; + Bool careful; + Bool capNotLast; + + if (!--npt) + return; + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_O,pGC->planemask); + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + careful = ((pGC->alu & 0xc) == 0x8 || (pGC->alu & 0x3) == 0x2); + capNotLast = pGC->capStyle == CapNotLast; + + extents = &pGC->pCompositeClip->extents; + GXSetOff (gx, pDrawable->x, pDrawable->y); + GXSetClip (gx, extents); + if (careful) + { + int x, y; + sunGXGetAddrRange (pDrawable, extents, baseAddr, loAddr, hiAddr); + gx->apointy = y = ppt->y; + gx->apointx = x = ppt->x; + ppt++; + while (npt--) + { + if (mode == CoordModeOrigin) + { + y = ppt->y; + x = ppt->x; + } + else + { + y += ppt->y; + x += ppt->x; + } + ppt++; + saveAddr = baseAddr + WIDTH_MUL(y) + x; + if (saveAddr < loAddr || hiAddr < saveAddr) + saveAddr = 0; + else + save = *saveAddr; + gx->aliney = y; + gx->alinex = x; + GXDrawDone (gx, r); + if (saveAddr) + { + GXWait(gx,r); + *saveAddr = save; + } + } + GXWait(gx,r); + } + else + { + int x, y; + if (capNotLast) + npt--; + if (mode == CoordModeOrigin) + { + x = y = 0; + gx->apointy = ppt->y; + gx->apointx = ppt->x; + ppt++; + while (npt--) + { + gx->aliney = ppt->y; + gx->alinex = ppt->x; + ++ppt; + GXDrawDone(gx,r); + } + } + else + { + y = gx->apointy = ppt->y; + x = gx->apointx = ppt->x; + ppt++; + while (npt--) + { + y += gx->rliney = ppt->y; + x += gx->rlinex = ppt->x; + ++ppt; + GXDrawDone(gx,r); + } + } + if (capNotLast) + { + sunGXGetAddrRange (pDrawable, extents, baseAddr, loAddr, hiAddr); + x += ppt->x; + y += ppt->y; + saveAddr = baseAddr + WIDTH_MUL(y) + x; + if (saveAddr < loAddr || hiAddr < saveAddr) + saveAddr = 0; + else + save = *saveAddr; + gx->aliney = y; + gx->alinex = x; + GXDrawDone(gx,r); + GXWait(gx,r); + if (saveAddr) + *saveAddr = save; + } + else + { + GXWait(gx,r); + } + } + GXResetOff (gx); + GXResetClip (gx, pDrawable->pScreen); +} + +void +sunGXPolyFillRect1Rect (pDrawable, pGC, nrect, prect) + DrawablePtr pDrawable; + GCPtr pGC; + int nrect; + xRectangle *prect; +{ + sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + BoxPtr extents = &pGC->pCompositeClip->extents; + int r; + int x, y; + + GXDrawInit(gx,pGC->fgPixel,gx_solid_rop_table[pGC->alu]|POLY_N,pGC->planemask); + if (gxPriv->stipple) + GXStippleInit(gx,gxPriv->stipple); + GXSetOff (gx, pDrawable->x, pDrawable->y); + GXSetClip (gx, extents); + while (nrect--) + { + gx->arecty = y = prect->y; + gx->arectx = x = prect->x; + gx->arecty = y + (int) prect->height; + gx->arectx = x + (int) prect->width; + prect++; + GXDrawDone (gx, r); + } + GXWait (gx, r); + GXResetOff (gx); + GXResetClip (gx, pDrawable->pScreen); +} + +static void +sunGXPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; +{ + sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + int h; + int w; + CharInfoPtr pci; + unsigned long *bits; + register int r; + RegionPtr clip; + BoxPtr extents; + BoxRec box; + + clip = pGC->pCompositeClip; + extents = &clip->extents; + + if (REGION_NUM_RECTS(clip) == 1) + { + GXSetClip (gx, extents); + } + else + { + /* compute an approximate (but covering) bounding box */ + box.x1 = 0; + if ((ppci[0]->metrics.leftSideBearing < 0)) + box.x1 = ppci[0]->metrics.leftSideBearing; + h = nglyph - 1; + w = ppci[h]->metrics.rightSideBearing; + while (--h >= 0) + w += ppci[h]->metrics.characterWidth; + box.x2 = w; + box.y1 = -FONTMAXBOUNDS(pGC->font,ascent); + box.y2 = FONTMAXBOUNDS(pGC->font,descent); + + box.x1 += pDrawable->x + x; + box.x2 += pDrawable->x + x; + box.y1 += pDrawable->y + y; + box.y2 += pDrawable->y + y; + + switch (RECT_IN_REGION(pGC->pScreen, clip, &box)) + { + case rgnPART: + cfbPolyGlyphBlt8 (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + case rgnOUT: + return; + } + } + + GXDrawInit (gx, pGC->fgPixel, + gx_stipple_rop_table[pGC->alu]|GX_PATTERN_ONES|POLY_N, + pGC->planemask); + gx->mode = GX_BLIT_NOSRC | GX_MODE_COLOR1; + x += pDrawable->x; + y += pDrawable->y; + + while (nglyph--) + { + pci = *ppci++; + gx->incx = 0; + gx->incy = 1; + gx->x0 = x + pci->metrics.leftSideBearing; + gx->x1 = (x + pci->metrics.rightSideBearing) - 1; + gx->y0 = y - pci->metrics.ascent; + h = pci->metrics.ascent + pci->metrics.descent; + bits = (unsigned long *) pci->bits; + while (h--) { + gx->font = *bits++; + } + x += pci->metrics.characterWidth; + } + GXWait (gx, r); + gx->mode = GX_BLIT_SRC | GX_MODE_COLOR8; + GXResetClip (gx, pDrawable->pScreen); +} + +static void +sunGXTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + int h, hTmp; + FontPtr pfont = pGC->font; + register int r; + unsigned long *char1, *char2, *char3, *char4; + int widthGlyphs, widthGlyph; + BoxRec bbox; + BoxPtr extents; + RegionPtr clip; + unsigned long rop; + + widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); + h = FONTASCENT(pfont) + FONTDESCENT(pfont); + clip = pGC->pCompositeClip; + extents = &clip->extents; + + if (REGION_NUM_RECTS(clip) == 1) + { + GXSetClip (gx, extents); + } + else + { + bbox.x1 = x + pDrawable->x; + bbox.x2 = bbox.x1 + (widthGlyph * nglyph); + bbox.y1 = y + pDrawable->y - FONTASCENT(pfont); + bbox.y2 = bbox.y1 + h; + + switch (RECT_IN_REGION(pGC->pScreen, clip, &bbox)) + { + case rgnPART: + if (pglyphBase) + cfbPolyGlyphBlt8(pDrawable, pGC, x, y, nglyph, ppci, NULL); + else + miImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + case rgnOUT: + return; + } + } + + rop = gx_opaque_stipple_rop_table[GXcopy] | GX_PATTERN_ONES; + if (pglyphBase) + rop = gx_stipple_rop_table[pGC->alu] | GX_PATTERN_ONES; + GXDrawInit (gx, pGC->fgPixel, rop, pGC->planemask); + gx->bg = pGC->bgPixel; + gx->mode = GX_BLIT_NOSRC | GX_MODE_COLOR1; + + y = y + pDrawable->y - FONTASCENT(pfont); + x += pDrawable->x; + +#define LoopIt(count, w, loadup, fetch) \ + while (nglyph >= count) \ + { \ + nglyph -= count; \ + gx->incx = 0; \ + gx->incy = 1; \ + gx->x0 = x; \ + gx->x1 = (x += w) - 1; \ + gx->y0 = y; \ + loadup \ + hTmp = h; \ + while (hTmp--) \ + gx->font = fetch; \ + } + + if (widthGlyph <= 8) + { + widthGlyphs = widthGlyph << 2; + LoopIt(4, widthGlyphs, + char1 = (unsigned long *) (*ppci++)->bits; + char2 = (unsigned long *) (*ppci++)->bits; + char3 = (unsigned long *) (*ppci++)->bits; + char4 = (unsigned long *) (*ppci++)->bits;, + (*char1++ | ((*char2++ | ((*char3++ | (*char4++ + >> widthGlyph)) + >> widthGlyph)) + >> widthGlyph))) + } + else if (widthGlyph <= 10) + { + widthGlyphs = (widthGlyph << 1) + widthGlyph; + LoopIt(3, widthGlyphs, + char1 = (unsigned long *) (*ppci++)->bits; + char2 = (unsigned long *) (*ppci++)->bits; + char3 = (unsigned long *) (*ppci++)->bits;, + (*char1++ | ((*char2++ | (*char3++ >> widthGlyph)) >> widthGlyph))) + } + else if (widthGlyph <= 16) + { + widthGlyphs = widthGlyph << 1; + LoopIt(2, widthGlyphs, + char1 = (unsigned long *) (*ppci++)->bits; + char2 = (unsigned long *) (*ppci++)->bits;, + (*char1++ | (*char2++ >> widthGlyph))) + } + while (nglyph--) { + gx->incx = 0; + gx->incy = 1; + gx->x0 = x; + gx->x1 = (x += widthGlyph) - 1; + gx->y0 = y; + char1 = (unsigned long *) (*ppci++)->bits; + hTmp = h; + while (hTmp--) + gx->font = *char1++; + } + gx->incx = 0; + gx->incy = 0; + GXWait (gx, r); + gx->mode = GX_BLIT_SRC | GX_MODE_COLOR8; + GXResetClip (gx, pDrawable->pScreen); +} + +static void +sunGXPolyTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x, y; + unsigned int nglyph; + CharInfoPtr *ppci; /* array of character info */ + pointer pglyphBase; /* start of array of glyphs */ +{ + sunGXTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, (char *) 1); +} + +static void +sunGXFillBoxSolid (pDrawable, nBox, pBox, pixel) + DrawablePtr pDrawable; + int nBox; + BoxPtr pBox; + unsigned long pixel; +{ + register sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + register int r; + + GXDrawInit(gx,pixel,gx_solid_rop_table[GXcopy]|POLY_N,~0); + while (nBox--) { + gx->arecty = pBox->y1; + gx->arectx = pBox->x1; + gx->arecty = pBox->y2; + gx->arectx = pBox->x2; + pBox++; + GXDrawDone(gx,r); + } + GXWait(gx,r); +} + +void +sunGXFillBoxStipple (pDrawable, nBox, pBox, stipple) + DrawablePtr pDrawable; + int nBox; + BoxPtr pBox; + sunGXStipplePtr stipple; +{ + register sunGXPtr gx = sunGXGetScreenPrivate (pDrawable->pScreen); + register int r; + int patx, paty; + + patx = 16 - (pDrawable->x & 0xf); + paty = 16 - (pDrawable->y & 0xf); + stipple->patalign = (patx << 16) | paty; + GXDrawInit(gx,0,gx_solid_rop_table[GXcopy]|POLY_N,~0); + GXStippleInit(gx, stipple); + while (nBox--) { + gx->arecty = pBox->y1; + gx->arectx = pBox->x1; + gx->arecty = pBox->y2; + gx->arectx = pBox->x2; + pBox++; + GXDrawDone(gx,r); + } + GXWait(gx,r); +} + +Bool +sunGXCheckTile (pPixmap, stipple) + PixmapPtr pPixmap; + sunGXStipplePtr stipple; +{ + unsigned short *sbits; + unsigned int fg = (unsigned int)~0, bg = (unsigned int)~0; + unsigned char *tilebitsLine, *tilebits, tilebit; + unsigned short sbit, mask; + int nbwidth; + int h, w; + int x, y; + int s_y, s_x; + + h = pPixmap->drawable.height; + if (h > 16 || (h & (h - 1))) + return FALSE; + w = pPixmap->drawable.width; + if (w > 16 || (w & (w - 1))) + return FALSE; + sbits = (unsigned short *) stipple->bits; + tilebitsLine = (unsigned char *) pPixmap->devPrivate.ptr; + nbwidth = pPixmap->devKind; + for (y = 0; y < h; y++) { + tilebits = tilebitsLine; + tilebitsLine += nbwidth; + sbit = 0; + mask = 1 << 15; + for (x = 0; x < w; x++) + { + tilebit = *tilebits++; + if (tilebit == fg) + sbit |= mask; + else if (tilebit != bg) + { + if (fg == ~0) + { + fg = tilebit; + sbit |= mask; + } + else if (bg == ~0) + { + bg = tilebit; + } + else + { + return FALSE; + } + } + mask >>= 1; + } + for (s_x = w; s_x < 16; s_x <<= 1) + sbit = sbit | (sbit >> s_x); + for (s_y = y; s_y < 16; s_y += h) + sbits[s_y] = sbit; + } + stipple->fore = fg; + stipple->back = bg; + return TRUE; +} + +Bool +sunGXCheckStipple (pPixmap, stipple) + PixmapPtr pPixmap; + sunGXStipplePtr stipple; +{ + unsigned short *sbits; + unsigned long *stippleBits; + unsigned long sbit, mask; + int h, w; + int y; + int s_y, s_x; + + h = pPixmap->drawable.height; + if (h > 16 || (h & (h - 1))) + return FALSE; + w = pPixmap->drawable.width; + if (w > 16 || (w & (w - 1))) + return FALSE; + sbits = (unsigned short *) stipple->bits; + stippleBits = (unsigned long *) pPixmap->devPrivate.ptr; + mask = ((1 << w) - 1) << (16 - w); + for (y = 0; y < h; y++) { + sbit = (*stippleBits++ >> 16) & mask; + for (s_x = w; s_x < 16; s_x <<= 1) + sbit = sbit | (sbit >> s_x); + for (s_y = y; s_y < 16; s_y += h) + sbits[s_y] = sbit; + } + return TRUE; +} + +/* cache one stipple; figuring out if we can use the stipple is as hard as + * computing it, so we just use this one and leave it here if it + * can't be used this time + */ + +static sunGXStipplePtr tmpStipple; + +Bool +sunGXCheckFill (pGC, pDrawable) + GCPtr pGC; + DrawablePtr pDrawable; +{ + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + sunGXStipplePtr stipple; + Uint alu; + int xrot, yrot; + + if (pGC->fillStyle == FillSolid) + { + if (gxPriv->stipple) + { + xfree (gxPriv->stipple); + gxPriv->stipple = 0; + } + return TRUE; + } + if (!(stipple = gxPriv->stipple)) + { + if (!tmpStipple) + { + tmpStipple = (sunGXStipplePtr) xalloc (sizeof *tmpStipple); + if (!tmpStipple) + return FALSE; + } + stipple = tmpStipple; + } + alu = gx_opaque_stipple_rop_table[pGC->alu]|GX_PATTERN_MASK; + switch (pGC->fillStyle) { + case FillTiled: + if (!sunGXCheckTile (pGC->tile.pixmap, stipple)) + { + if (gxPriv->stipple) + { + xfree (gxPriv->stipple); + gxPriv->stipple = 0; + } + return FALSE; + } + break; + case FillStippled: + alu = gx_stipple_rop_table[pGC->alu]|GX_PATTERN_MASK; + case FillOpaqueStippled: + if (!sunGXCheckStipple (pGC->stipple, stipple)) + { + if (gxPriv->stipple) + { + xfree (gxPriv->stipple); + gxPriv->stipple = 0; + } + return FALSE; + } + stipple->fore = pGC->fgPixel; + stipple->back = pGC->bgPixel; + break; + } + xrot = (pGC->patOrg.x + pDrawable->x) & 0xf; + yrot = (pGC->patOrg.y + pDrawable->y) & 0xf; +/* + stipple->patalign = ((16 - (xrot & 0xf)) << 16) | (16 - (yrot & 0xf)); +*/ + xrot = 16 - xrot; + yrot = 16 - yrot; + stipple->patalign = (xrot << 16) | yrot; + stipple->alu = alu; + gxPriv->stipple = stipple; + if (stipple == tmpStipple) + tmpStipple = 0; + return TRUE; +} + +void sunGXValidateGC (); +void sunGXDestroyGC (); + +GCFuncs sunGXGCFuncs = { + sunGXValidateGC, + miChangeGC, + miCopyGC, + sunGXDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip +}; + +GCOps sunGXTEOps1Rect = { + sunGXFillSpans, + cfbSetSpans, + cfbPutImage, + sunGXCopyArea, + sunGXCopyPlane, + cfbPolyPoint, + sunGXPolylines1Rect, + sunGXPolySeg1Rect, + miPolyRectangle, + cfbZeroPolyArcSS8Copy, + sunGXFillPoly1Rect, + sunGXPolyFillRect1Rect, + sunGXPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + sunGXTEGlyphBlt, + sunGXPolyTEGlyphBlt, + cfbPushPixels8 +#ifdef NEED_LINEHELPER + ,NULL +#endif +}; + +GCOps sunGXTEOps = { + sunGXFillSpans, + cfbSetSpans, + cfbPutImage, + sunGXCopyArea, + sunGXCopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, + cfbZeroPolyArcSS8Copy, + miFillPolygon, + sunGXPolyFillRect, + sunGXPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + sunGXTEGlyphBlt, + sunGXPolyTEGlyphBlt, + cfbPushPixels8 +#ifdef NEED_LINEHELPER + ,NULL +#endif +}; + +GCOps sunGXNonTEOps1Rect = { + sunGXFillSpans, + cfbSetSpans, + cfbPutImage, + sunGXCopyArea, + sunGXCopyPlane, + cfbPolyPoint, + sunGXPolylines1Rect, + sunGXPolySeg1Rect, + miPolyRectangle, + cfbZeroPolyArcSS8Copy, + sunGXFillPoly1Rect, + sunGXPolyFillRect1Rect, + sunGXPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + miImageGlyphBlt, + sunGXPolyGlyphBlt, + cfbPushPixels8 +#ifdef NEED_LINEHELPER + ,NULL +#endif +}; + +GCOps sunGXNonTEOps = { + sunGXFillSpans, + cfbSetSpans, + cfbPutImage, + sunGXCopyArea, + sunGXCopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, + cfbZeroPolyArcSS8Copy, + miFillPolygon, + sunGXPolyFillRect, + sunGXPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + miImageGlyphBlt, + sunGXPolyGlyphBlt, + cfbPushPixels8 +#ifdef NEED_LINEHELPER + ,NULL +#endif +}; + +#define FONTWIDTH(font) (FONTMAXBOUNDS(font,rightSideBearing) - \ + FONTMINBOUNDS(font,leftSideBearing)) + +GCOps * +sunGXMatchCommon (pGC, devPriv) + GCPtr pGC; + cfbPrivGCPtr devPriv; +{ + if (pGC->lineWidth != 0) + return 0; + if (pGC->lineStyle != LineSolid) + return 0; + if (pGC->fillStyle != FillSolid) + return 0; + if (devPriv->rop != GXcopy) + return 0; + if (!WID_OK(pGC->pScreen)) + return 0; + if (pGC->font && + FONTWIDTH (pGC->font) <= 32 && + FONTMINBOUNDS(pGC->font,characterWidth) >= 0) + { + if (TERMINALFONT(pGC->font)) + if (devPriv->oneRect) + return &sunGXTEOps1Rect; + else + return &sunGXTEOps; + else + if (devPriv->oneRect) + return &sunGXNonTEOps1Rect; + else + return &sunGXNonTEOps; + } + return 0; +} + +void +sunGXValidateGC (pGC, changes, pDrawable) + GCPtr pGC; + Mask changes; + DrawablePtr pDrawable; +{ + int mask; /* stateChanges */ + int index; /* used for stepping through bitfields */ + int new_rrop; + int new_line, new_text, new_fillspans, new_fillarea; + int new_rotate; + int xrot, yrot; + /* flags for changing the proc vector */ + cfbPrivGCPtr devPriv; + sunGXPrivGCPtr gxPriv; + int oneRect; + int canGX; + int widOK; + + gxPriv = sunGXGetGCPrivate (pGC); + widOK = WID_OK(pGC->pScreen); + if (pDrawable->type != DRAWABLE_WINDOW) + { + if (gxPriv->type == DRAWABLE_WINDOW) + { + extern GCOps cfbNonTEOps; + + miDestroyGCOps (pGC->ops); + pGC->ops = &cfbNonTEOps; + changes = (1 << (GCLastBit + 1)) - 1; + pGC->stateChanges = changes; + gxPriv->type = pDrawable->type; + } + cfbValidateGC (pGC, changes, pDrawable); + return; + } + if (gxPriv->type != DRAWABLE_WINDOW) + { + changes = (1 << (GCLastBit + 1)) - 1; + gxPriv->type = DRAWABLE_WINDOW; + } + + new_rotate = pGC->lastWinOrg.x != pDrawable->x || + pGC->lastWinOrg.y != pDrawable->y; + + pGC->lastWinOrg.x = pDrawable->x; + pGC->lastWinOrg.y = pDrawable->y; + + devPriv = ((cfbPrivGCPtr) (pGC->devPrivates[cfbGCPrivateIndex].ptr)); + + new_rrop = FALSE; + new_line = FALSE; + new_text = FALSE; + new_fillspans = FALSE; + new_fillarea = FALSE; + + /* + * if the client clip is different or moved OR the subwindowMode has + * changed OR the window's clip has changed since the last validation + * we need to recompute the composite clip + */ + + if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) + ) + { + miComputeCompositeClip(pGC, pDrawable); + oneRect = REGION_NUM_RECTS(pGC->pCompositeClip) == 1; + if (oneRect != devPriv->oneRect) + { + new_line = TRUE; + new_fillarea = TRUE; + devPriv->oneRect = oneRect; + } + } + + mask = changes; + while (mask) { + index = lowbit (mask); + mask &= ~index; + + /* + * this switch acculmulates a list of which procedures might have + * to change due to changes in the GC. in some cases (e.g. + * changing one 16 bit tile for another) we might not really need + * a change, but the code is being paranoid. this sort of batching + * wins if, for example, the alu and the font have been changed, + * or any other pair of items that both change the same thing. + */ + switch (index) { + case GCFunction: + case GCForeground: + new_rrop = TRUE; + break; + case GCPlaneMask: + new_rrop = TRUE; + new_text = TRUE; + break; + case GCBackground: + break; + case GCLineStyle: + case GCLineWidth: + new_line = TRUE; + break; + case GCCapStyle: + break; + case GCJoinStyle: + break; + case GCFillStyle: + new_text = TRUE; + new_fillspans = TRUE; + new_line = TRUE; + new_fillarea = TRUE; + break; + case GCFillRule: + break; + case GCTile: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + + case GCStipple: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + + case GCTileStipXOrigin: + new_rotate = TRUE; + break; + + case GCTileStipYOrigin: + new_rotate = TRUE; + break; + + case GCFont: + new_text = TRUE; + break; + case GCSubwindowMode: + break; + case GCGraphicsExposures: + break; + case GCClipXOrigin: + break; + case GCClipYOrigin: + break; + case GCClipMask: + break; + case GCDashOffset: + break; + case GCDashList: + break; + case GCArcMode: + break; + default: + break; + } + } + + /* + * If the drawable has changed, check its depth & ensure suitable + * entries are in the proc vector. + */ + if (pDrawable->serialNumber != (pGC->serialNumber & (DRAWABLE_SERIAL_BITS))) { + new_fillspans = TRUE; /* deal with FillSpans later */ + } + + if ((new_rotate || new_fillspans)) + { + Bool new_pix = FALSE; + xrot = pGC->patOrg.x + pDrawable->x; + yrot = pGC->patOrg.y + pDrawable->y; + + if (!sunGXCheckFill (pGC, pDrawable)) + { + switch (pGC->fillStyle) + { + case FillTiled: + if (!pGC->tileIsPixel) + { + int width = pGC->tile.pixmap->drawable.width * PSZ; + + if ((width <= 32) && !(width & (width - 1))) + { + cfbCopyRotatePixmap(pGC->tile.pixmap, + &pGC->pRotatedPixmap, + xrot, yrot); + new_pix = TRUE; + } + } + break; + case FillStippled: + case FillOpaqueStippled: + { + int width = pGC->stipple->drawable.width; + + if ((width <= 32) && !(width & (width - 1))) + { + mfbCopyRotatePixmap(pGC->stipple, + &pGC->pRotatedPixmap, xrot, yrot); + new_pix = TRUE; + } + } + break; + } + } + if (!new_pix && pGC->pRotatedPixmap) + { + cfbDestroyPixmap(pGC->pRotatedPixmap); + pGC->pRotatedPixmap = (PixmapPtr) NULL; + } + } + + if (new_rrop) + { + int old_rrop; + + if (gxPriv->stipple) + { + if (pGC->fillStyle == FillStippled) + gxPriv->stipple->alu = gx_stipple_rop_table[pGC->alu]|GX_PATTERN_MASK; + else + gxPriv->stipple->alu = gx_opaque_stipple_rop_table[pGC->alu]|GX_PATTERN_MASK; + if (pGC->fillStyle != FillTiled) + { + gxPriv->stipple->fore = pGC->fgPixel; + gxPriv->stipple->back = pGC->bgPixel; + } + } + old_rrop = devPriv->rop; + devPriv->rop = cfbReduceRasterOp (pGC->alu, pGC->fgPixel, + pGC->planemask, + &devPriv->and, &devPriv->xor); + if (old_rrop == devPriv->rop) + new_rrop = FALSE; + else + { + new_line = TRUE; + new_text = TRUE; + new_fillspans = TRUE; + new_fillarea = TRUE; + } + } + + if (new_rrop || new_fillspans || new_text || new_fillarea || new_line) + { + GCOps *newops; + + if ((newops = sunGXMatchCommon (pGC, devPriv))) + { + if (pGC->ops->devPrivate.val) + miDestroyGCOps (pGC->ops); + pGC->ops = newops; + new_rrop = new_line = new_fillspans = new_text = new_fillarea = 0; + } + else + { + if (!pGC->ops->devPrivate.val) + { + pGC->ops = miCreateGCOps (pGC->ops); + pGC->ops->devPrivate.val = 1; + } + } + } + + canGX = pGC->fillStyle == FillSolid || gxPriv->stipple; + + /* deal with the changes we've collected */ + if (new_line) + { + pGC->ops->FillPolygon = miFillPolygon; + if (devPriv->oneRect && canGX) + pGC->ops->FillPolygon = sunGXFillPoly1Rect; + if (pGC->lineWidth == 0) + { + if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid)) + { + switch (devPriv->rop) + { + case GXxor: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Xor; + break; + case GXcopy: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Copy; + break; + default: + pGC->ops->PolyArc = cfbZeroPolyArcSS8General; + break; + } + } + else + pGC->ops->PolyArc = miZeroPolyArc; + } + else + pGC->ops->PolyArc = miPolyArc; + pGC->ops->PolySegment = miPolySegment; + switch (pGC->lineStyle) + { + case LineSolid: + if(pGC->lineWidth == 0) + { + if (devPriv->oneRect && canGX && widOK) + { + pGC->ops->PolySegment = sunGXPolySeg1Rect; + pGC->ops->Polylines = sunGXPolylines1Rect; + } + else if (pGC->fillStyle == FillSolid) + { + if (devPriv->oneRect) + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } + else + { + pGC->ops->Polylines = cfbLineSS; + pGC->ops->PolySegment = cfbSegmentSS; + } + } + else + pGC->ops->Polylines = miZeroLine; + } + else + pGC->ops->Polylines = miWideLine; + break; + case LineOnOffDash: + case LineDoubleDash: + if (pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) + { + pGC->ops->Polylines = cfbLineSD; + pGC->ops->PolySegment = cfbSegmentSD; + } else + pGC->ops->Polylines = miWideDash; + break; + } + } + + if (new_text && (pGC->font)) + { + if (FONTWIDTH(pGC->font) > 32 || + FONTMINBOUNDS(pGC->font,characterWidth) < 0) + { + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + else + { + if (pGC->fillStyle == FillSolid) + { + if (TERMINALFONT (pGC->font)) + pGC->ops->PolyGlyphBlt = sunGXPolyTEGlyphBlt; + else + pGC->ops->PolyGlyphBlt = sunGXPolyGlyphBlt; + } + else + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + /* special case ImageGlyphBlt for terminal emulator fonts */ + if (TERMINALFONT(pGC->font)) + pGC->ops->ImageGlyphBlt = sunGXTEGlyphBlt; + else + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + } + + + if (new_fillspans) { + if (canGX) + pGC->ops->FillSpans = sunGXFillSpans; + else switch (pGC->fillStyle) { + case FillTiled: + if (pGC->pRotatedPixmap) + { + if (pGC->alu == GXcopy && (pGC->planemask & PMSK) == PMSK) + pGC->ops->FillSpans = cfbTile32FSCopy; + else + pGC->ops->FillSpans = cfbTile32FSGeneral; + } + else + pGC->ops->FillSpans = cfbUnnaturalTileFS; + break; + case FillStippled: + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = cfb8Stipple32FS; + else + pGC->ops->FillSpans = cfbUnnaturalStippleFS; + break; + case FillOpaqueStippled: + if (pGC->pRotatedPixmap) + pGC->ops->FillSpans = cfb8OpaqueStipple32FS; + else + pGC->ops->FillSpans = cfbUnnaturalStippleFS; + break; + default: + FatalError("cfbValidateGC: illegal fillStyle\n"); + } + } /* end of new_fillspans */ + + if (new_fillarea) { + pGC->ops->PolyFillRect = cfbPolyFillRect; + pGC->ops->PolyFillArc = miPolyFillArc; + if (canGX) + { + pGC->ops->PolyFillArc = sunGXPolyFillArc; + pGC->ops->PolyFillRect = sunGXPolyFillRect; + if (devPriv->oneRect) + pGC->ops->PolyFillRect = sunGXPolyFillRect1Rect; + } + pGC->ops->PushPixels = mfbPushPixels; + if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy) + pGC->ops->PushPixels = cfbPushPixels8; + } +} + +void +sunGXDestroyGC (pGC) + GCPtr pGC; +{ + sunGXPrivGCPtr gxPriv = sunGXGetGCPrivate (pGC); + + if (gxPriv->stipple) + xfree (gxPriv->stipple); + miDestroyGC (pGC); +} + +Bool +sunGXCreateGC (pGC) + GCPtr pGC; +{ + sunGXPrivGCPtr gxPriv; + if (pGC->depth == 1) + return mfbCreateGC (pGC); + if (!cfbCreateGC (pGC)) + return FALSE; + pGC->ops = &sunGXNonTEOps; + pGC->funcs = &sunGXGCFuncs; + gxPriv = sunGXGetGCPrivate(pGC); + gxPriv->type = DRAWABLE_WINDOW; + gxPriv->stipple = 0; + return TRUE; +} + +Bool +sunGXCreateWindow (pWin) + WindowPtr pWin; +{ + if (!cfbCreateWindow (pWin)) + return FALSE; + pWin->devPrivates[sunGXWindowPrivateIndex].ptr = 0; + return TRUE; +} + +Bool +sunGXDestroyWindow (pWin) + WindowPtr pWin; +{ + sunGXStipplePtr stipple = sunGXGetWindowPrivate(pWin); + xfree (stipple); + return cfbDestroyWindow (pWin); +} + +Bool +sunGXChangeWindowAttributes (pWin, mask) + WindowPtr pWin; + Mask mask; +{ + sunGXStipplePtr stipple; + Mask index; + WindowPtr pBgWin; + register cfbPrivWin *pPrivWin; + int width; + + pPrivWin = (cfbPrivWin *)(pWin->devPrivates[cfbWindowPrivateIndex].ptr); + /* + * When background state changes from ParentRelative and + * we had previously rotated the fast border pixmap to match + * the parent relative origin, rerotate to match window + */ + if (mask & (CWBackPixmap | CWBackPixel) && + pWin->backgroundState != ParentRelative && + pPrivWin->fastBorder && + (pPrivWin->oldRotate.x != pWin->drawable.x || + pPrivWin->oldRotate.y != pWin->drawable.y)) + { + cfbXRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.x - pPrivWin->oldRotate.x); + cfbYRotatePixmap(pPrivWin->pRotatedBorder, + pWin->drawable.y - pPrivWin->oldRotate.y); + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + while (mask) + { + index = lowbit(mask); + mask &= ~index; + switch (index) + { + case CWBackPixmap: + stipple = sunGXGetWindowPrivate(pWin); + if (pWin->backgroundState == None || + pWin->backgroundState == ParentRelative) + { + pPrivWin->fastBackground = FALSE; + if (stipple) + { + xfree (stipple); + sunGXSetWindowPrivate(pWin,0); + } + /* Rotate border to match parent origin */ + if (pWin->backgroundState == ParentRelative && + pPrivWin->pRotatedBorder) + { + for (pBgWin = pWin->parent; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + cfbXRotatePixmap(pPrivWin->pRotatedBorder, + pBgWin->drawable.x - pPrivWin->oldRotate.x); + cfbYRotatePixmap(pPrivWin->pRotatedBorder, + pBgWin->drawable.y - pPrivWin->oldRotate.y); + } + + break; + } + if (!stipple) + { + if (!tmpStipple) + tmpStipple = (sunGXStipplePtr) xalloc (sizeof *tmpStipple); + stipple = tmpStipple; + } + if (stipple && sunGXCheckTile (pWin->background.pixmap, stipple)) + { + stipple->alu = gx_opaque_stipple_rop_table[GXcopy]|GX_PATTERN_MASK; + pPrivWin->fastBackground = FALSE; + if (stipple == tmpStipple) + { + sunGXSetWindowPrivate(pWin, stipple); + tmpStipple = 0; + } + break; + } + if ((stipple = sunGXGetWindowPrivate(pWin))) + { + xfree (stipple); + sunGXSetWindowPrivate(pWin,0); + } + if (((width = (pWin->background.pixmap->drawable.width * PSZ)) <= 32) && + !(width & (width - 1))) + { + cfbCopyRotatePixmap(pWin->background.pixmap, + &pPrivWin->pRotatedBackground, + pWin->drawable.x, + pWin->drawable.y); + if (pPrivWin->pRotatedBackground) + { + pPrivWin->fastBackground = TRUE; + pPrivWin->oldRotate.x = pWin->drawable.x; + pPrivWin->oldRotate.y = pWin->drawable.y; + } + else + { + pPrivWin->fastBackground = FALSE; + } + break; + } + pPrivWin->fastBackground = FALSE; + break; + + case CWBackPixel: + pPrivWin->fastBackground = FALSE; + break; + + case CWBorderPixmap: + /* don't bother with accelerator for border tiles (just lazy) */ + if (((width = (pWin->border.pixmap->drawable.width * PSZ)) <= 32) && + !(width & (width - 1))) + { + for (pBgWin = pWin; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + cfbCopyRotatePixmap(pWin->border.pixmap, + &pPrivWin->pRotatedBorder, + pBgWin->drawable.x, + pBgWin->drawable.y); + if (pPrivWin->pRotatedBorder) + { + pPrivWin->fastBorder = TRUE; + pPrivWin->oldRotate.x = pBgWin->drawable.x; + pPrivWin->oldRotate.y = pBgWin->drawable.y; + } + else + { + pPrivWin->fastBorder = TRUE; + } + } + else + { + pPrivWin->fastBorder = FALSE; + } + break; + case CWBorderPixel: + pPrivWin->fastBorder = FALSE; + break; + } + } + return (TRUE); +} + +void +sunGXPaintWindow(pWin, pRegion, what) + WindowPtr pWin; + RegionPtr pRegion; + int what; +{ + register cfbPrivWin *pPrivWin; + sunGXStipplePtr stipple; + WindowPtr pBgWin; + pPrivWin = (cfbPrivWin *)(pWin->devPrivates[cfbWindowPrivateIndex].ptr); + + switch (what) { + case PW_BACKGROUND: + stipple = sunGXGetWindowPrivate(pWin); + switch (pWin->backgroundState) { + case None: + return; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + return; + case BackgroundPixmap: + if (stipple) + { + sunGXFillBoxStipple ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + stipple); + } + else if (pPrivWin->fastBackground) + { + cfbFillBoxTile32 ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pPrivWin->pRotatedBackground); + } + else + { + cfbFillBoxTileOdd ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->background.pixmap, + (int) pWin->drawable.x, (int) pWin->drawable.y); + } + return; + case BackgroundPixel: + sunGXFillBoxSolid((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->background.pixel); + return; + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) + { + sunGXFillBoxSolid((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->border.pixel); + return; + } + else if (pPrivWin->fastBorder) + { + cfbFillBoxTile32 ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pPrivWin->pRotatedBorder); + return; + } + else + { + for (pBgWin = pWin; + pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + + cfbFillBoxTileOdd ((DrawablePtr)pWin, + (int)REGION_NUM_RECTS(pRegion), + REGION_RECTS(pRegion), + pWin->border.pixmap, + (int) pBgWin->drawable.x, + (int) pBgWin->drawable.y); + return; + } + break; + } +} + +void +sunGXCopyWindow(pWin, ptOldOrg, prgnSrc) + WindowPtr pWin; + DDXPointRec ptOldOrg; + RegionPtr prgnSrc; +{ + DDXPointPtr pptSrc; + register DDXPointPtr ppt; + RegionPtr prgnDst; + register BoxPtr pbox; + register int dx, dy; + register int i, nbox; + WindowPtr pwinRoot; + extern WindowPtr *WindowTable; + + pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; + + prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, &pWin->borderClip, prgnSrc); + + pbox = REGION_RECTS(prgnDst); + nbox = REGION_NUM_RECTS(prgnDst); + if(!(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) + return; + ppt = pptSrc; + + for (i = nbox; --i >= 0; ppt++, pbox++) + { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + sunGXDoBitblt ((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, + GXcopy, prgnDst, pptSrc, ~0L); + DEALLOCATE_LOCAL(pptSrc); + REGION_DESTROY(pWin->drawable.pScreen, prgnDst); +} + +Bool +sunGXInit ( + ScreenPtr pScreen, + fbFd *fb) +{ + sunGXPtr gx; + Uint mode; + register long r; + + if (serverGeneration != sunGXGeneration) + { + sunGXScreenPrivateIndex = AllocateScreenPrivateIndex(); + if (sunGXScreenPrivateIndex == -1) + return FALSE; + sunGXGCPrivateIndex = AllocateGCPrivateIndex (); + sunGXWindowPrivateIndex = AllocateWindowPrivateIndex (); + sunGXGeneration = serverGeneration; + } + if (!AllocateGCPrivate(pScreen, sunGXGCPrivateIndex, sizeof (sunGXPrivGCRec))) + return FALSE; + if (!AllocateWindowPrivate(pScreen, sunGXWindowPrivateIndex, 0)) + return FALSE; + gx = (sunGXPtr) fb->fb; + mode = gx->mode; + GXWait(gx,r); + mode &= ~( GX_BLIT_ALL | + GX_MODE_ALL | + GX_DRAW_ALL | + GX_BWRITE0_ALL | + GX_BWRITE1_ALL | + GX_BREAD_ALL | + GX_BDISP_ALL); + mode |= GX_BLIT_SRC | + GX_MODE_COLOR8 | + GX_DRAW_RENDER | + GX_BWRITE0_ENABLE | + GX_BWRITE1_DISABLE | + GX_BREAD_0 | + GX_BDISP_0; + gx->mode = mode; + gx->clip = 0; + gx->offx = 0; + gx->offy = 0; + gx->clipminx = 0; + gx->clipminy = 0; + gx->clipmaxx = fb->info.fb_width - 1; + gx->clipmaxy = fb->info.fb_height - 1; + pScreen->devPrivates[sunGXScreenPrivateIndex].ptr = (pointer) gx; + /* + * Replace various screen functions + */ + pScreen->CreateGC = sunGXCreateGC; + pScreen->CreateWindow = sunGXCreateWindow; + pScreen->ChangeWindowAttributes = sunGXChangeWindowAttributes; + pScreen->DestroyWindow = sunGXDestroyWindow; + pScreen->PaintWindowBackground = sunGXPaintWindow; + pScreen->PaintWindowBorder = sunGXPaintWindow; + pScreen->CopyWindow = sunGXCopyWindow; + return TRUE; +} diff --git a/nx-X11/programs/Xserver/hw/sun/sunGX.h b/nx-X11/programs/Xserver/hw/sun/sunGX.h new file mode 100644 index 000000000..ebf1da19f --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunGX.h @@ -0,0 +1,238 @@ +/* + * $Xorg: sunGX.h,v 1.4 2001/02/09 02:04:44 xorgcvs Exp $ + * +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author: Keith Packard, MIT X Consortium + */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunGX.h,v 1.3 2001/07/29 05:01:13 tsi Exp $ */ + +typedef unsigned int Uint; +typedef volatile Uint VUint; + +/* modes */ +#define GX_INDEX(n) ((n) << 4) +#define GX_INDEX_ALL 0x00000030 +#define GX_INDEX_MOD 0x00000040 +#define GX_BDISP_0 0x00000080 +#define GX_BDISP_1 0x00000100 +#define GX_BDISP_ALL 0x00000180 +#define GX_BREAD_0 0x00000200 +#define GX_BREAD_1 0x00000400 +#define GX_BREAD_ALL 0x00000600 +#define GX_BWRITE1_ENABLE 0x00000800 +#define GX_BWRITE1_DISABLE 0x00001000 +#define GX_BWRITE1_ALL 0x00001800 +#define GX_BWRITE0_ENABLE 0x00002000 +#define GX_BWRITE0_DISABLE 0x00004000 +#define GX_BWRITE0_ALL 0x00006000 +#define GX_DRAW_RENDER 0x00008000 +#define GX_DRAW_PICK 0x00010000 +#define GX_DRAW_ALL 0x00018000 +#define GX_MODE_COLOR8 0x00020000 +#define GX_MODE_COLOR1 0x00040000 +#define GX_MODE_HRMONO 0x00060000 +#define GX_MODE_ALL 0x00060000 +#define GX_VBLANK 0x00080000 +#define GX_BLIT_NOSRC 0x00100000 +#define GX_BLIT_SRC 0x00200000 +#define GX_BLIT_ALL 0x00300000 + +/* rasterops */ +#define GX_ROP_CLEAR 0x0 +#define GX_ROP_INVERT 0x1 +#define GX_ROP_NOOP 0x2 +#define GX_ROP_SET 0x3 + +#define GX_ROP_00_0(rop) ((rop) << 0) +#define GX_ROP_00_1(rop) ((rop) << 2) +#define GX_ROP_01_0(rop) ((rop) << 4) +#define GX_ROP_01_1(rop) ((rop) << 6) +#define GX_ROP_10_0(rop) ((rop) << 8) +#define GX_ROP_10_1(rop) ((rop) << 10) +#define GX_ROP_11_0(rop) ((rop) << 12) +#define GX_ROP_11_1(rop) ((rop) << 14) +#define GX_PLOT_PLOT 0x00000000 +#define GX_PLOT_UNPLOT 0x00020000 +#define GX_RAST_BOOL 0x00000000 +#define GX_RAST_LINEAR 0x00040000 +#define GX_ATTR_UNSUPP 0x00400000 +#define GX_ATTR_SUPP 0x00800000 +#define GX_POLYG_OVERLAP 0x01000000 +#define GX_POLYG_NONOVERLAP 0x02000000 +#define GX_PATTERN_ZEROS 0x04000000 +#define GX_PATTERN_ONES 0x08000000 +#define GX_PATTERN_MASK 0x0c000000 +#define GX_PIXEL_ZEROS 0x10000000 +#define GX_PIXEL_ONES 0x20000000 +#define GX_PIXEL_MASK 0x30000000 +#define GX_PLANE_ZEROS 0x40000000 +#define GX_PLANE_ONES 0x80000000 +#define GX_PLANE_MASK 0xc0000000 + +typedef struct _sunGX { + Uint junk0[1]; + VUint mode; + VUint clip; + Uint junk1[1]; + VUint s; + VUint draw; + VUint blit; + VUint font; + Uint junk2[24]; + VUint x0, y0, z0, color0; + VUint x1, y1, z1, color1; + VUint x2, y2, z2, color2; + VUint x3, y3, z3, color3; + VUint offx, offy; + Uint junk3[2]; + VUint incx, incy; + Uint junk4[2]; + VUint clipminx, clipminy; + Uint junk5[2]; + VUint clipmaxx, clipmaxy; + Uint junk6[2]; + VUint fg; + VUint bg; + VUint alu; + VUint pm; + VUint pixelm; + Uint junk7[2]; + VUint patalign; + VUint pattern[8]; + Uint junk8[432]; + VUint apointx, apointy, apointz; + Uint junk9[1]; + VUint rpointx, rpointy, rpointz; + Uint junk10[5]; + VUint pointr, pointg, pointb, pointa; + VUint alinex, aliney, alinez; + Uint junk11[1]; + VUint rlinex, rliney, rlinez; + Uint junk12[5]; + VUint liner, lineg, lineb, linea; + VUint atrix, atriy, atriz; + Uint junk13[1]; + VUint rtrix, rtriy, rtriz; + Uint junk14[5]; + VUint trir, trig, trib, tria; + VUint aquadx, aquady, aquadz; + Uint junk15[1]; + VUint rquadx, rquady, rquadz; + Uint junk16[5]; + VUint quadr, quadg, quadb, quada; + VUint arectx, arecty, arectz; + Uint junk17[1]; + VUint rrectx, rrecty, rrectz; + Uint junk18[5]; + VUint rectr, rectg, rectb, recta; +} sunGX, *sunGXPtr; + +/* Macros */ + +#define GX_ROP_USE_PIXELMASK 0x30000000 + +#define GX_BLT_INPROGRESS 0x20000000 + +#define GX_INPROGRESS 0x10000000 +#define GX_FULL 0x20000000 + +#define GXWait(gx,r)\ + do\ + (r) = (int) (gx)->s; \ + while ((r) & GX_INPROGRESS) + +#define GXDrawDone(gx,r) \ + do \ + (r) = (int) (gx)->draw; \ + while ((r) < 0 && ((r) & GX_FULL)) + +#define GXBlitDone(gx,r)\ + do\ + (r)= (int) (gx)->blit; \ + while ((r) < 0 && ((r) & GX_BLT_INPROGRESS)) + +#define GXBlitInit(gx,rop,pmsk) {\ + gx->fg = 0xff;\ + gx->bg = 0x00;\ + gx->pixelm = ~0;\ + gx->s = 0;\ + gx->alu = rop;\ + gx->pm = pmsk;\ + gx->clip = 0;\ +} + +#define GXDrawInit(gx,fore,rop,pmsk) {\ + gx->fg = fore;\ + gx->bg = 0x00; \ + gx->pixelm = ~0; \ + gx->s = 0; \ + gx->alu = rop; \ + gx->pm = pmsk; \ + gx->clip = 0;\ +} + +#define GXStippleInit(gx,stipple) {\ + int _i; \ + Uint *sp; \ + VUint *dp; \ + _i = 8; \ + sp = stipple->bits; \ + dp = gx->pattern; \ + while (_i--) { \ + dp[_i] = sp[_i]; \ + } \ + gx->fg = stipple->fore; \ + gx->bg = stipple->back; \ + gx->patalign = stipple->patalign; \ + gx->alu = stipple->alu; \ +} + +extern int sunGXScreenPrivateIndex; +extern int sunGXGCPrivateIndex; +extern int sunGXWindowPrivateIndex; + +#define sunGXGetScreenPrivate(s) ((sunGXPtr) \ + (s)->devPrivates[sunGXScreenPrivateIndex].ptr) + +typedef struct _sunGXStipple { + Uint fore, back; + Uint patalign; + Uint alu; + Uint bits[8]; /* actually 16 shorts */ +} sunGXStippleRec, *sunGXStipplePtr; + +typedef struct _sunGXPrivGC { + int type; + sunGXStipplePtr stipple; +} sunGXPrivGCRec, *sunGXPrivGCPtr; + +#define sunGXGetGCPrivate(g) ((sunGXPrivGCPtr) \ + (g)->devPrivates[sunGXGCPrivateIndex].ptr) + +#define sunGXGetWindowPrivate(w) ((sunGXStipplePtr) \ + (w)->devPrivates[sunGXWindowPrivateIndex].ptr) + +#define sunGXSetWindowPrivate(w,p) (\ + (w)->devPrivates[sunGXWindowPrivateIndex].ptr = (pointer) p) + diff --git a/nx-X11/programs/Xserver/hw/sun/sunInit.c b/nx-X11/programs/Xserver/hw/sun/sunInit.c new file mode 100644 index 000000000..62cc8c76a --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunInit.c @@ -0,0 +1,960 @@ +/* $Xorg: sunInit.c,v 1.4 2000/08/17 19:48:29 cpqbld Exp $ */ +/* + * sunInit.c -- + * Initialization functions for screen/keyboard/mouse, etc. + * + * Copyright 1987 by the Regents of the University of California + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + * + * + */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunInit.c,v 3.12 2002/12/06 02:11:44 tsi Exp $ */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*******************************************************/ + +#include "sun.h" +#include "gcstruct.h" +#include "mi.h" +#include "mibstore.h" +#include "cfb.h" +#include "cfb16.h" +#include "cfb32.h" + +/* maximum pixmap depth */ +#ifndef SUNMAXDEPTH +#define SUNMAXDEPTH 8 +#endif + +#ifdef i386 /* { */ +#define BW2I NULL +#else /* }{ */ +extern Bool sunBW2Init( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define BW2I sunBW2Init +#endif /* } */ + + +#if SUNMAXDEPTH == 1 /* { */ +#define CG2I NULL +#define CG3I NULL +#define CG4I NULL +#define CG6I NULL +#define CG8I NULL +#define TCXI NULL +#else /* }{ */ +extern Bool sunCG3Init( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define CG3I sunCG3Init +#if defined(i386) || defined(__bsdi__) /* { */ +#define CG2I NULL +#define CG4I NULL +#else /* }{ */ +#ifdef INCLUDE_CG2_HEADER +extern Bool sunCG2Init( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define CG2I sunCG2Init +#endif /* INCLUDE_CG2_HEADER */ +extern Bool sunCG4Init( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define CG4I sunCG4Init +#endif /* } */ +#ifdef FBTYPE_SUNFAST_COLOR /* { */ +extern Bool sunCG6Init( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define CG6I sunCG6Init +#else /* }{ */ +#define CG6I NULL +#endif /* } */ +#ifdef XFBTYPE_TCX /* { */ +extern Bool sunTCXInit( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define TCXI sunTCXInit +#else /* }{ */ +#define TCXI NULL +#endif /* } */ +#if SUNMAXDEPTH > 8 /* { */ +#ifdef FBTYPE_MEMCOLOR /* { */ +extern Bool sunCG8Init( + int /* screen */, + ScreenPtr /* pScreen */, + int /* argc */, + char** /* argv */ +); +#define CG8I sunCG8Init +#else /* }{ */ +#define CG8I NULL +#endif /* } */ +#else /* }{ */ +#define CG8I NULL +#endif /* } */ + +#endif /* } */ + +extern KeySymsRec sunKeySyms[]; +extern SunModmapRec *sunModMaps[]; +extern int sunMaxLayout; +extern KeySym* sunType4KeyMaps[]; +extern SunModmapRec* sunType4ModMaps[]; + +static Bool sunDevsInited = FALSE; + +Bool sunAutoRepeatHandlersInstalled; /* FALSE each time InitOutput called */ +Bool sunSwapLkeys = FALSE; +Bool sunFlipPixels = FALSE; +Bool sunFbInfo = FALSE; +Bool sunCG4Frob = FALSE; +Bool sunNoGX = FALSE; + +sunKbdPrivRec sunKbdPriv = { + -1, /* fd */ + -1, /* type */ + -1, /* layout */ + 0, /* click */ + (Leds)0, /* leds */ +}; + +sunPtrPrivRec sunPtrPriv = { + -1, /* fd */ + 0 /* Current button state */ +}; + +/* + * The name member in the following table corresponds to the + * FBTYPE_* macros defined in /usr/include/sun/fbio.h file + */ +sunFbDataRec sunFbData[XFBTYPE_LASTPLUSONE] = { + { NULL, "SUN1BW (bw1)" }, + { NULL, "SUN1COLOR (cg1)" }, + { BW2I, "SUN2BW (bw2)" }, +#ifdef INCLUDE_CG2_HEADER + { CG2I, "SUN2COLOR (cg2)" }, +#endif /* INCLUDE_CG2_HEADER */ + { NULL, "SUN2GP (gp1/gp2)" }, + { NULL, "SUN5COLOR (cg5/386i accel)" }, + { CG3I, "SUN3COLOR (cg3)" }, + { CG8I, "MEMCOLOR (cg8)" }, + { CG4I, "SUN4COLOR (cg4)" }, + { NULL, "NOTSUN1" }, + { NULL, "NOTSUN2" }, + { NULL, "NOTSUN3" } +#ifndef i386 /* { */ + ,{ CG6I, "SUNFAST_COLOR (cg6/gx)" }, + { NULL, "SUNROP_COLOR (cg9)" }, + { NULL, "SUNFB_VIDEO" }, + { NULL, "SUNGIFB" }, + { NULL, "SUNPLAS" }, +#ifdef FBTYPE_SUNGP3 + { NULL, "SUNGP3 (cg12/gs)" }, +#endif +#ifdef FBTYPE_SUNGT + { NULL, "SUNGT (gt)" }, +#endif +#ifdef FBTYPE_SUNLEO + { NULL, "SUNLEO (zx)" }, +#endif +#ifdef FBTYPE_MDICOLOR + { NULL, "MDICOLOR (cgfourteen)" }, +#endif +#ifdef XFBTYPE_TCX + { TCXI, "TCX (tcx)" }, +#endif +#endif /* } */ +}; + +/* + * a list of devices to try if there is no environment or command + * line list of devices + */ +#if SUNMAXDEPTH == 1 /* { */ +static char *fallbackList[] = { + BWTWO0DEV, BWTWO1DEV, BWTWO2DEV +}; +#else /* }{ */ +static char *fallbackList[] = { +#ifndef i386 /* { */ + CGTWO0DEV, CGTWO1DEV, CGTWO2DEV, +#if (MAXSCREENS == 4) + CGTWO3DEV, +#endif +#endif /* } */ + CGTHREE0DEV, +#ifndef i386 /* { */ + CGTHREE1DEV, CGTHREE2DEV, +#if (MAXSCREENS == 4) + CGTHREE3DEV, +#endif +#endif /* } */ +#ifdef FBTYPE_SUNFAST_COLOR /* { */ + CGSIX0DEV, CGSIX1DEV, CGSIX2DEV, +#if (MAXSCREENS == 4) + CGSIX3DEV, +#endif +#endif /* } */ +#ifndef i386 /* { */ + CGFOUR0DEV, BWTWO0DEV, BWTWO1DEV, BWTWO2DEV, +#if (MAXSCREENS == 4) + BWTWO3DEV, +#endif +#endif /* } */ +#if SUNMAXDEPTH > 8 /* { */ + CGEIGHT0DEV, +#if 0 +#ifdef XFBTYPE_TCX + TCX0DEV, +#endif +#endif +#endif /* } */ + "/dev/fb" +}; +#endif /* } */ + +#define FALLBACK_LIST_LEN sizeof fallbackList / sizeof fallbackList[0] + +fbFd sunFbs[MAXSCREENS]; + +static PixmapFormatRec formats[] = { + { 1, 1, BITMAP_SCANLINE_PAD } /* 1-bit deep */ +#if SUNMAXDEPTH > 1 + ,{ 8, 8, BITMAP_SCANLINE_PAD} /* 8-bit deep */ +#if SUNMAXDEPTH > 8 + ,{ 12, 24, BITMAP_SCANLINE_PAD } /* 12-bit deep */ + ,{ 24, 32, BITMAP_SCANLINE_PAD } /* 24-bit deep */ +#endif +#endif +}; +#define NUMFORMATS (sizeof formats)/(sizeof formats[0]) + +/* + * OpenFrameBuffer -- + * Open a frame buffer according to several rules. + * Find the device to use by looking in the sunFbData table, + * an XDEVICE envariable, a -dev switch or using /dev/fb if trying + * to open screen 0 and all else has failed. + * + * Results: + * The fd of the framebuffer. + */ +static int OpenFrameBuffer(device, screen) + char *device; /* e.g. "/dev/cgtwo0" */ + int screen; /* what screen am I going to be */ +{ + int ret = TRUE; + struct fbgattr *fbattr; + static int devFbUsed; + + sunFbs[screen].fd = -1; + if (strcmp (device, "/dev/fb") == 0 && devFbUsed) + return FALSE; + if (access (device, R_OK | W_OK) == -1) + return FALSE; + if ((sunFbs[screen].fd = open(device, O_RDWR, 0)) == -1) + ret = FALSE; + else { + fbattr = (struct fbgattr *) xalloc (sizeof (struct fbgattr)); + if (ioctl(sunFbs[screen].fd, FBIOGATTR, fbattr) == -1) { + /* + This is probably a bwtwo; the $64,000 question is: + is it the mono plane of a cgfour, or is it really a + real bwtwo? If there is only a cgfour in the box or + only a bwtwo in the box, then it isn't a problem. If + it's a 3/60, which has a bwtwo on the mother board *and* + a cgfour, then things get tricky because there's no way + to tell if the bwtwo is really being emulated by the cgfour. + */ + xfree (fbattr); + fbattr = NULL; + if (ioctl(sunFbs[screen].fd, FBIOGTYPE, &sunFbs[screen].info) == -1) { + Error("unable to get frame buffer attributes"); + (void) close(sunFbs[screen].fd); + sunFbs[screen].fd = -1; + return FALSE; + } + } + if (ret) { + devFbUsed = TRUE; + if (fbattr) { + if (fbattr->fbtype.fb_type >= XFBTYPE_LASTPLUSONE) { + ErrorF ("%s is an unknown framebuffer type\n", device); + (void) close(sunFbs[screen].fd); + sunFbs[screen].fd = -1; + return FALSE; + } + sunFbs[screen].info = fbattr->fbtype; + } + sunFbs[screen].fbPriv = (pointer) fbattr; + if (fbattr && !sunFbData[fbattr->fbtype.fb_type].init) { + int _i; + ret = FALSE; + for (_i = 0; _i < FB_ATTR_NEMUTYPES; _i++) { + if (sunFbData[fbattr->emu_types[_i]].init) { + sunFbs[screen].info.fb_type = fbattr->emu_types[_i]; + ret = TRUE; + if (sunFbInfo) + ErrorF ("%s is emulating a %s\n", device, + sunFbData[fbattr->fbtype.fb_type].name); + break; + } + } + } + if (sunFbInfo) + ErrorF ("%s is really a %s\n", device, + sunFbData[fbattr ? fbattr->fbtype.fb_type : sunFbs[screen].info.fb_type].name); + } + } + if (!ret) + sunFbs[screen].fd = -1; + return ret; +} + +/*- + *----------------------------------------------------------------------- + * SigIOHandler -- + * Signal handler for SIGIO - input is available. + * + * Results: + * sunSigIO is set - ProcessInputEvents() will be called soon. + * + * Side Effects: + * None + * + *----------------------------------------------------------------------- + */ +/*ARGSUSED*/ +static void SigIOHandler(sig) + int sig; +{ + int olderrno = errno; + sunEnqueueEvents (); + errno = olderrno; +} + +/*- + *----------------------------------------------------------------------- + * sunNonBlockConsoleOff -- + * Turn non-blocking mode on the console off, so you don't get logged + * out when the server exits. + * + * Results: + * None. + * + * Side Effects: + * None. + * + *----------------------------------------------------------------------- + */ +void sunNonBlockConsoleOff( +#if defined(SVR4) || defined(CSRG_BASED) + void +#else + char* arg +#endif +) +{ + register int i; + + i = fcntl(2, F_GETFL, 0); + if (i >= 0) + (void) fcntl(2, F_SETFL, i & ~FNDELAY); +} + +static char** GetDeviceList (argc, argv) + int argc; + char **argv; +{ + int i; + char *envList = NULL; + char *cmdList = NULL; + char **deviceList = (char **)NULL; + + for (i = 1; i < argc; i++) + if (strcmp (argv[i], "-dev") == 0 && i+1 < argc) { + cmdList = argv[i + 1]; + break; + } + if (!cmdList) + envList = getenv ("XDEVICE"); + + if (cmdList || envList) { + char *_tmpa; + char *_tmpb; + int _i1; + deviceList = (char **) xalloc ((MAXSCREENS + 1) * sizeof (char *)); + _tmpa = (cmdList) ? cmdList : envList; + for (_i1 = 0; _i1 < MAXSCREENS; _i1++) { + _tmpb = strtok (_tmpa, ":"); + if (_tmpb) + deviceList[_i1] = _tmpb; + else + deviceList[_i1] = NULL; + _tmpa = NULL; + } + deviceList[MAXSCREENS] = NULL; + } + if (!deviceList) { + /* no environment and no cmdline, so default */ + deviceList = + (char **) xalloc ((FALLBACK_LIST_LEN + 1) * sizeof (char *)); + for (i = 0; i < FALLBACK_LIST_LEN; i++) + deviceList[i] = fallbackList[i]; + deviceList[FALLBACK_LIST_LEN] = NULL; + } + return deviceList; +} + +static void getKbdType() +{ +/* + * The Sun 386i has system include files that preclude this pre SunOS 4.1 + * test for the presence of a type 4 keyboard however it really doesn't + * matter since no 386i has ever been shipped with a type 3 keyboard. + * SunOS 4.1 no longer needs this kludge. + */ +#if !defined(i386) && !defined(KIOCGKEY) +#define TYPE4KEYBOARDOVERRIDE +#endif + + int ii; + + for (ii = 0; ii < 3; ii++) { + sunKbdWait(); + (void) ioctl (sunKbdPriv.fd, KIOCTYPE, &sunKbdPriv.type); +#ifdef TYPE4KEYBOARDOVERRIDE + /* + * Magic. Look for a key which is non-existent on a real type + * 3 keyboard but does exist on a type 4 keyboard. + */ + if (sunKbdPriv.type == KB_SUN3) { + struct kiockeymap key; + + key.kio_tablemask = 0; + key.kio_station = 118; + if (ioctl(sunKbdPriv.fd, KIOCGKEY, &key) == -1) { + Error( "ioctl KIOCGKEY" ); + FatalError("Can't KIOCGKEY on fd %d\n", sunKbdPriv.fd); + } + if (key.kio_entry != HOLE) + sunKbdPriv.type = KB_SUN4; + } +#endif + switch (sunKbdPriv.type) { + case KB_SUN2: + case KB_SUN3: + case KB_SUN4: return; + default: + sunChangeKbdTranslation(sunKbdPriv.fd, FALSE); + continue; + } + } + FatalError ("Unsupported keyboard type %d\n", sunKbdPriv.type); +} + +void OsVendorInit( + void +) +{ + static int inited; + if (!inited) { +#ifndef i386 + struct rlimit rl; + + /* + * one per client, one per screen, one per listen endpoint, + * keyboard, mouse, and stderr + */ + int maxfds = MAXCLIENTS + MAXSCREENS + 5; + + if (getrlimit (RLIMIT_NOFILE, &rl) == 0) { + rl.rlim_cur = maxfds < rl.rlim_max ? maxfds : rl.rlim_max; + (void) setrlimit (RLIMIT_NOFILE, &rl); + } +#endif + sunKbdPriv.fd = open ("/dev/kbd", O_RDWR, 0); + if (sunKbdPriv.fd < 0) + FatalError ("Cannot open /dev/kbd, error %d\n", errno); + sunPtrPriv.fd = open ("/dev/mouse", O_RDWR, 0); + if (sunPtrPriv.fd < 0) + FatalError ("Cannot open /dev/mouse, error %d\n", errno); + getKbdType (); + if (sunKbdPriv.type == KB_SUN4) { + (void) ioctl (sunKbdPriv.fd, KIOCLAYOUT, &sunKbdPriv.layout); + if (sunKbdPriv.layout < 0 || + sunKbdPriv.layout > sunMaxLayout || + sunType4KeyMaps[sunKbdPriv.layout] == NULL) + FatalError ("Unsupported keyboard type 4 layout %d\n", + sunKbdPriv.layout); + sunKeySyms[KB_SUN4].map = sunType4KeyMaps[sunKbdPriv.layout]; + sunModMaps[KB_SUN4] = sunType4ModMaps[sunKbdPriv.layout]; + } + inited = 1; + } +} + +#ifdef DDXOSFATALERROR +void OsVendorFatalError(void) +{ +} +#endif + +/*- + *----------------------------------------------------------------------- + * InitOutput -- + * Initialize screenInfo for all actually accessible framebuffers. + * The + * + * Results: + * screenInfo init proc field set + * + * Side Effects: + * None + * + *----------------------------------------------------------------------- + */ + +void InitOutput(pScreenInfo, argc, argv) + ScreenInfo *pScreenInfo; + int argc; + char **argv; +{ + int i, scr; + int nonBlockConsole = 0; + char **devList; + static int setup_on_exit = 0; + extern Bool RunFromSmartParent; + + if (!monitorResolution) + monitorResolution = 90; + if (RunFromSmartParent) + nonBlockConsole = 1; + for (i = 1; i < argc; i++) { + if (!strcmp(argv[i],"-debug")) + nonBlockConsole = 0; + } + + /* + * Writes to /dev/console can block - causing an + * excess of error messages to hang the server in + * deadlock. So....... + */ + if (nonBlockConsole) { + if (!setup_on_exit) { +#if defined(SVR4) || defined(CSRG_BASED) + if (atexit(sunNonBlockConsoleOff)) +#else + if (on_exit(sunNonBlockConsoleOff, (char *)0)) +#endif + ErrorF("InitOutput: can't register NBIO exit handler\n"); + + setup_on_exit = 1; + } + i = fcntl(2, F_GETFL, 0); + if (i >= 0) + i = fcntl(2, F_SETFL, i | FNDELAY); + if (i < 0) { + Error("fcntl"); + ErrorF("InitOutput: can't put stderr in non-block mode\n"); + } + } + pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; + pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + + pScreenInfo->numPixmapFormats = NUMFORMATS; + for (i=0; i< NUMFORMATS; i++) + pScreenInfo->formats[i] = formats[i]; +#ifdef XKB + if (noXkbExtension) +#endif + sunAutoRepeatHandlersInstalled = FALSE; + if (!sunDevsInited) { + /* first time ever */ + for (scr = 0; scr < MAXSCREENS; scr++) + sunFbs[scr].fd = -1; + devList = GetDeviceList (argc, argv); + for (i = 0, scr = 0; devList[i] != NULL && scr < MAXSCREENS; i++) + if (OpenFrameBuffer (devList[i], scr)) + scr++; + sunDevsInited = TRUE; + xfree (devList); + } + for (scr = 0; scr < MAXSCREENS; scr++) + if (sunFbs[scr].fd != -1) + (void) AddScreen (sunFbData[sunFbs[scr].info.fb_type].init, + argc, argv); + (void) OsSignal(SIGWINCH, SIG_IGN); +} + +/*- + *----------------------------------------------------------------------- + * InitInput -- + * Initialize all supported input devices...what else is there + * besides pointer and keyboard? + * + * Results: + * None. + * + * Side Effects: + * Two DeviceRec's are allocated and registered as the system pointer + * and keyboard devices. + * + *----------------------------------------------------------------------- + */ +void InitInput(argc, argv) + int argc; + char **argv; +{ + pointer p, k; + extern Bool mieqInit(); + + p = AddInputDevice(sunMouseProc, TRUE); + k = AddInputDevice(sunKbdProc, TRUE); + if (!p || !k) + FatalError("failed to create input devices in InitInput"); + + RegisterPointerDevice(p); + RegisterKeyboardDevice(k); + miRegisterPointerDevice(screenInfo.screens[0], p); + (void) mieqInit (k, p); +#define SET_FLOW(fd) fcntl(fd, F_SETFL, FNDELAY | FASYNC) +#ifdef SVR4 + (void) OsSignal(SIGPOLL, SigIOHandler); +#define WANT_SIGNALS(fd) ioctl(fd, I_SETSIG, S_INPUT | S_HIPRI) +#else + (void) OsSignal(SIGIO, SigIOHandler); +#define WANT_SIGNALS(fd) fcntl(fd, F_SETOWN, getpid()) +#endif + if (sunKbdPriv.fd >= 0) { + if (SET_FLOW(sunKbdPriv.fd) == -1 || WANT_SIGNALS(sunKbdPriv.fd) == -1) { + (void) close (sunKbdPriv.fd); + sunKbdPriv.fd = -1; + FatalError("Async kbd I/O failed in InitInput"); + } + } + if (sunPtrPriv.fd >= 0) { + if (SET_FLOW(sunPtrPriv.fd) == -1 || WANT_SIGNALS(sunPtrPriv.fd) == -1) { + (void) close (sunPtrPriv.fd); + sunPtrPriv.fd = -1; + FatalError("Async mouse I/O failed in InitInput"); + } + } +} + + +#if SUNMAXDEPTH == 8 + +Bool +sunCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; /* bits per pixel of root */ +{ + return cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, + width); +} + +Bool +sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; /* bits per pixel of root */ +{ + return cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width); +} + +Bool +sunCfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; /* bits per pixel of root */ +{ + return cfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width); +} + +#else /* SUNMAXDEPTH != 8 */ +#if SUNMAXDEPTH == 32 + +static Bool +sunCfbCreateGC(pGC) + GCPtr pGC; +{ + if (pGC->depth == 1) + { + return mfbCreateGC (pGC); + } + else if (pGC->depth <= 8) + { + return cfbCreateGC (pGC); + } + else if (pGC->depth <= 16) + { + return cfb16CreateGC (pGC); + } + else if (pGC->depth <= 32) + { + return cfb32CreateGC (pGC); + } + return FALSE; +} + +static void +sunCfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart) + DrawablePtr pDrawable; /* drawable from which to get bits */ + int wMax; /* largest value of all *pwidths */ + register DDXPointPtr ppt; /* points to start copying from */ + int *pwidth; /* list of number of bits to copy */ + int nspans; /* number of scanlines to copy */ + char *pdstStart; /* where to put the bits */ +{ + switch (pDrawable->bitsPerPixel) { + case 1: + mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + case 8: + cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + case 16: + cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + case 32: + cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + } + return; +} + +static void +sunCfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine) + DrawablePtr pDrawable; + int sx, sy, w, h; + unsigned int format; + unsigned long planeMask; + char *pdstLine; +{ + switch (pDrawable->bitsPerPixel) + { + case 1: + mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + case 8: + cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + case 16: + cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + case 32: + cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + } +} + +Bool +sunCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; /* bits per pixel of root */ +{ + int ret; + + switch (bpp) { + case 8: + ret = cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); + break; + case 16: + ret = cfb16SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); + break; + case 32: + ret = cfb32SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); + break; + default: + return FALSE; + } + pScreen->CreateGC = sunCfbCreateGC; + pScreen->GetImage = sunCfbGetImage; + pScreen->GetSpans = sunCfbGetSpans; + return ret; +} + +/* Adapt cfb logic */ +#undef CFB_NEED_SCREEN_PRIVATE +#if !defined(SINGLEDEPTH) || defined(FORDE_SEPARATE_PRIVATE) +#define CFB_NEED_SCREEN_PRIVATE +#endif + +extern BSFuncRec cfbBSFuncRec, cfb16BSFuncRec, cfb32BSFuncRec; +extern Bool cfbCloseScreen(), cfb16CloseScreen(), cfb32CloseScreen(); +#ifdef CFB_NEED_SCREEN_PRIVATE +extern int cfb16ScreenPrivateIndex, cfb32ScreenPrivateIndex; +#endif + +Bool +sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; +{ +#ifdef CFB_NEED_SCREEN_PRIVATE + pointer oldDevPrivate; +#endif + VisualPtr visuals; + int nvisuals; + DepthPtr depths; + int ndepths; + VisualID defaultVisual; + int rootdepth = 0; + + if (!cfbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, + &rootdepth, &defaultVisual, 1 << (bpp - 1), 8)) + return FALSE; +#ifdef CFB_NEED_SCREEN_PRIVATE + oldDevPrivate = pScreen->devPrivate; +#endif + if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, + rootdepth, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + switch (bpp) + { + case 8: + pScreen->CloseScreen = cfbCloseScreen; + pScreen->BackingStoreFuncs = cfbBSFuncRec; + break; + case 16: + pScreen->CloseScreen = cfb16CloseScreen; + pScreen->BackingStoreFuncs = cfb16BSFuncRec; +#ifdef CFB_NEED_SCREEN_PRIVATE + pScreen->devPrivates[cfb16ScreenPrivateIndex].ptr = + pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; +#endif + break; + case 32: + pScreen->CloseScreen = cfb32CloseScreen; + pScreen->BackingStoreFuncs = cfb32BSFuncRec; +#ifdef CFB_NEED_SCREEN_PRIVATE + pScreen->devPrivates[cfb32ScreenPrivateIndex].ptr = + pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; +#endif + break; + } + return TRUE; +} + + +Bool +sunCfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; +{ + if (!sunCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp)) + return FALSE; + return sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, + dpiy, width, bpp); +} + +#endif /* SUNMAXDEPTH == 32 */ +#endif /* SUNMAXDEPTH */ + +#ifdef DPMSExtension +/************************************************************** + * DPMSSet(), DPMSGet(), DPMSSupported() + * + * stubs + * + ***************************************************************/ + +void DPMSSet (level) + int level; +{ +} + +int DPMSGet (level) + int* level; +{ + return -1; +} + +Bool DPMSSupported () +{ + return FALSE; +} +#endif diff --git a/nx-X11/programs/Xserver/hw/sun/sunIo.c b/nx-X11/programs/Xserver/hw/sun/sunIo.c new file mode 100644 index 000000000..e8bc68887 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunIo.c @@ -0,0 +1,305 @@ +/* $Xorg: sunIo.c,v 1.4 2001/03/07 17:34:19 pookie Exp $ */ +/*- + * sunIo.c -- + * Functions to handle input from the keyboard and mouse. + * + * Copyright 1987 by the Regents of the University of California + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + * + * + */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunIo.c,v 3.9 2001/12/19 21:28:45 dawes Exp $ */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#define NEED_EVENTS +#include "sun.h" +#include "mi.h" + +/*- + *----------------------------------------------------------------------- + * ProcessInputEvents -- + * Retrieve all waiting input events and pass them to DIX in their + * correct chronological order. Only reads from the system pointer + * and keyboard. + * + * Results: + * None. + * + * Side Effects: + * Events are passed to the DIX layer. + * + *----------------------------------------------------------------------- + */ +void +ProcessInputEvents () +{ + mieqProcessInputEvents (); + miPointerUpdate (); +} + +/* + *----------------------------------------------------------------------- + * sunEnqueueEvents + * When a SIGIO is received, read device hard events and + * enqueue them using the mi event queue + */ + +void sunEnqueueEvents ( + void +) +{ + Firm_event *ptrEvents, /* Current pointer event */ + *kbdEvents; /* Current keyboard event */ + int numPtrEvents, /* Number of remaining pointer events */ + numKbdEvents; /* Number of remaining keyboard events */ + int nPE, /* Original number of pointer events */ + nKE; /* Original number of keyboard events */ + Bool PtrAgain, /* need to (re)read */ + KbdAgain; /* need to (re)read */ + DeviceIntPtr pPointer; + DeviceIntPtr pKeyboard; + sunKbdPrivPtr kbdPriv; + sunPtrPrivPtr ptrPriv; + + pPointer = (DeviceIntPtr)LookupPointerDevice(); + pKeyboard = (DeviceIntPtr)LookupKeyboardDevice(); + ptrPriv = (sunPtrPrivPtr) pPointer->public.devicePrivate; + kbdPriv = (sunKbdPrivPtr) pKeyboard->public.devicePrivate; + if (!pPointer->public.on || !pKeyboard->public.on) + return; + + numPtrEvents = 0; + ptrEvents = NULL; + PtrAgain = TRUE; + numKbdEvents = 0; + kbdEvents = NULL; + KbdAgain = TRUE; + + /* + * So long as one event from either device remains unprocess, we loop: + * Take the oldest remaining event and pass it to the proper module + * for processing. The DDXEvent will be sent to ProcessInput by the + * function called. + */ + while (1) { + /* + * Get events from both the pointer and the keyboard, storing the number + * of events gotten in nPE and nKE and keeping the start of both arrays + * in pE and kE + */ + if ((numPtrEvents == 0) && PtrAgain) { + ptrEvents = sunMouseGetEvents (ptrPriv->fd, pPointer->public.on, + &nPE, &PtrAgain); + numPtrEvents = nPE; + } + if ((numKbdEvents == 0) && KbdAgain) { + kbdEvents = sunKbdGetEvents (kbdPriv->fd, pKeyboard->public.on, + &nKE, &KbdAgain); + numKbdEvents = nKE; + } + if ((numPtrEvents == 0) && (numKbdEvents == 0)) + break; + if (numPtrEvents && numKbdEvents) { + if (timercmp (&kbdEvents->time, &ptrEvents->time, <)) { + sunKbdEnqueueEvent (pKeyboard, kbdEvents); + numKbdEvents--; + kbdEvents++; + } else { + sunMouseEnqueueEvent (pPointer, ptrEvents); + numPtrEvents--; + ptrEvents++; + } + } else if (numKbdEvents) { + sunKbdEnqueueEvent (pKeyboard, kbdEvents); + numKbdEvents--; + kbdEvents++; + } else { + sunMouseEnqueueEvent (pPointer, ptrEvents); + numPtrEvents--; + ptrEvents++; + } + } +} + +/* + * DDX - specific abort routine. Called by AbortServer(). + */ +void AbortDDX() +{ + int i; + ScreenPtr pScreen; + DevicePtr devPtr; + +#ifdef SVR4 + (void) OsSignal (SIGPOLL, SIG_IGN); +#else + (void) OsSignal (SIGIO, SIG_IGN); +#endif + devPtr = LookupKeyboardDevice(); + if (devPtr) + (void) sunChangeKbdTranslation (((sunKbdPrivPtr)(devPtr->devicePrivate))->fd, FALSE); +#if defined(SVR4) || defined(CSRG_BASED) + sunNonBlockConsoleOff (); +#else + sunNonBlockConsoleOff (NULL); +#endif + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + (*pScreen->SaveScreen) (pScreen, SCREEN_SAVER_OFF); + sunDisableCursor (pScreen); + } +} + +/* Called by GiveUp(). */ +void +ddxGiveUp() +{ + AbortDDX (); +} + +/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ +void ddxInitGlobals(void) +{ +} + +int +ddxProcessArgument (argc, argv, i) + int argc; + char *argv[]; + int i; +{ + extern void UseMsg(); + extern int XprintOptions(int, char **, int); + +#ifdef XKB + int noxkb = 0, n; + /* + * peek in argv and see if -kb because noXkbExtension won't + * get set until too late to useful here. + */ + for (n = 1; n < argc; n++) + if (strcmp (argv[n], "-kb") == 0) + noxkb = 1; + + if (noxkb) +#endif + if (strcmp (argv[i], "-ar1") == 0) { /* -ar1 int */ + if (++i >= argc) UseMsg (); + sunAutoRepeatInitiate = 1000 * (long)atoi(argv[i]); /* cvt to usec */ + if (sunAutoRepeatInitiate > 1000000) + sunAutoRepeatInitiate = 999000; + return 2; + } +#ifdef XKB + if (noxkb) +#endif + if (strcmp (argv[i], "-ar2") == 0) { /* -ar2 int */ + if (++i >= argc) UseMsg (); + sunAutoRepeatDelay = 1000 * (long)atoi(argv[i]); /* cvt to usec */ + if (sunAutoRepeatDelay > 1000000) + sunAutoRepeatDelay = 999000; + return 2; + } + if (strcmp (argv[i], "-swapLkeys") == 0) { /* -swapLkeys */ + sunSwapLkeys = TRUE; + return 1; + } + if (strcmp (argv[i], "-debug") == 0) { /* -debug */ + return 1; + } + if (strcmp (argv[i], "-dev") == 0) { /* -dev /dev/mumble */ + if (++i >= argc) UseMsg (); + return 2; + } + if (strcmp (argv[i], "-mono") == 0) { /* -mono */ + return 1; + } + if (strcmp (argv[i], "-zaphod") == 0) { /* -zaphod */ + sunActiveZaphod = FALSE; + return 1; + } + if (strcmp (argv[i], "-flipPixels") == 0) { /* -flipPixels */ + sunFlipPixels = TRUE; + return 1; + } + if (strcmp (argv[i], "-fbinfo") == 0) { /* -fbinfo */ + sunFbInfo = TRUE; + return 1; + } + if (strcmp (argv[i], "-kbd") == 0) { /* -kbd */ + if (++i >= argc) UseMsg(); + return 2; + } + if (strcmp (argv[i], "-protect") == 0) { /* -protect */ + if (++i >= argc) UseMsg(); + return 2; + } + if (strcmp (argv[i], "-cg4frob") == 0) { + sunCG4Frob = TRUE; + return 1; + } + if (strcmp (argv[i], "-noGX") == 0) { + sunNoGX = TRUE; + return 1; + } + if (strcmp(argv[i], "-XpFile") == 0) { + return XprintOptions(argc, argv, i) - i; + } + return 0; +} + +void +ddxUseMsg() +{ +#ifndef XKB + ErrorF("-ar1 int set autorepeat initiate time\n"); + ErrorF("-ar2 int set autorepeat interval time\n"); +#endif + ErrorF("-swapLkeys swap keysyms on L1..L10\n"); + ErrorF("-debug disable non-blocking console mode\n"); + ErrorF("-dev fn[:fn][:fn] name of device[s] to open\n"); + ErrorF("-mono force monochrome-only screen\n"); + ErrorF("-zaphod disable active Zaphod mode\n"); + ErrorF("-fbinfo tell more about the found frame buffer(s)\n"); +#ifdef UNDOCUMENTED + ErrorF("-cg4frob don't use the mono plane of the cgfour\n"); + ErrorF("-noGX treat the GX as a dumb frame buffer\n"); +#endif + ErrorF("-XpFile specifies an alternate `Xprinters' file (Xprt only)\n"); +} diff --git a/nx-X11/programs/Xserver/hw/sun/sunKbd.c b/nx-X11/programs/Xserver/hw/sun/sunKbd.c new file mode 100644 index 000000000..a11026d6f --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunKbd.c @@ -0,0 +1,1071 @@ +/* $Xorg: sunKbd.c,v 1.3 2000/08/17 19:48:30 cpqbld Exp $ */ +/*- + * Copyright 1987 by the Regents of the University of California + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ +/* $XFree86: xc/programs/Xserver/hw/sun/sunKbd.c,v 1.8 2001/10/28 03:33:11 tsi Exp $ */ + +#define NEED_EVENTS +#include "sun.h" +#include "keysym.h" +#include "Sunkeysym.h" +#include "mi.h" + +#ifdef XKB +#include <X11/extensions/XKB.h> +#include <X11/extensions/XKBstr.h> +#include <X11/extensions/XKBsrv.h> +#endif + +#define SUN_LED_MASK 0x0f +#define MIN_KEYCODE 7 /* necessary to avoid the mouse buttons */ +#define MAX_KEYCODE 255 /* limited by the protocol */ +#ifndef KB_SUN4 +#define KB_SUN4 4 +#endif + +#define AUTOREPEAT_INITIATE 400 +#define AUTOREPEAT_DELAY 50 + +#define tvminus(tv, tv1, tv2) /* tv = tv1 - tv2 */ \ + if ((tv1).tv_usec < (tv2).tv_usec) { \ + (tv1).tv_usec += 1000000; \ + (tv1).tv_sec -= 1; \ + } \ + (tv).tv_usec = (tv1).tv_usec - (tv2).tv_usec; \ + (tv).tv_sec = (tv1).tv_sec - (tv2).tv_sec; + +#define tvplus(tv, tv1, tv2) /* tv = tv1 + tv2 */ \ + (tv).tv_sec = (tv1).tv_sec + (tv2).tv_sec; \ + (tv).tv_usec = (tv1).tv_usec + (tv2).tv_usec; \ + if ((tv).tv_usec > 1000000) { \ + (tv).tv_usec -= 1000000; \ + (tv).tv_sec += 1; \ + } + +extern KeySymsRec sunKeySyms[]; +extern SunModmapRec* sunModMaps[]; + +long sunAutoRepeatInitiate = 1000 * AUTOREPEAT_INITIATE; +long sunAutoRepeatDelay = 1000 * AUTOREPEAT_DELAY; + +static int autoRepeatKeyDown = 0; +static int autoRepeatReady; +static int autoRepeatFirst; +#if defined(_LP64) || defined(_I32LPx) +static struct timeval32 autoRepeatLastKeyDownTv; +static struct timeval32 autoRepeatDeltaTv; +#else +static struct timeval autoRepeatLastKeyDownTv; +static struct timeval autoRepeatDeltaTv; +#endif + +void sunKbdWait() +{ + static struct timeval lastChngKbdTransTv; + struct timeval tv; + struct timeval lastChngKbdDeltaTv; + unsigned int lastChngKbdDelta; + + X_GETTIMEOFDAY(&tv); + if (!lastChngKbdTransTv.tv_sec) + lastChngKbdTransTv = tv; + tvminus(lastChngKbdDeltaTv, tv, lastChngKbdTransTv); + lastChngKbdDelta = TVTOMILLI(lastChngKbdDeltaTv); + if (lastChngKbdDelta < 750) { + unsigned wait; + /* + * We need to guarantee at least 750 milliseconds between + * calls to KIOCTRANS. YUCK! + */ + wait = (750L - lastChngKbdDelta) * 1000L; + usleep (wait); + X_GETTIMEOFDAY(&tv); + } + lastChngKbdTransTv = tv; +} + +static void SwapLKeys(keysyms) + KeySymsRec* keysyms; +{ + unsigned int i; + KeySym k; + + for (i = 2; i < keysyms->maxKeyCode * keysyms->mapWidth; i++) + if (keysyms->map[i] == XK_L1 || + keysyms->map[i] == XK_L2 || + keysyms->map[i] == XK_L3 || + keysyms->map[i] == XK_L4 || + keysyms->map[i] == XK_L5 || + keysyms->map[i] == XK_L6 || + keysyms->map[i] == XK_L7 || + keysyms->map[i] == XK_L8 || + keysyms->map[i] == XK_L9 || + keysyms->map[i] == XK_L10) { + /* yes, I could have done a clever two line swap! */ + k = keysyms->map[i - 2]; + keysyms->map[i - 2] = keysyms->map[i]; + keysyms->map[i] = k; + } +} + +static void SetLights (ctrl, fd) + KeybdCtrl* ctrl; + int fd; +{ +#ifdef KIOCSLED + static unsigned char led_tab[16] = { + 0, + LED_NUM_LOCK, + LED_SCROLL_LOCK, + LED_SCROLL_LOCK | LED_NUM_LOCK, + LED_COMPOSE, + LED_COMPOSE | LED_NUM_LOCK, + LED_COMPOSE | LED_SCROLL_LOCK, + LED_COMPOSE | LED_SCROLL_LOCK | LED_NUM_LOCK, + LED_CAPS_LOCK, + LED_CAPS_LOCK | LED_NUM_LOCK, + LED_CAPS_LOCK | LED_SCROLL_LOCK, + LED_CAPS_LOCK | LED_SCROLL_LOCK | LED_NUM_LOCK, + LED_CAPS_LOCK | LED_COMPOSE, + LED_CAPS_LOCK | LED_COMPOSE | LED_NUM_LOCK, + LED_CAPS_LOCK | LED_COMPOSE | LED_SCROLL_LOCK, + LED_CAPS_LOCK | LED_COMPOSE | LED_SCROLL_LOCK | LED_NUM_LOCK + }; + if (ioctl (fd, KIOCSLED, (caddr_t)&led_tab[ctrl->leds & 0x0f]) == -1) + Error("Failed to set keyboard lights"); +#endif +} + + +static void ModLight (device, on, led) + DeviceIntPtr device; + Bool on; + int led; +{ + KeybdCtrl* ctrl = &device->kbdfeed->ctrl; + sunKbdPrivPtr pPriv = (sunKbdPrivPtr) device->public.devicePrivate; + + if(on) { + ctrl->leds |= led; + pPriv->leds |= led; + } else { + ctrl->leds &= ~led; + pPriv->leds &= ~led; + } + SetLights (ctrl, pPriv->fd); +} + +/*- + *----------------------------------------------------------------------- + * sunBell -- + * Ring the terminal/keyboard bell + * + * Results: + * Ring the keyboard bell for an amount of time proportional to + * "loudness." + * + * Side Effects: + * None, really... + * + *----------------------------------------------------------------------- + */ + +static void bell ( + int fd, + int duration) +{ + int kbdCmd; /* Command to give keyboard */ + + kbdCmd = KBD_CMD_BELL; + if (ioctl (fd, KIOCCMD, &kbdCmd) == -1) { + Error("Failed to activate bell"); + return; + } + if (duration) usleep (duration); + kbdCmd = KBD_CMD_NOBELL; + if (ioctl (fd, KIOCCMD, &kbdCmd) == -1) + Error ("Failed to deactivate bell"); +} + +static void sunBell ( + int percent, + DeviceIntPtr device, + pointer ctrl, + int unused) +{ + KeybdCtrl* kctrl = (KeybdCtrl*) ctrl; + sunKbdPrivPtr pPriv = (sunKbdPrivPtr) device->public.devicePrivate; + + if (percent == 0 || kctrl->bell == 0) + return; + + bell (pPriv->fd, kctrl->bell_duration * 1000); +} + +static void sunEnqueueEvent (xE) + xEvent* xE; +{ +#ifndef i386 + sigset_t holdmask; + +#ifdef SVR4 + (void) sigaddset (&holdmask, SIGPOLL); +#else + (void) sigaddset (&holdmask, SIGIO); +#endif + (void) sigprocmask (SIG_BLOCK, &holdmask, (sigset_t*)NULL); + mieqEnqueue (xE); + (void) sigprocmask (SIG_UNBLOCK, &holdmask, (sigset_t*)NULL); +#else + int oldmask = sigblock (sigmask (SIGIO)); + + mieqEnqueue (xE); + sigsetmask (oldmask); +#endif +} + + +#define XLED_NUM_LOCK 0x1 +#define XLED_COMPOSE 0x4 +#define XLED_SCROLL_LOCK 0x2 +#define XLED_CAPS_LOCK 0x8 + +static KeyCode LookupKeyCode (keysym, keysymsrec) + KeySym keysym; + KeySymsPtr keysymsrec; +{ + KeyCode i; + int ii, index = 0; + + for (i = keysymsrec->minKeyCode; i < keysymsrec->maxKeyCode; i++) + for (ii = 0; ii < keysymsrec->mapWidth; ii++) + if (keysymsrec->map[index++] == keysym) + return i; + return 0; +} + +static void pseudoKey(device, down, keycode) + DeviceIntPtr device; + Bool down; + KeyCode keycode; +{ + int bit; + CARD8 modifiers; + CARD16 mask; + BYTE* kptr; + + kptr = &device->key->down[keycode >> 3]; + bit = 1 << (keycode & 7); + modifiers = device->key->modifierMap[keycode]; + if (down) { + /* fool dix into thinking this key is now "down" */ + int i; + *kptr |= bit; + device->key->prev_state = device->key->state; + for (i = 0, mask = 1; modifiers; i++, mask <<= 1) + if (mask & modifiers) { + device->key->modifierKeyCount[i]++; + device->key->state += mask; + modifiers &= ~mask; + } + } else { + /* fool dix into thinking this key is now "up" */ + if (*kptr & bit) { + int i; + *kptr &= ~bit; + device->key->prev_state = device->key->state; + for (i = 0, mask = 1; modifiers; i++, mask <<= 1) + if (mask & modifiers) { + if (--device->key->modifierKeyCount[i] <= 0) { + device->key->state &= ~mask; + device->key->modifierKeyCount[i] = 0; + } + modifiers &= ~mask; + } + } + } +} + +static void DoLEDs(device, ctrl, pPriv) + DeviceIntPtr device; /* Keyboard to alter */ + KeybdCtrl* ctrl; + sunKbdPrivPtr pPriv; +{ +#ifdef XKB + if (noXkbExtension) { +#endif + if ((ctrl->leds & XLED_CAPS_LOCK) && !(pPriv->leds & XLED_CAPS_LOCK)) + pseudoKey(device, TRUE, + LookupKeyCode(XK_Caps_Lock, &device->key->curKeySyms)); + + if (!(ctrl->leds & XLED_CAPS_LOCK) && (pPriv->leds & XLED_CAPS_LOCK)) + pseudoKey(device, FALSE, + LookupKeyCode(XK_Caps_Lock, &device->key->curKeySyms)); + + if ((ctrl->leds & XLED_NUM_LOCK) && !(pPriv->leds & XLED_NUM_LOCK)) + pseudoKey(device, TRUE, + LookupKeyCode(XK_Num_Lock, &device->key->curKeySyms)); + + if (!(ctrl->leds & XLED_NUM_LOCK) && (pPriv->leds & XLED_NUM_LOCK)) + pseudoKey(device, FALSE, + LookupKeyCode(XK_Num_Lock, &device->key->curKeySyms)); + + if ((ctrl->leds & XLED_SCROLL_LOCK) && !(pPriv->leds & XLED_SCROLL_LOCK)) + pseudoKey(device, TRUE, + LookupKeyCode(XK_Scroll_Lock, &device->key->curKeySyms)); + + if (!(ctrl->leds & XLED_SCROLL_LOCK) && (pPriv->leds & XLED_SCROLL_LOCK)) + pseudoKey(device, FALSE, + LookupKeyCode(XK_Scroll_Lock, &device->key->curKeySyms)); + + if ((ctrl->leds & XLED_COMPOSE) && !(pPriv->leds & XLED_COMPOSE)) + pseudoKey(device, TRUE, + LookupKeyCode(SunXK_Compose, &device->key->curKeySyms)); + + if (!(ctrl->leds & XLED_COMPOSE) && (pPriv->leds & XLED_COMPOSE)) + pseudoKey(device, FALSE, + LookupKeyCode(SunXK_Compose, &device->key->curKeySyms)); +#ifdef XKB + } +#endif + pPriv->leds = ctrl->leds & 0x0f; + SetLights (ctrl, pPriv->fd); +} + +/*- + *----------------------------------------------------------------------- + * sunKbdCtrl -- + * Alter some of the keyboard control parameters + * + * Results: + * None. + * + * Side Effects: + * Some... + * + *----------------------------------------------------------------------- + */ + +static void sunKbdCtrl ( + DeviceIntPtr device, + KeybdCtrl* ctrl) +{ + sunKbdPrivPtr pPriv = (sunKbdPrivPtr) device->public.devicePrivate; + + if (pPriv->fd < 0) return; + + if (ctrl->click != pPriv->click) { + int kbdClickCmd; + + pPriv->click = ctrl->click; + kbdClickCmd = pPriv->click ? KBD_CMD_CLICK : KBD_CMD_NOCLICK; + if (ioctl (pPriv->fd, KIOCCMD, &kbdClickCmd) == -1) + Error("Failed to set keyclick"); + } + if ((pPriv->type == KB_SUN4) && (pPriv->leds != (ctrl->leds & 0x0f))) + DoLEDs(device, ctrl, pPriv); +} + +/*- + *----------------------------------------------------------------------- + * sunInitKbdNames -- + * Handle the XKB initialization + * + * Results: + * None. + * + * Comments: + * This function needs considerable work, in conjunctions with + * the need to add geometry descriptions of Sun Keyboards. + * It would also be nice to have #defines for all the keyboard + * layouts so that we don't have to have these hard-coded + * numbers. + * + *----------------------------------------------------------------------- + */ +#ifdef XKB +static void sunInitKbdNames ( + XkbComponentNamesRec* names, + sunKbdPrivPtr pKbd) +{ +#ifndef XKBBUFSIZE +#define XKBBUFSIZE 64 +#endif + static char keycodesbuf[XKBBUFSIZE]; + static char geometrybuf[XKBBUFSIZE]; + static char symbolsbuf[XKBBUFSIZE]; + + names->keymap = NULL; + names->compat = "compat/complete"; + names->types = "types/complete"; + names->keycodes = keycodesbuf; + names->geometry = geometrybuf; + names->symbols = symbolsbuf; + (void) strcpy (keycodesbuf, "keycodes/"); + (void) strcpy (geometrybuf, "geometry/"); + (void) strcpy (symbolsbuf, "symbols/"); + + /* keycodes & geometry */ + switch (pKbd->type) { + case KB_SUN2: + (void) strcat (names->keycodes, "sun(type2)"); + (void) strcat (names->geometry, "sun(type2)"); + (void) strcat (names->symbols, "us(sun2)"); + break; + case KB_SUN3: + (void) strcat (names->keycodes, "sun(type3)"); + (void) strcat (names->geometry, "sun(type3)"); + (void) strcat (names->symbols, "us(sun3)"); + break; + case KB_SUN4: + /* First, catch "fully known" models */ + switch (pKbd->layout) { + case 11: /* type4, Sweden */ + (void) strcat (names->geometry, "sun(type4_se)"); + (void) strcat (names->keycodes, + "sun(type4_se_swapctl)"); + (void) strcat (names->symbols, + "sun/se(sun4)+se(fixdollar)"); + return; + break; + case 43: /* type5/5c, Sweden */ + (void) strcat (names->geometry, "sun(type5c_se)"); + (void) strcat (names->keycodes, "sun(type5_se)"); + (void) strcat (names->symbols, + "sun/se(sun5)+se(fixdollar)"); + return; + break; + case 90: /* "Compact 1", Sweden (???) */ + break; /* No specific mapping, yet */ + default: + break; + } + + if (pKbd->layout == 19) { + (void) strcat (names->keycodes, "sun(US101A)"); + (void) strcat (names->geometry, "pc101-NG"); /* XXX */ + (void) strcat (names->symbols, "us(pc101)"); + } else if (pKbd->layout < 33) { + (void) strcat (names->keycodes, "sun(type4)"); + (void) strcat (names->geometry, "sun(type4)"); + if (sunSwapLkeys) + (void) strcat (names->symbols, "sun/us(sun4ol)"); + else + (void) strcat (names->symbols, "sun/us(sun4)"); + } else { + (void) strcat (names->keycodes, "sun(type5)"); + + switch (pKbd->layout) { + case 33: case 80: /* U.S. */ + case 47: case 94: /* Korea */ + case 48: case 95: /* Taiwan */ + case 49: case 96: /* Japan */ + (void) strcat (names->geometry, "sun(type5)"); + break; + case 34: case 81: /* U.S. Unix */ + (void) strcat (names->geometry, "sun(type5unix)"); + break; + default: + (void) strcat (names->geometry, "sun(type5euro)"); + } + + if (sunSwapLkeys) + (void) strcat (names->symbols, "sun/us(sun5ol)"); + else + (void) strcat (names->symbols, "sun/us(sun5)"); + } + break; + default: + names->keycodes = names->geometry = NULL; + break; + } + + /* extra symbols */ + + if (pKbd->type == KB_SUN4) { + switch (pKbd->layout) { + case 4: case 36: case 83: + case 5: case 37: case 84: + case 6: case 38: case 85: + case 8: case 40: case 87: + case 9: case 41: case 88: + case 10: case 42: case 89: +/* case 11: case 43: case 90: */ /* handled earlier */ + case 12: case 44: case 91: + case 13: case 45: case 92: + case 14: case 46: case 93: + (void) strcat (names->symbols, "+iso9995-3(basic)"); break; + } + } + + if (pKbd->type == KB_SUN4) { + switch (pKbd->layout) { + case 0: case 1: case 33: case 34: case 80: case 81: + break; + case 3: + (void) strcat (names->symbols, "+ca"); break; + case 4: case 36: case 83: + (void) strcat (names->symbols, "+dk"); break; + case 5: case 37: case 84: + (void) strcat (names->symbols, "+de"); break; + case 6: case 38: case 85: + (void) strcat (names->symbols, "+it"); break; + case 8: case 40: case 87: + (void) strcat (names->symbols, "+no"); break; + case 9: case 41: case 88: + (void) strcat (names->symbols, "+pt"); break; + case 10: case 42: case 89: + (void) strcat (names->symbols, "+es"); break; + /* case 11: case 43: */ /* handled earlier */ + case 90: + (void) strcat (names->symbols, "+se"); break; + case 12: case 44: case 91: + (void) strcat (names->symbols, "+fr_CH"); break; + case 13: case 45: case 92: + (void) strcat (names->symbols, "+de_CH"); break; + case 14: case 46: case 93: + (void) strcat (names->symbols, "+gb"); break; /* s/b en_UK */ + case 52: + (void) strcat (names->symbols, "+pl"); break; + case 53: + (void) strcat (names->symbols, "+cs"); break; + case 54: + (void) strcat (names->symbols, "+ru"); break; +#if 0 + /* don't have symbols defined for these yet, let them default */ + case 2: + (void) strcat (names->symbols, "+fr_BE"); break; + case 7: case 39: case 86: + (void) strcat (names->symbols, "+nl"); break; + case 50: case 97: + (void) strcat (names->symbols, "+fr_CA"); break; + case 16: case 47: case 94: + (void) strcat (names->symbols, "+ko"); break; + case 17: case 48: case 95: + (void) strcat (names->symbols, "+tw"); break; + case 32: case 49: case 96: + (void) strcat (names->symbols, "+jp"); break; + case 51: + (void) strcat (names->symbols, "+hu"); break; +#endif + /* + * by setting the symbols to NULL XKB will use the symbols in + * the "default" keymap. + */ + default: + names->symbols = NULL; return; break; + } + } +} +#endif /* XKB */ + +/*- + *----------------------------------------------------------------------- + * sunKbdProc -- + * Handle the initialization, etc. of a keyboard. + * + * Results: + * None. + * + *----------------------------------------------------------------------- + */ + +int sunKbdProc ( + DeviceIntPtr device, + int what) +{ + int i; + DevicePtr pKeyboard = (DevicePtr) device; + sunKbdPrivPtr pPriv; + KeybdCtrl* ctrl = &device->kbdfeed->ctrl; + extern int XkbDfltRepeatDelay, XkbDfltRepeatInterval; + + static CARD8 *workingModMap = NULL; + static KeySymsRec *workingKeySyms; + + switch (what) { + case DEVICE_INIT: + if (pKeyboard != LookupKeyboardDevice()) { + ErrorF ("Cannot open non-system keyboard\n"); + return (!Success); + } + + if (!workingKeySyms) { + workingKeySyms = &sunKeySyms[sunKbdPriv.type]; + + if (sunKbdPriv.type == KB_SUN4 && sunSwapLkeys) + SwapLKeys(workingKeySyms); + + if (workingKeySyms->minKeyCode < MIN_KEYCODE) { + workingKeySyms->minKeyCode += MIN_KEYCODE; + workingKeySyms->maxKeyCode += MIN_KEYCODE; + } + if (workingKeySyms->maxKeyCode > MAX_KEYCODE) + workingKeySyms->maxKeyCode = MAX_KEYCODE; + } + + if (!workingModMap) { + workingModMap=(CARD8 *)xalloc(MAP_LENGTH); + (void) memset(workingModMap, 0, MAP_LENGTH); + for(i=0; sunModMaps[sunKbdPriv.type][i].key != 0; i++) + workingModMap[sunModMaps[sunKbdPriv.type][i].key + MIN_KEYCODE] = + sunModMaps[sunKbdPriv.type][i].modifiers; + } + + (void) memset ((void *) defaultKeyboardControl.autoRepeats, + ~0, sizeof defaultKeyboardControl.autoRepeats); + +#ifdef XKB + if (noXkbExtension) { + sunAutoRepeatInitiate = XkbDfltRepeatDelay * 1000; + sunAutoRepeatDelay = XkbDfltRepeatInterval * 1000; +#endif + autoRepeatKeyDown = 0; +#ifdef XKB + } +#endif + pKeyboard->devicePrivate = (pointer)&sunKbdPriv; + pKeyboard->on = FALSE; + +#ifdef XKB + if (noXkbExtension) { +#endif + InitKeyboardDeviceStruct(pKeyboard, + workingKeySyms, workingModMap, + sunBell, sunKbdCtrl); +#ifdef XKB + } else { + XkbComponentNamesRec names; + sunInitKbdNames (&names, &sunKbdPriv); + XkbInitKeyboardDeviceStruct((DeviceIntPtr) pKeyboard, &names, + workingKeySyms, workingModMap, + sunBell, sunKbdCtrl); + } +#endif + break; + + case DEVICE_ON: + pPriv = (sunKbdPrivPtr)pKeyboard->devicePrivate; + /* + * Set the keyboard into "direct" mode and turn on + * event translation. + */ + if (sunChangeKbdTranslation(pPriv->fd,TRUE) == -1) + FatalError("Can't set keyboard translation\n"); + AddEnabledDevice(pPriv->fd); + pKeyboard->on = TRUE; + break; + + case DEVICE_CLOSE: + case DEVICE_OFF: + pPriv = (sunKbdPrivPtr)pKeyboard->devicePrivate; + if (pPriv->type == KB_SUN4) { + /* dumb bug in Sun's keyboard! Turn off LEDS before resetting */ + pPriv->leds = 0; + ctrl->leds = 0; + SetLights(ctrl, pPriv->fd); + } + /* + * Restore original keyboard directness and translation. + */ + if (sunChangeKbdTranslation(pPriv->fd,FALSE) == -1) + FatalError("Can't reset keyboard translation\n"); + RemoveEnabledDevice(pPriv->fd); + pKeyboard->on = FALSE; + break; + default: + FatalError("Unknown keyboard operation\n"); + } + return Success; +} + +/*- + *----------------------------------------------------------------------- + * sunKbdGetEvents -- + * Return the events waiting in the wings for the given keyboard. + * + * Results: + * A pointer to an array of Firm_events or (Firm_event *)0 if no events + * The number of events contained in the array. + * A boolean as to whether more events might be available. + * + * Side Effects: + * None. + *----------------------------------------------------------------------- + */ + +Firm_event* sunKbdGetEvents ( + int fd, + Bool on, + int* pNumEvents, + Bool* pAgain) +{ + int nBytes; /* number of bytes of events available. */ + static Firm_event evBuf[MAXEVENTS]; /* Buffer for Firm_events */ + + if ((nBytes = read (fd, evBuf, sizeof(evBuf))) == -1) { + if (errno == EWOULDBLOCK) { + *pNumEvents = 0; + *pAgain = FALSE; + } else { + Error ("Reading keyboard"); + FatalError ("Could not read the keyboard"); + } + } else { + if (on) { + *pNumEvents = nBytes / sizeof (Firm_event); + *pAgain = (nBytes == sizeof (evBuf)); + } else { + *pNumEvents = 0; + *pAgain = FALSE; + } + } + return evBuf; +} + +/*- + *----------------------------------------------------------------------- + * sunKbdEnqueueEvent -- + * + *----------------------------------------------------------------------- + */ +static xEvent autoRepeatEvent; +static int composeCount; + +static Bool DoSpecialKeys(device, xE, fe) + DeviceIntPtr device; + xEvent* xE; + Firm_event* fe; +{ + int shift_index, map_index, bit; + KeySym ksym; + BYTE* kptr; + sunKbdPrivPtr pPriv = (sunKbdPrivPtr)device->public.devicePrivate; + BYTE keycode = xE->u.u.detail; + CARD8 keyModifiers = device->key->modifierMap[keycode]; + + /* look up the present idea of the keysym */ + shift_index = 0; + if (device->key->state & ShiftMask) + shift_index ^= 1; + if (device->key->state & LockMask) + shift_index ^= 1; + map_index = (fe->id - 1) * device->key->curKeySyms.mapWidth; + ksym = device->key->curKeySyms.map[shift_index + map_index]; + if (ksym == NoSymbol) + ksym = device->key->curKeySyms.map[map_index]; + + /* + * Toggle functionality is hardcoded. This is achieved by always + * discarding KeyReleases on these keys, and converting every other + * KeyPress into a KeyRelease. + */ + if (xE->u.u.type == KeyRelease + && (ksym == XK_Num_Lock + || ksym == XK_Scroll_Lock + || ksym == SunXK_Compose + || (keyModifiers & LockMask))) + return TRUE; + + kptr = &device->key->down[keycode >> 3]; + bit = 1 << (keycode & 7); + if ((*kptr & bit) && + (ksym == XK_Num_Lock || ksym == XK_Scroll_Lock || + ksym == SunXK_Compose || (keyModifiers & LockMask))) + xE->u.u.type = KeyRelease; + + if (pPriv->type == KB_SUN4) { + if (ksym == XK_Num_Lock) { + ModLight (device, xE->u.u.type == KeyPress, XLED_NUM_LOCK); + } else if (ksym == XK_Scroll_Lock) { + ModLight (device, xE->u.u.type == KeyPress, XLED_SCROLL_LOCK); + } else if (ksym == SunXK_Compose) { + ModLight (device, xE->u.u.type == KeyPress, XLED_COMPOSE); + if (xE->u.u.type == KeyPress) composeCount = 2; + else composeCount = 0; + } else if (keyModifiers & LockMask) { + ModLight (device, xE->u.u.type == KeyPress, XLED_CAPS_LOCK); + } + if (xE->u.u.type == KeyRelease) { + if (composeCount > 0 && --composeCount == 0) { + pseudoKey(device, FALSE, + LookupKeyCode(SunXK_Compose, &device->key->curKeySyms)); + ModLight (device, FALSE, XLED_COMPOSE); + } + } + } + + if ((xE->u.u.type == KeyPress) && (keyModifiers == 0)) { + /* initialize new AutoRepeater event & mark AutoRepeater on */ + autoRepeatEvent = *xE; + autoRepeatFirst = TRUE; + autoRepeatKeyDown++; + autoRepeatLastKeyDownTv = fe->time; + } + return FALSE; +} + +void sunKbdEnqueueEvent ( + DeviceIntPtr device, + Firm_event *fe) +{ + xEvent xE; + BYTE keycode; + CARD8 keyModifiers; + + keycode = (fe->id & 0x7f) + MIN_KEYCODE; + + keyModifiers = device->key->modifierMap[keycode]; +#ifdef XKB + if (noXkbExtension) { +#endif + if (autoRepeatKeyDown && (keyModifiers == 0) && + ((fe->value == VKEY_DOWN) || (keycode == autoRepeatEvent.u.u.detail))) { + /* + * Kill AutoRepeater on any real non-modifier key down, or auto key up + */ + autoRepeatKeyDown = 0; + } +#ifdef XKB + } +#endif + xE.u.keyButtonPointer.time = TVTOMILLI(fe->time); + xE.u.u.type = ((fe->value == VKEY_UP) ? KeyRelease : KeyPress); + xE.u.u.detail = keycode; +#ifdef XKB + if (noXkbExtension) { +#endif + if (DoSpecialKeys(device, &xE, fe)) + return; +#ifdef XKB + } +#endif /* ! XKB */ + mieqEnqueue (&xE); +} + +void sunEnqueueAutoRepeat () +{ + int delta; + int i, mask; + DeviceIntPtr device = (DeviceIntPtr)LookupKeyboardDevice(); + KeybdCtrl* ctrl = &device->kbdfeed->ctrl; + sunKbdPrivPtr pPriv = (sunKbdPrivPtr) device->public.devicePrivate; + + if (ctrl->autoRepeat != AutoRepeatModeOn) { + autoRepeatKeyDown = 0; + return; + } + i=(autoRepeatEvent.u.u.detail >> 3); + mask=(1 << (autoRepeatEvent.u.u.detail & 7)); + if (!(ctrl->autoRepeats[i] & mask)) { + autoRepeatKeyDown = 0; + return; + } + + /* + * Generate auto repeat event. XXX one for now. + * Update time & pointer location of saved KeyPress event. + */ + + delta = TVTOMILLI(autoRepeatDeltaTv); + autoRepeatFirst = FALSE; + + /* + * Fake a key up event and a key down event + * for the last key pressed. + */ + autoRepeatEvent.u.keyButtonPointer.time += delta; + autoRepeatEvent.u.u.type = KeyRelease; + + /* + * hold off any more inputs while we get these safely queued up + * further SIGIO are + */ + sunEnqueueEvent (&autoRepeatEvent); + autoRepeatEvent.u.u.type = KeyPress; + sunEnqueueEvent (&autoRepeatEvent); + if (ctrl->click) bell (pPriv->fd, 0); + + /* Update time of last key down */ + tvplus(autoRepeatLastKeyDownTv, autoRepeatLastKeyDownTv, + autoRepeatDeltaTv); +} + +/*- + *----------------------------------------------------------------------- + * sunChangeKbdTranslation + * Makes operating system calls to set keyboard translation + * and direction on or off. + * + * Results: + * -1 if failure, else 0. + * + * Side Effects: + * Changes kernel management of keyboard. + * + *----------------------------------------------------------------------- + */ +int sunChangeKbdTranslation( + int fd, + Bool makeTranslated) + +{ + int tmp; +#ifndef i386 /* { */ + sigset_t hold_mask, old_mask; +#else /* }{ */ + int old_mask; +#endif /* } */ + int toread; + char junk[8192]; + +#ifndef i386 /* { */ + (void) sigfillset(&hold_mask); + (void) sigprocmask(SIG_BLOCK, &hold_mask, &old_mask); +#else /* }{ */ + old_mask = sigblock (~0); +#endif /* } */ + sunKbdWait(); + if (makeTranslated) { + /* + * Next set the keyboard into "direct" mode and turn on + * event translation. If either of these fails, we can't go + * on. + */ + tmp = 1; + if (ioctl (fd, KIOCSDIRECT, &tmp) == -1) { + Error ("Setting keyboard direct mode"); + return -1; + } + tmp = TR_UNTRANS_EVENT; + if (ioctl (fd, KIOCTRANS, &tmp) == -1) { + Error ("Setting keyboard translation"); + ErrorF ("sunChangeKbdTranslation: kbdFd=%d\n", fd); + return -1; + } + } else { + /* + * Next set the keyboard into "indirect" mode and turn off + * event translation. + */ + tmp = 0; + (void)ioctl (fd, KIOCSDIRECT, &tmp); + tmp = TR_ASCII; + (void)ioctl (fd, KIOCTRANS, &tmp); + } + if (ioctl (fd, FIONREAD, &toread) != -1 && toread > 0) { + while (toread) { + tmp = toread; + if (toread > sizeof (junk)) + tmp = sizeof (junk); + (void) read (fd, junk, tmp); + toread -= tmp; + } + } +#ifndef i386 /* { */ + (void) sigprocmask(SIG_SETMASK, &old_mask, (sigset_t *)NULL); +#else /* }{ */ + sigsetmask (old_mask); +#endif /* } */ + return 0; +} + +/*ARGSUSED*/ +Bool LegalModifier(key, pDev) + unsigned int key; + DevicePtr pDev; +{ + return TRUE; +} + +/*ARGSUSED*/ +void sunBlockHandler(nscreen, pbdata, pptv, pReadmask) + int nscreen; + pointer pbdata; + struct timeval **pptv; + pointer pReadmask; +{ + KeybdCtrl* ctrl = &((DeviceIntPtr)LookupKeyboardDevice())->kbdfeed->ctrl; + static struct timeval artv = { 0, 0 }; /* autorepeat timeval */ + + if (!autoRepeatKeyDown) + return; + + if (ctrl->autoRepeat != AutoRepeatModeOn) + return; + + if (autoRepeatFirst == TRUE) + artv.tv_usec = sunAutoRepeatInitiate; + else + artv.tv_usec = sunAutoRepeatDelay; + *pptv = &artv; + +} + +/*ARGSUSED*/ +void sunWakeupHandler(nscreen, pbdata, err, pReadmask) + int nscreen; + pointer pbdata; + unsigned long err; + pointer pReadmask; +{ + KeybdCtrl* ctrl = &((DeviceIntPtr)LookupKeyboardDevice())->kbdfeed->ctrl; + struct timeval tv; + + if (ctrl->autoRepeat != AutoRepeatModeOn) + return; + + if (autoRepeatKeyDown) { + X_GETTIMEOFDAY(&tv); + tvminus(autoRepeatDeltaTv, tv, autoRepeatLastKeyDownTv); + if (autoRepeatDeltaTv.tv_sec > 0 || + (!autoRepeatFirst && autoRepeatDeltaTv.tv_usec > + sunAutoRepeatDelay) || + (autoRepeatDeltaTv.tv_usec > + sunAutoRepeatInitiate)) + autoRepeatReady++; + } + + if (autoRepeatReady) + { + sunEnqueueAutoRepeat (); + autoRepeatReady = 0; + } +} diff --git a/nx-X11/programs/Xserver/hw/sun/sunKeyMap.c b/nx-X11/programs/Xserver/hw/sun/sunKeyMap.c new file mode 100644 index 000000000..33300fcb6 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunKeyMap.c @@ -0,0 +1,5797 @@ +/* $Xorg: sunKeyMap.c,v 1.3 2000/08/17 19:48:30 cpqbld Exp $ */ +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ +/* $XFree86: xc/programs/Xserver/hw/sun/sunKeyMap.c,v 1.3 2001/01/17 22:36:50 dawes Exp $ */ + +#include "sun.h" +#define XK_KATAKANA +#include "keysym.h" +#include "Sunkeysym.h" + +/* + By default all keyboards are hardcoded on the theory that people + might remove /usr/openwin making it impossible to parse the files + in /usr/openwin/share/etc/keytables. +*/ +#define CAN4 +#define CANFR5 +#define DEN4 +#define DEN5 +#define FR5 +#define FRBE4 +#define GER4 +#define GER5 +#define ITALY4 +#define ITALY5 +#define JAPAN4 +#define JAPAN5 +#define KOREA4 +#define KOREA5 +#define NETH4 +#define NETH5 +#define NORW4 +#define NORW5 +#define PORT4 +#define PORT5 +#define SPAIN5 +#define SPAINLATAM4 +#define SWED5 +#define SWEDFIN4 +#define SWFR4 +#define SWFR5 +#define SWGE4 +#define SWGE5 +#define TAI4 +#define TAI5 +#define UK4 +#define UK5 +#define US101A +#define US2 +#define US3 +#define US4 +#define US5 +#define US_UNIX5 + +/* + * XXX - Its not clear what to map these to for now. + * keysyms.h doesn't define enough function key names. + */ + +#ifndef XK_L1 +#define XK_L1 XK_Cancel +#define XK_L2 XK_Redo +#define XK_R1 NoSymbol +#define XK_R2 NoSymbol +#define XK_R3 NoSymbol +#define XK_L3 XK_Menu +#define XK_L4 XK_Undo +#define XK_R4 NoSymbol +#define XK_R5 NoSymbol +#define XK_R6 NoSymbol +#define XK_L5 XK_Insert +#define XK_L6 XK_Select +#define XK_R7 NoSymbol +#define XK_R8 XK_Up +#define XK_R9 NoSymbol +#define XK_L7 XK_Execute +#define XK_L8 XK_Print +#define XK_R10 XK_Left +#define XK_R11 XK_Home +#define XK_R12 XK_Right +#define XK_L9 XK_Find +#define XK_L10 XK_Help +#define XK_R13 NoSymbol +#define XK_R14 XK_Down +#define XK_R15 NoSymbol +#endif + +/* twm and Motif have hard-coded dependencies on Meta being Mod1 :-( */ +#if 0 +/* This set has optimal characteristics for use in the Toolkit... */ +#define Meta_Mask Mod1Mask +#define Mode_switch_Mask Mod2Mask +#define Num_Lock_Mask Mod3Mask +#define Alt_Mask Mod4Mask +#else +/* but this set is compatible with what we shipped in R6. */ +#define Meta_Mask Mod1Mask +#define Mode_switch_Mask Mod2Mask +#define Alt_Mask Mod3Mask +#define Num_Lock_Mask Mod4Mask +#endif + +#ifdef US2 + +static KeySym US2Keymap[] = { + XK_L1, NoSymbol, /* 0x1 */ + NoSymbol, NoSymbol, /* 0x2 */ + XK_L2, NoSymbol, /* 0x3 */ + NoSymbol, NoSymbol, /* 0x4 */ + XK_F1, NoSymbol, /* 0x5 */ + XK_F2, NoSymbol, /* 0x6 */ + NoSymbol, NoSymbol, /* 0x7 */ + XK_F3, NoSymbol, /* 0x8 */ + NoSymbol, NoSymbol, /* 0x9 */ + XK_F4, NoSymbol, /* 0xa */ + NoSymbol, NoSymbol, /* 0xb */ + XK_F5, NoSymbol, /* 0xc */ + NoSymbol, NoSymbol, /* 0xd */ + XK_F6, NoSymbol, /* 0xe */ + NoSymbol, NoSymbol, /* 0xf */ + XK_F7, NoSymbol, /* 0x10 */ + XK_F8, NoSymbol, /* 0x11 */ + XK_F9, NoSymbol, /* 0x12 */ + XK_Break, NoSymbol, /* 0x13 */ + NoSymbol, NoSymbol, /* 0x14 */ + XK_R1, NoSymbol, /* 0x15 */ + XK_R2, NoSymbol, /* 0x16 */ + XK_R3, NoSymbol, /* 0x17 */ + NoSymbol, NoSymbol, /* 0x18 */ + XK_L3, NoSymbol, /* 0x19 */ + XK_L4, NoSymbol, /* 0x1a */ + NoSymbol, NoSymbol, /* 0x1b */ + NoSymbol, NoSymbol, /* 0x1c */ + XK_Escape, NoSymbol, /* 0x1d */ + XK_1, XK_exclam, /* 0x1e */ + XK_2, XK_at, /* 0x1f */ + XK_3, XK_numbersign, /* 0x20 */ + XK_4, XK_dollar, /* 0x21 */ + XK_5, XK_percent, /* 0x22 */ + XK_6, XK_asciicircum, /* 0x23 */ + XK_7, XK_ampersand, /* 0x24 */ + XK_8, XK_asterisk, /* 0x25 */ + XK_9, XK_parenleft, /* 0x26 */ + XK_0, XK_parenright, /* 0x27 */ + XK_minus, XK_underscore, /* 0x28 */ + XK_equal, XK_plus, /* 0x29 */ + XK_grave, XK_asciitilde, /* 0x2a */ + XK_BackSpace, NoSymbol, /* 0x2b */ + NoSymbol, NoSymbol, /* 0x2c */ + XK_R4, NoSymbol, /* 0x2d */ + XK_R5, NoSymbol, /* 0x2e */ + XK_R6, NoSymbol, /* 0x2f */ + NoSymbol, NoSymbol, /* 0x30 */ + XK_L5, NoSymbol, /* 0x31 */ + NoSymbol, NoSymbol, /* 0x32 */ + XK_L6, NoSymbol, /* 0x33 */ + NoSymbol, NoSymbol, /* 0x34 */ + XK_Tab, NoSymbol, /* 0x35 */ + XK_Q, NoSymbol, /* 0x36 */ + XK_W, NoSymbol, /* 0x37 */ + XK_E, NoSymbol, /* 0x38 */ + XK_R, NoSymbol, /* 0x39 */ + XK_T, NoSymbol, /* 0x3a */ + XK_Y, NoSymbol, /* 0x3b */ + XK_U, NoSymbol, /* 0x3c */ + XK_I, NoSymbol, /* 0x3d */ + XK_O, NoSymbol, /* 0x3e */ + XK_P, NoSymbol, /* 0x3f */ + XK_bracketleft, XK_braceleft, /* 0x40 */ + XK_bracketright, XK_braceright, /* 0x41 */ + XK_Delete, NoSymbol, /* 0x42 */ + NoSymbol, NoSymbol, /* 0x43 */ + XK_R7, NoSymbol, /* 0x44 */ + XK_Up, XK_R8, /* 0x45 */ + XK_R9, NoSymbol, /* 0x46 */ + NoSymbol, NoSymbol, /* 0x47 */ + XK_L7, NoSymbol, /* 0x48 */ + XK_L8, NoSymbol, /* 0x49 */ + NoSymbol, NoSymbol, /* 0x4a */ + NoSymbol, NoSymbol, /* 0x4b */ + XK_Control_L, NoSymbol, /* 0x4c */ + XK_A, NoSymbol, /* 0x4d */ + XK_S, NoSymbol, /* 0x4e */ + XK_D, NoSymbol, /* 0x4f */ + XK_F, NoSymbol, /* 0x50 */ + XK_G, NoSymbol, /* 0x51 */ + XK_H, NoSymbol, /* 0x52 */ + XK_J, NoSymbol, /* 0x53 */ + XK_K, NoSymbol, /* 0x54 */ + XK_L, NoSymbol, /* 0x55 */ + XK_semicolon, XK_colon, /* 0x56 */ + XK_apostrophe, XK_quotedbl, /* 0x57 */ + XK_backslash, XK_bar, /* 0x58 */ + XK_Return, NoSymbol, /* 0x59 */ + NoSymbol, NoSymbol, /* 0x5a */ + XK_Left, XK_R10, /* 0x5b */ + XK_R11, NoSymbol, /* 0x5c */ + XK_Right, XK_R12, /* 0x5d */ + NoSymbol, NoSymbol, /* 0x5e */ + XK_L9, NoSymbol, /* 0x5f */ + NoSymbol, NoSymbol, /* 0x60 */ + XK_L10, NoSymbol, /* 0x61 */ + NoSymbol, NoSymbol, /* 0x62 */ + XK_Shift_L, NoSymbol, /* 0x63 */ + XK_Z, NoSymbol, /* 0x64 */ + XK_X, NoSymbol, /* 0x65 */ + XK_C, NoSymbol, /* 0x66 */ + XK_V, NoSymbol, /* 0x67 */ + XK_B, NoSymbol, /* 0x68 */ + XK_N, NoSymbol, /* 0x69 */ + XK_M, NoSymbol, /* 0x6a */ + XK_comma, XK_less, /* 0x6b */ + XK_period, XK_greater, /* 0x6c */ + XK_slash, XK_question, /* 0x6d */ + XK_Shift_R, NoSymbol, /* 0x6e */ + XK_Linefeed, NoSymbol, /* 0x6f */ + XK_R13, NoSymbol, /* 0x70 */ + XK_Down, XK_R14, /* 0x71 */ + XK_R15, NoSymbol, /* 0x72 */ + NoSymbol, NoSymbol, /* 0x73 */ + NoSymbol, NoSymbol, /* 0x74 */ + NoSymbol, NoSymbol, /* 0x75 */ + NoSymbol, NoSymbol, /* 0x76 */ + NoSymbol, NoSymbol, /* 0x77 */ + XK_Meta_L, NoSymbol, /* 0x78 */ + XK_space, NoSymbol, /* 0x79 */ + XK_Meta_R, NoSymbol, /* 0x7a */ + NoSymbol, NoSymbol, /* 0x7b */ + NoSymbol, NoSymbol, /* 0x7c */ + NoSymbol, NoSymbol, /* 0x7d */ + NoSymbol, NoSymbol, /* 0x7e */ + NoSymbol, NoSymbol, /* 0x7f */ +}; + +static SunModmapRec US2Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 76, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 0, 0 } +}; + +#else + +#define US2Keymap NULL +#define US2Modmap NULL + +#endif /* US2 */ + +#ifdef US3 + +static KeySym US3Keymap[] = { + XK_L1, NoSymbol, /* 0x1 */ + NoSymbol, NoSymbol, /* 0x2 */ + XK_L2, NoSymbol, /* 0x3 */ + NoSymbol, NoSymbol, /* 0x4 */ + XK_F1, NoSymbol, /* 0x5 */ + XK_F2, NoSymbol, /* 0x6 */ + NoSymbol, NoSymbol, /* 0x7 */ + XK_F3, NoSymbol, /* 0x8 */ + NoSymbol, NoSymbol, /* 0x9 */ + XK_F4, NoSymbol, /* 0xa */ + NoSymbol, NoSymbol, /* 0xb */ + XK_F5, NoSymbol, /* 0xc */ + NoSymbol, NoSymbol, /* 0xd */ + XK_F6, NoSymbol, /* 0xe */ + NoSymbol, NoSymbol, /* 0xf */ + XK_F7, NoSymbol, /* 0x10 */ + XK_F8, NoSymbol, /* 0x11 */ + XK_F9, NoSymbol, /* 0x12 */ + XK_Alt_R, NoSymbol, /* 0x13 */ + NoSymbol, NoSymbol, /* 0x14 */ + XK_R1, NoSymbol, /* 0x15 */ + XK_R2, NoSymbol, /* 0x16 */ + XK_R3, NoSymbol, /* 0x17 */ + NoSymbol, NoSymbol, /* 0x18 */ + XK_L3, NoSymbol, /* 0x19 */ + XK_L4, NoSymbol, /* 0x1a */ + NoSymbol, NoSymbol, /* 0x1b */ + NoSymbol, NoSymbol, /* 0x1c */ + XK_Escape, NoSymbol, /* 0x1d */ + XK_1, XK_exclam, /* 0x1e */ + XK_2, XK_at, /* 0x1f */ + XK_3, XK_numbersign, /* 0x20 */ + XK_4, XK_dollar, /* 0x21 */ + XK_5, XK_percent, /* 0x22 */ + XK_6, XK_asciicircum, /* 0x23 */ + XK_7, XK_ampersand, /* 0x24 */ + XK_8, XK_asterisk, /* 0x25 */ + XK_9, XK_parenleft, /* 0x26 */ + XK_0, XK_parenright, /* 0x27 */ + XK_minus, XK_underscore, /* 0x28 */ + XK_equal, XK_plus, /* 0x29 */ + XK_grave, XK_asciitilde, /* 0x2a */ + XK_BackSpace, NoSymbol, /* 0x2b */ + NoSymbol, NoSymbol, /* 0x2c */ + XK_R4, NoSymbol, /* 0x2d */ + XK_R5, NoSymbol, /* 0x2e */ + XK_R6, NoSymbol, /* 0x2f */ + NoSymbol, NoSymbol, /* 0x30 */ + XK_L5, NoSymbol, /* 0x31 */ + NoSymbol, NoSymbol, /* 0x32 */ + XK_L6, NoSymbol, /* 0x33 */ + NoSymbol, NoSymbol, /* 0x34 */ + XK_Tab, NoSymbol, /* 0x35 */ + XK_Q, NoSymbol, /* 0x36 */ + XK_W, NoSymbol, /* 0x37 */ + XK_E, NoSymbol, /* 0x38 */ + XK_R, NoSymbol, /* 0x39 */ + XK_T, NoSymbol, /* 0x3a */ + XK_Y, NoSymbol, /* 0x3b */ + XK_U, NoSymbol, /* 0x3c */ + XK_I, NoSymbol, /* 0x3d */ + XK_O, NoSymbol, /* 0x3e */ + XK_P, NoSymbol, /* 0x3f */ + XK_bracketleft, XK_braceleft, /* 0x40 */ + XK_bracketright, XK_braceright, /* 0x41 */ + XK_Delete, NoSymbol, /* 0x42 */ + NoSymbol, NoSymbol, /* 0x43 */ + XK_R7, NoSymbol, /* 0x44 */ + XK_Up, XK_R8, /* 0x45 */ + XK_R9, NoSymbol, /* 0x46 */ + NoSymbol, NoSymbol, /* 0x47 */ + XK_L7, NoSymbol, /* 0x48 */ + XK_L8, NoSymbol, /* 0x49 */ + NoSymbol, NoSymbol, /* 0x4a */ + NoSymbol, NoSymbol, /* 0x4b */ + XK_Control_L, NoSymbol, /* 0x4c */ + XK_A, NoSymbol, /* 0x4d */ + XK_S, NoSymbol, /* 0x4e */ + XK_D, NoSymbol, /* 0x4f */ + XK_F, NoSymbol, /* 0x50 */ + XK_G, NoSymbol, /* 0x51 */ + XK_H, NoSymbol, /* 0x52 */ + XK_J, NoSymbol, /* 0x53 */ + XK_K, NoSymbol, /* 0x54 */ + XK_L, NoSymbol, /* 0x55 */ + XK_semicolon, XK_colon, /* 0x56 */ + XK_apostrophe, XK_quotedbl, /* 0x57 */ + XK_backslash, XK_bar, /* 0x58 */ + XK_Return, NoSymbol, /* 0x59 */ + NoSymbol, NoSymbol, /* 0x5a */ + XK_Left, XK_R10, /* 0x5b */ + XK_R11, NoSymbol, /* 0x5c */ + XK_Right, XK_R12, /* 0x5d */ + NoSymbol, NoSymbol, /* 0x5e */ + XK_L9, NoSymbol, /* 0x5f */ + NoSymbol, NoSymbol, /* 0x60 */ + XK_L10, NoSymbol, /* 0x61 */ + NoSymbol, NoSymbol, /* 0x62 */ + XK_Shift_L, NoSymbol, /* 0x63 */ + XK_Z, NoSymbol, /* 0x64 */ + XK_X, NoSymbol, /* 0x65 */ + XK_C, NoSymbol, /* 0x66 */ + XK_V, NoSymbol, /* 0x67 */ + XK_B, NoSymbol, /* 0x68 */ + XK_N, NoSymbol, /* 0x69 */ + XK_M, NoSymbol, /* 0x6a */ + XK_comma, XK_less, /* 0x6b */ + XK_period, XK_greater, /* 0x6c */ + XK_slash, XK_question, /* 0x6d */ + XK_Shift_R, NoSymbol, /* 0x6e */ + XK_Linefeed, NoSymbol, /* 0x6f */ + XK_R13, NoSymbol, /* 0x70 */ + XK_Down, XK_R14, /* 0x71 */ + XK_R15, NoSymbol, /* 0x72 */ + NoSymbol, NoSymbol, /* 0x73 */ + NoSymbol, NoSymbol, /* 0x74 */ + NoSymbol, NoSymbol, /* 0x75 */ + NoSymbol, NoSymbol, /* 0x76 */ + XK_Caps_Lock, NoSymbol, /* 0x77 */ + XK_Meta_L, NoSymbol, /* 0x78 */ + XK_space, NoSymbol, /* 0x79 */ + XK_Meta_R, NoSymbol, /* 0x7a */ + NoSymbol, NoSymbol, /* 0x7b */ + NoSymbol, NoSymbol, /* 0x7c */ + NoSymbol, NoSymbol, /* 0x7d */ + NoSymbol, NoSymbol, /* 0x7e */ + NoSymbol, NoSymbol, /* 0x7f */ +}; + +static SunModmapRec US3Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 76, ControlMask }, + { 119, LockMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 0, 0 } +}; + +#else + +#define US3Keymap NULL +#define US3Modmap NULL + +#endif /* US3 */ + +KeySymsRec sunKeySyms[] = { + /* map minKeyCode maxKC width */ + { (KeySym *)NULL, 0, 0, 0 }, + { (KeySym *)NULL, 0, 0, 0 }, + { US2Keymap, 1, 0x7a, 2 }, + { US3Keymap, 1, 0x7a, 2 }, + { (KeySym *)NULL, 1, 0x7d, 4 } +}; + +SunModmapRec *sunModMaps[] = { + NULL, + NULL, + US2Modmap, + US3Modmap, + NULL +}; + +static SunModmapRec Generic5Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 119, LockMask }, + { 76, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 13, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 19, Alt_Mask }, + { 0, 0} +}; + +#if defined(DEN4) || defined(SWEDFIN4) || defined(SWFR4) || defined(SWGE4) + +static SunModmapRec DenSwedFinSw4Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 76, LockMask }, + { 119, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 67, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 19, Alt_Mask }, + { 0, 0 } +}; + +#endif + +#if defined(FRBE4) || defined(NETH4) + +static SunModmapRec FrBeNeth4Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 13, LockMask }, + { 76, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 119, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 19, Alt_Mask }, + { 0, 0 } +}; + +#endif + +#if defined(ITALY4) || defined(NORW4) || defined(PORT4) || defined(SPAINLATAM4) + +static SunModmapRec ItNorPortSp4Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 76, LockMask }, + { 119, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 13, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 19, Alt_Mask }, + { 0, 0 } +}; + +#endif + +#ifdef CAN4 + +static KeySym Canada4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 9*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 11*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + XK_Control_R, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_degree, NoSymbol, XK_notsign, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_question, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_asterisk, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenleft, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_parenright, XK_braceright, NoSymbol, /* 39*/ + XK_minus, XK_underscore, XK_bar, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_Agrave, NoSymbol, XK_grave, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, XK_KP_Equal, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, XK_KP_Divide, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, XK_KP_Multiply, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Circum,SunXK_FA_Diaeresis,XK_asciicircum,NoSymbol, /* 64*/ + XK_Ccedilla, NoSymbol, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, XK_Prior, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_Egrave, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, XK_guillemotleft,NoSymbol, /*100*/ + XK_X, NoSymbol, XK_guillemotright,NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_apostrophe, XK_less, NoSymbol, /*107*/ + XK_period, NoSymbol, XK_greater, NoSymbol, /*108*/ + XK_Eacute, NoSymbol, XK_slash, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_Ugrave, NoSymbol, XK_backslash, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +static SunModmapRec Canada4Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 76, LockMask }, + { 13, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 119, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 19, Alt_Mask }, + { 0, 0} +}; + +#else + +#define Canada4Keymap NULL +#define Canada4Modmap NULL + +#endif /* CANADA4 */ + +#ifdef CANFR5 + +static KeySym CanadaFr5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, XK_Break, XK_R1, XK_R1, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, XK_R3, XK_R3, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_plusminus, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_dollar, XK_cent, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_currency, NoSymbol, /* 34*/ + XK_6, XK_question, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, XK_bracketleft, NoSymbol, /* 38*/ + XK_0, XK_parenright, XK_bracketright,NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, XK_notsign, NoSymbol, /* 41*/ + XK_slash, XK_backslash, XK_bar, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, XK_R5, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, XK_R6, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift,NoSymbol,NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, XK_paragraph, NoSymbol, /* 63*/ + SunXK_FA_Circum,SunXK_FA_Diaeresis,SunXK_FA_Grave,NoSymbol, /* 64*/ + XK_Ccedilla, NoSymbol, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, XK_R4, XK_R4, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, XK_degree, NoSymbol, /* 86*/ + XK_Egrave, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_Agrave, NoSymbol, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, XK_guillemotleft,NoSymbol, /*100*/ + XK_X, NoSymbol, XK_guillemotright,NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_quoteright, XK_less, NoSymbol, /*107*/ + XK_period, XK_quotedbl, XK_greater, NoSymbol, /*108*/ + XK_Eacute, NoSymbol, XK_quoteleft, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_Uacute, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define CanadaFr5Modmap Generic5Modmap + +#else + +#define CanadaFr5Keymap NULL +#define CanadaFr5Modmap NULL + +#endif /* CANFR5 */ + + +#ifdef DEN4 + +static KeySym Denmark4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_asciitilde, XK_asciicircum, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, XK_R1, XK_Pause, NoSymbol, /* 21*/ + XK_Print, XK_R2, XK_Print, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_currency, XK_dollar, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_plus, XK_question, NoSymbol, NoSymbol, /* 40*/ + SunXK_FA_Acute, SunXK_FA_Grave, XK_bar, NoSymbol, /* 41*/ + XK_apostrophe, XK_asterisk, XK_grave, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Aring, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Circum,SunXK_FA_Tilde,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_AE, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_Ooblique, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_onehalf, XK_section, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_backslash, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Denmark4Modmap DenSwedFinSw4Modmap + +#else + +#define Denmark4Keymap NULL +#define Denmark4Modmap NULL + +#endif /* DENMARK4 */ + + +#ifdef DEN5 + +static KeySym Denmark5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_currency, XK_dollar, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_asciicircum, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_plus, XK_question, NoSymbol, NoSymbol, /* 40*/ + SunXK_FA_Acute, SunXK_FA_Grave, XK_bar, NoSymbol, /* 41*/ + XK_onehalf, XK_section, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Aring, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Circum,SunXK_FA_Tilde,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_AE, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_Ooblique, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_apostrophe, XK_asterisk, XK_grave, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_backslash, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Denmark5Modmap Generic5Modmap + +#else + +#define Denmark5Keymap NULL +#define Denmark5Modmap NULL + +#endif /* DEN5 */ + + +#ifdef FR5 + +static KeySym France5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_ampersand, XK_1, NoSymbol, NoSymbol, /* 30*/ + XK_eacute, XK_2, XK_asciitilde, NoSymbol, /* 31*/ + XK_quotedbl, XK_3, XK_numbersign, NoSymbol, /* 32*/ + XK_apostrophe, XK_4, XK_braceleft, NoSymbol, /* 33*/ + XK_parenleft, XK_5, XK_bracketleft, NoSymbol, /* 34*/ + XK_minus, XK_6, XK_bar, NoSymbol, /* 35*/ + XK_egrave, XK_7, XK_grave, NoSymbol, /* 36*/ + XK_underscore, XK_8, XK_backslash, NoSymbol, /* 37*/ + XK_ccedilla, XK_9, XK_asciicircum, NoSymbol, /* 38*/ + XK_agrave, XK_0, XK_at, NoSymbol, /* 39*/ + XK_parenright, XK_degree, XK_bracketright,NoSymbol, /* 40*/ + XK_equal, XK_plus, XK_braceright, NoSymbol, /* 41*/ + XK_twosuperior, NoSymbol, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Circum,SunXK_FA_Diaeresis,NoSymbol, NoSymbol, /* 64*/ + XK_dollar, XK_sterling, XK_currency, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_ugrave, XK_percent, NoSymbol, NoSymbol, /* 87*/ + XK_asterisk, XK_mu, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_comma, XK_question, NoSymbol, NoSymbol, /*106*/ + XK_semicolon, XK_period, NoSymbol, NoSymbol, /*107*/ + XK_colon, XK_slash, NoSymbol, NoSymbol, /*108*/ + XK_exclam, XK_section, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, XK_Next, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define France5Modmap Generic5Modmap + +#else + +#define France5Keymap NULL +#define France5Modmap NULL + +#endif /* FRANCE5 */ + + +#ifdef FRBE4 + +static KeySym FranceBelg4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_bracketright,XK_braceright, XK_guillemotright,NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_ampersand, XK_1, NoSymbol, NoSymbol, /* 30*/ + XK_eacute, XK_2, XK_twosuperior, NoSymbol, /* 31*/ + XK_quotedbl, XK_3, XK_threesuperior,NoSymbol, /* 32*/ + XK_apostrophe, XK_4, XK_acute, NoSymbol, /* 33*/ + XK_parenleft, XK_5, NoSymbol, NoSymbol, /* 34*/ + XK_section, XK_6, XK_asciicircum, NoSymbol, /* 35*/ + XK_egrave, XK_7, NoSymbol, NoSymbol, /* 36*/ + XK_exclam, XK_8, XK_sterling, NoSymbol, /* 37*/ + XK_ccedilla, XK_9, XK_backslash, NoSymbol, /* 38*/ + XK_agrave, XK_0, NoSymbol, NoSymbol, /* 39*/ + XK_parenright, XK_degree, XK_asciitilde, NoSymbol, /* 40*/ + XK_minus, XK_underscore, XK_numbersign, NoSymbol, /* 41*/ + XK_asterisk, XK_bar, XK_currency, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, XK_KP_Equal, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, XK_KP_Divide, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, XK_KP_Multiply, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Circum,SunXK_FA_Diaeresis,NoSymbol, NoSymbol, /* 64*/ + XK_grave, XK_dollar, XK_at, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, XK_KP_Subtract, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_M, NoSymbol, XK_mu, NoSymbol, /* 86*/ + XK_ugrave, XK_percent, NoSymbol, NoSymbol, /* 87*/ + XK_bracketleft, XK_braceleft, XK_guillemotleft,NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, XK_KP_Enter, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_comma, XK_question, NoSymbol, NoSymbol, /*106*/ + XK_semicolon, XK_period, NoSymbol, NoSymbol, /*107*/ + XK_colon, XK_slash, NoSymbol, NoSymbol, /*108*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, XK_KP_Add, NoSymbol, NoSymbol, /*125*/ +}; + +#define FranceBelg4Modmap FrBeNeth4Modmap + +#else + +#define FranceBelg4Keymap NULL +#define FranceBelg4Modmap NULL + +#endif /* FRANCEBELG4 */ + + +#ifdef GER4 + +static KeySym Germany4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + XK_Alt_R, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_bracketright,XK_braceright,XK_guillemotright,NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Scroll_Lock, NoSymbol, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_twosuperior, NoSymbol, /* 31*/ + XK_3, XK_section, XK_threesuperior,NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_degree, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_grave, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_apostrophe, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_bar, NoSymbol, /* 39*/ + XK_ssharp, XK_question, XK_backslash, NoSymbol, /* 40*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 41*/ + XK_numbersign, XK_asciicircum, XK_at, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Delete, XK_KP_Decimal, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Udiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + XK_plus, XK_asterisk, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, XK_KP_Subtract, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Odiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_Adiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_bracketleft, XK_braceleft, XK_guillemotleft,NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +static SunModmapRec Germany4Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 76, LockMask }, + { 119, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 19, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 13, Alt_Mask }, + { 0, 0 } +}; + +#else + +#define Germany4Keymap NULL +#define Germany4Modmap NULL + +#endif /* GERMANY4 */ + + +#ifdef GER5 + +static KeySym Germany5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_twosuperior, NoSymbol, /* 31*/ + XK_3, XK_section, XK_threesuperior,NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_ssharp, XK_question, XK_backslash, NoSymbol, /* 40*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 41*/ + XK_asciicircum, XK_degree, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Separator,NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_q, XK_Q, XK_at, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Udiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + XK_plus, XK_asterisk, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Odiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_Adiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_numbersign, XK_apostrophe, XK_grave, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_m, XK_M, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_bar, NoSymbol, /*124*/ + XK_KP_Add, XK_KP_Add, NoSymbol, NoSymbol, /*125*/ +}; + +#define Germany5Modmap Generic5Modmap + +#else + +#define Germany5Keymap NULL +#define Germany5Modmap NULL + +#endif /* GERMANY5 */ + + +#ifdef ITALY4 + +static KeySym Italy4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_bracketright,XK_braceright, XK_guillemotright,NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_twosuperior, NoSymbol, /* 31*/ + XK_3, XK_sterling, XK_threesuperior,NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_notsign, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_backslash, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_bar, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + XK_igrave, XK_asciicircum, NoSymbol, NoSymbol, /* 41*/ + XK_ugrave, XK_section, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_egrave, XK_eacute, NoSymbol, NoSymbol, /* 64*/ + XK_plus, XK_asterisk, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_ograve, XK_ccedilla, XK_at, NoSymbol, /* 86*/ + XK_agrave, XK_degree, XK_numbersign, NoSymbol, /* 87*/ + XK_bracketleft, XK_braceleft, XK_guillemotleft,NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R4, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R5, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R6, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Italy4Modmap ItNorPortSp4Modmap + +#else + +#define Italy4Keymap NULL +#define Italy4Modmap NULL + +#endif /* ITALY4 */ + + +#ifdef ITALY5 + +static KeySym Italy5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, XK_Break, NoSymbol, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_sterling, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_braceleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_braceright, NoSymbol, /* 38*/ + XK_0, XK_equal, NoSymbol, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + XK_igrave, XK_asciicircum, NoSymbol, NoSymbol, /* 41*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, XK_KP_Divide, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, XK_KP_Multiply, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_egrave, XK_eacute, XK_bracketleft, NoSymbol, /* 64*/ + XK_plus, XK_asterisk, XK_bracketright,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_ograve, XK_ccedilla, XK_at, NoSymbol, /* 86*/ + XK_agrave, XK_degree, XK_numbersign, NoSymbol, /* 87*/ + XK_ugrave, XK_section, XK_asciitilde, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, XK_KP_Enter, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, XK_KP_Add, NoSymbol, NoSymbol, /*125*/ +}; + +#define Italy5Modmap Generic5Modmap + +#else + +#define Italy5Keymap NULL +#define Italy5Modmap NULL + +#endif /* ITALY5 */ + + +#ifdef JAPAN4 + +static KeySym Japan4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_kana_NU, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_kana_FU, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_kana_A, XK_kana_a, /* 32*/ + XK_4, XK_dollar, XK_kana_U, XK_kana_u, /* 33*/ + XK_5, XK_percent, XK_kana_E, XK_kana_e, /* 34*/ + XK_6, XK_ampersand, XK_kana_O, XK_kana_o, /* 35*/ + XK_7, XK_apostrophe, XK_kana_YA, XK_kana_ya, /* 36*/ + XK_8, XK_parenleft, XK_kana_YU, XK_kana_yu, /* 37*/ + XK_9, XK_parenright, XK_kana_YO, XK_kana_yo, /* 38*/ + XK_0, XK_0, XK_kana_WA, XK_kana_WO, /* 39*/ + XK_minus, XK_equal, XK_kana_HO, NoSymbol, /* 40*/ + XK_asciicircum, XK_asciitilde, XK_kana_HE, NoSymbol, /* 41*/ + XK_bracketright,XK_braceright, XK_kana_MU, XK_kana_closingbracket, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_q, XK_Q, XK_kana_TA, NoSymbol, /* 54*/ + XK_w, XK_W, XK_kana_TE, NoSymbol, /* 55*/ + XK_e, XK_E, XK_kana_I, XK_kana_i, /* 56*/ + XK_r, XK_R, XK_kana_SU, NoSymbol, /* 57*/ + XK_t, XK_T, XK_kana_KA, NoSymbol, /* 58*/ + XK_y, XK_Y, XK_kana_N, NoSymbol, /* 59*/ + XK_u, XK_U, XK_kana_NA, NoSymbol, /* 60*/ + XK_i, XK_I, XK_kana_NI, NoSymbol, /* 61*/ + XK_o, XK_O, XK_kana_RA, NoSymbol, /* 62*/ + XK_p, XK_P, XK_kana_SE, NoSymbol, /* 63*/ + XK_at, XK_grave, XK_voicedsound, NoSymbol, /* 64*/ + XK_bracketleft, XK_braceleft, XK_semivoicedsound,XK_kana_openingbracket, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, XK_KP_Subtract, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_a, XK_A, XK_kana_CHI, NoSymbol, /* 77*/ + XK_s, XK_S, XK_kana_TO, NoSymbol, /* 78*/ + XK_d, XK_D, XK_kana_SHI, NoSymbol, /* 79*/ + XK_f, XK_F, XK_kana_HA, NoSymbol, /* 80*/ + XK_g, XK_G, XK_kana_KI, NoSymbol, /* 81*/ + XK_h, XK_H, XK_kana_KU, NoSymbol, /* 82*/ + XK_j, XK_J, XK_kana_MA, NoSymbol, /* 83*/ + XK_k, XK_K, XK_kana_NO, NoSymbol, /* 84*/ + XK_l, XK_L, XK_kana_RI, NoSymbol, /* 85*/ + XK_semicolon, XK_plus, XK_kana_RE, NoSymbol, /* 86*/ + XK_colon, XK_asterisk, XK_kana_KE, NoSymbol, /* 87*/ + XK_backslash, XK_bar, XK_prolongedsound,NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_z, XK_Z, XK_kana_TSU, XK_kana_tsu, /*100*/ + XK_x, XK_X, XK_kana_SA, NoSymbol, /*101*/ + XK_c, XK_C, XK_kana_SO, NoSymbol, /*102*/ + XK_v, XK_V, XK_kana_HI, NoSymbol, /*103*/ + XK_b, XK_B, XK_kana_KO, NoSymbol, /*104*/ + XK_n, XK_N, XK_kana_MI, NoSymbol, /*105*/ + XK_m, XK_M, XK_kana_MO, NoSymbol, /*106*/ + XK_comma, XK_less, XK_kana_NE, XK_kana_comma, /*107*/ + XK_period, XK_greater, XK_kana_RU, XK_kana_fullstop, /*108*/ + XK_slash, XK_question, XK_kana_ME, XK_kana_conjunctive, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_backslash, XK_underscore, XK_kana_RO, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + XK_Execute, NoSymbol, NoSymbol, NoSymbol, /*115*/ + XK_Kanji, NoSymbol, NoSymbol, NoSymbol, /*116*/ + XK_Henkan_Mode, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, XK_KP_Add, NoSymbol, NoSymbol, /*125*/ +}; + +#define Japan4Modmap Generic5Modmap + +#else + +#define Japan4Keymap NULL +#define Japan4Modmap NULL + +#endif /* JAPAN4 */ + + +#ifdef JAPAN5 + +static KeySym Japan5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_kana_NU, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_kana_FU, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_kana_A, XK_kana_a, /* 32*/ + XK_4, XK_dollar, XK_kana_U, XK_kana_u, /* 33*/ + XK_5, XK_percent, XK_kana_E, XK_kana_e, /* 34*/ + XK_6, XK_ampersand, XK_kana_O, XK_kana_o, /* 35*/ + XK_7, XK_apostrophe, XK_kana_YA, XK_kana_ya, /* 36*/ + XK_8, XK_parenleft, XK_kana_YU, XK_kana_yu, /* 37*/ + XK_9, XK_parenright, XK_kana_YO, XK_kana_yo, /* 38*/ + XK_0, XK_0, XK_kana_WA, XK_kana_WO, /* 39*/ + XK_minus, XK_equal, XK_kana_HO, NoSymbol, /* 40*/ + XK_asciicircum, XK_asciitilde, XK_kana_HE, NoSymbol, /* 41*/ + XK_backslash, XK_bar, XK_prolongedsound,NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_q, XK_Q, XK_kana_TA, NoSymbol, /* 54*/ + XK_w, XK_W, XK_kana_TE, NoSymbol, /* 55*/ + XK_e, XK_E, XK_kana_I, XK_kana_i, /* 56*/ + XK_r, XK_R, XK_kana_SU, NoSymbol, /* 57*/ + XK_t, XK_T, XK_kana_KA, NoSymbol, /* 58*/ + XK_y, XK_Y, XK_kana_N, NoSymbol, /* 59*/ + XK_u, XK_U, XK_kana_NA, NoSymbol, /* 60*/ + XK_i, XK_I, XK_kana_NI, NoSymbol, /* 61*/ + XK_o, XK_O, XK_kana_RA, NoSymbol, /* 62*/ + XK_p, XK_P, XK_kana_SE, NoSymbol, /* 63*/ + XK_at, XK_grave, XK_voicedsound, NoSymbol, /* 64*/ + XK_bracketleft, XK_braceleft, XK_semivoicedsound,XK_kana_openingbracket, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_a, XK_A, XK_kana_CHI, NoSymbol, /* 77*/ + XK_s, XK_S, XK_kana_TO, NoSymbol, /* 78*/ + XK_d, XK_D, XK_kana_SHI, NoSymbol, /* 79*/ + XK_f, XK_F, XK_kana_HA, NoSymbol, /* 80*/ + XK_g, XK_G, XK_kana_KI, NoSymbol, /* 81*/ + XK_h, XK_H, XK_kana_KU, NoSymbol, /* 82*/ + XK_j, XK_J, XK_kana_MA, NoSymbol, /* 83*/ + XK_k, XK_K, XK_kana_NO, NoSymbol, /* 84*/ + XK_l, XK_L, XK_kana_RI, NoSymbol, /* 85*/ + XK_semicolon, XK_plus, XK_kana_RE, NoSymbol, /* 86*/ + XK_colon, XK_asterisk, XK_kana_KE, NoSymbol, /* 87*/ + XK_bracketright,XK_braceright, XK_kana_MU, XK_kana_closingbracket, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_z, XK_Z, XK_kana_TSU, XK_kana_tsu, /*100*/ + XK_x, XK_X, XK_kana_SA, NoSymbol, /*101*/ + XK_c, XK_C, XK_kana_SO, NoSymbol, /*102*/ + XK_v, XK_V, XK_kana_HI, NoSymbol, /*103*/ + XK_b, XK_B, XK_kana_KO, NoSymbol, /*104*/ + XK_n, XK_N, XK_kana_MI, NoSymbol, /*105*/ + XK_m, XK_M, XK_kana_MO, NoSymbol, /*106*/ + XK_comma, XK_less, XK_kana_NE, XK_kana_comma, /*107*/ + XK_period, XK_greater, XK_kana_RU, XK_kana_fullstop, /*108*/ + XK_slash, XK_question, XK_kana_ME, XK_kana_conjunctive, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_backslash, XK_underscore, XK_kana_RO, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + XK_Execute, NoSymbol, NoSymbol, NoSymbol, /*115*/ + XK_Kanji, NoSymbol, NoSymbol, NoSymbol, /*116*/ + XK_Henkan_Mode, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, XK_KP_Add, NoSymbol, NoSymbol, /*125*/ +}; + +#define Japan5Modmap Generic5Modmap + +#else + +#define Japan5Keymap NULL +#define Japan5Modmap NULL + +#endif /* JAPAN5 */ + + +#ifdef KOREA4 + +static KeySym Korea4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, NoSymbol, NoSymbol, /* 87*/ + XK_backslash, XK_bar, XK_brokenbar, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +static SunModmapRec Korea4Modmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 119, LockMask }, + { 76, ControlMask }, + { 120, Meta_Mask }, + { 122, Meta_Mask }, + { 111, Mode_switch_Mask }, + { 98, Num_Lock_Mask }, + { 19, Alt_Mask }, + { 0, 0 } +}; + +#else + +#define Korea4Keymap NULL +#define Korea4Modmap NULL + +#endif /* KOREA4 */ + + +#ifdef KOREA5 + +static KeySym Korea5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, NoSymbol, NoSymbol, /* 87*/ + XK_backslash, XK_bar, XK_brokenbar, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Korea5Modmap Generic5Modmap + +#else + +#define Korea5Keymap NULL +#define Korea5Modmap NULL + +#endif /* KOREA5 */ + + +#ifdef NETH4 + +static KeySym Netherland4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_onesuperior, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_twosuperior, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_threesuperior,NoSymbol, /* 32*/ + XK_4, XK_dollar, XK_onequarter, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_onehalf, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_threequarters,NoSymbol, /* 35*/ + XK_7, XK_underscore, XK_sterling, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_braceleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_braceright, NoSymbol, /* 38*/ + XK_0, XK_apostrophe, XK_grave, NoSymbol, /* 39*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /* 40*/ + XK_degree, SunXK_FA_Tilde, SunXK_FA_Cedilla,NoSymbol, /* 41*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Diaeresis,XK_asciicircum,SunXK_FA_Circum,NoSymbol, /* 64*/ + XK_asterisk, XK_brokenbar, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, XK_ssharp, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_plus, XK_plusminus, NoSymbol, NoSymbol, /* 86*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 87*/ + XK_at, XK_section, XK_notsign, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, XK_guillemotleft,NoSymbol, /*100*/ + XK_X, NoSymbol, XK_guillemotright,NoSymbol, /*101*/ + XK_C, NoSymbol, XK_cent, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_equal, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_bracketright,XK_bracketleft, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Netherland4Modmap FrBeNeth4Modmap + +#else + +#define Netherland4Keymap NULL +#define Netherland4Modmap NULL + +#endif /* NETHERLAND4 */ + + +#ifdef NETH5 + +static KeySym Netherland5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_onesuperior, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_twosuperior, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_threesuperior,NoSymbol, /* 32*/ + XK_4, XK_dollar, XK_onequarter, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_onehalf, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_threequarters,NoSymbol, /* 35*/ + XK_7, XK_underscore, XK_sterling, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_braceleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_braceright, NoSymbol, /* 38*/ + XK_0, XK_apostrophe, XK_grave, NoSymbol, /* 39*/ + XK_slash, XK_question, XK_backslash, NoSymbol, /* 40*/ + XK_degree, SunXK_FA_Tilde, SunXK_FA_Cedilla,NoSymbol, /* 41*/ + XK_at, XK_section, XK_notsign, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Separator,NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Diaeresis,SunXK_FA_Circum,NoSymbol, NoSymbol, /* 64*/ + XK_asterisk, XK_bar, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, XK_ssharp, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_plus, XK_plusminus, NoSymbol, NoSymbol, /* 86*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 87*/ + XK_less, XK_greater, XK_asciicircum, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_z, XK_Z, XK_guillemotleft,NoSymbol, /*100*/ + XK_x, XK_X, XK_guillemotright,NoSymbol, /*101*/ + XK_c, XK_C, XK_cent, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_m, XK_M, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, XK_periodcentered,NoSymbol, /*108*/ + XK_minus, XK_equal, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_bracketright,XK_bracketleft, XK_brokenbar, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Netherland5Modmap Generic5Modmap + +#else + +#define Netherland5Keymap NULL +#define Netherland5Modmap NULL + +#endif /* NETHERLAND5 */ + + +#ifdef NORW4 + +static KeySym Norway4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_asciitilde, XK_asciicircum, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_currency, XK_dollar, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_plus, XK_question, NoSymbol, NoSymbol, /* 40*/ + XK_backslash, SunXK_FA_Grave, SunXK_FA_Acute, NoSymbol, /* 41*/ + XK_apostrophe, XK_asterisk, XK_grave, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Aring, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Circum,SunXK_FA_Tilde,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Ooblique, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_AE, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_bar, XK_section, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Norway4Modmap ItNorPortSp4Modmap + +#else + +#define Norway4Keymap NULL +#define Norway4Modmap NULL + +#endif /* NORWAY4 */ + + +#ifdef NORW5 + +static KeySym Norway5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_currency, XK_dollar, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_asciicircum, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_plus, XK_question, NoSymbol, NoSymbol, /* 40*/ + XK_backslash, SunXK_FA_Grave, SunXK_FA_Acute, NoSymbol, /* 41*/ + XK_bar, XK_section, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Separator,NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Aring, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Circum,SunXK_FA_Tilde,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Ooblique, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_AE, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_apostrophe, XK_asterisk, XK_grave, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Norway5Modmap Generic5Modmap + +#else + +#define Norway5Keymap NULL +#define Norway5Modmap NULL + +#endif /* NORWAY5 */ + + +#ifdef PORT4 + +static KeySym Portugal4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_bracketright,XK_braceright, XK_guillemotright,NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, XK_Break, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_dollar, XK_section, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_notsign, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_backslash, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_bar, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + XK_exclamdown, XK_questiondown,NoSymbol, NoSymbol, /* 41*/ + SunXK_FA_Tilde, SunXK_FA_Circum,XK_asciicircum, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Diaeresis,XK_asterisk, XK_plus, NoSymbol, /* 64*/ + SunXK_FA_Acute, SunXK_FA_Grave, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Ccedilla, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_masculine, XK_ordfeminine, NoSymbol, NoSymbol, /* 87*/ + XK_bracketleft, XK_braceleft, XK_guillemotleft,NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Portugal4Modmap ItNorPortSp4Modmap + +#else + +#define Portugal4Keymap NULL +#define Portugal4Modmap NULL + +#endif /* PORTUGAL4 */ + + +#ifdef PORT5 + +static KeySym Portugal5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_dollar, XK_section, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_asciicircum, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + XK_guillemotleft,XK_guillemotright,NoSymbol, NoSymbol, /* 41*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_plus, XK_asterisk, SunXK_FA_Diaeresis,NoSymbol, /* 64*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Ccedilla, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_masculine, XK_ordfeminine, NoSymbol, NoSymbol, /* 87*/ + SunXK_FA_Tilde, SunXK_FA_Circum,NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Portugal5Modmap Generic5Modmap + +#else + +#define Portugal5Keymap NULL +#define Portugal5Modmap NULL + +#endif /* PORTUGAL5 */ + + +#ifdef SPAIN5 + +static KeySym Spain5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_bar, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_periodcentered,XK_numbersign,NoSymbol, /* 32*/ + XK_4, XK_dollar, XK_asciicircum, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_notsign, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenright, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_equal, NoSymbol, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + XK_exclamdown, XK_questiondown,NoSymbol, NoSymbol, /* 41*/ + XK_masculine, XK_ordfeminine, XK_backslash, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Grave, SunXK_FA_Circum,XK_bracketleft, NoSymbol, /* 64*/ + XK_plus, XK_asterisk, XK_bracketright,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Ntilde, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + SunXK_FA_Acute, SunXK_FA_Diaeresis,XK_braceleft,NoSymbol, /* 87*/ + XK_ccedilla, XK_Ccedilla, XK_braceright, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Spain5Modmap Generic5Modmap + +#else + +#define Spain5Keymap NULL +#define Spain5Modmap NULL + +#endif /* SPAIN5 */ + + +#ifdef SPAINLATAM4 + +static KeySym SpainLatAm4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_bracketright,XK_braceright, XK_guillemotright,NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Scroll_Lock, NoSymbol, XK_R3, XK_Break, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_periodcentered,XK_numbersign,NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_degree, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_notsign, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_backslash, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_bar, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + XK_exclamdown, XK_questiondown,NoSymbol, NoSymbol, /* 41*/ + XK_Ccedilla, NoSymbol, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, XK_masculine, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + SunXK_FA_Grave, SunXK_FA_Circum,XK_asciicircum, NoSymbol, /* 64*/ + XK_plus, XK_asterisk, XK_asciitilde, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, XK_ordfeminine, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Ntilde, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + SunXK_FA_Acute, SunXK_FA_Diaeresis,NoSymbol, NoSymbol, /* 87*/ + XK_bracketleft, XK_braceleft, XK_guillemotleft,NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define SpainLatAm4Modmap ItNorPortSp4Modmap + +#else + +#define SpainLatAm4Keymap NULL +#define SpainLatAm4Modmap NULL + +#endif /* SPAINLATAM4 */ + + +#ifdef SWED5 + +static KeySym Sweden5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_currency, XK_dollar, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_plus, XK_question, XK_backslash, NoSymbol, /* 40*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 41*/ + XK_section, XK_onehalf, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Separator,NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Aring, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,XK_asciicircum,XK_asciitilde,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Odiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_Adiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_apostrophe, XK_asterisk, XK_grave, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_bar, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Sweden5Modmap Generic5Modmap + +#else + +#define Sweden5Keymap NULL +#define Sweden5Modmap NULL + +#endif /* SWEDEN5 */ + + +#ifdef SWEDFIN4 + +static KeySym SwedenFin4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_asciitilde, XK_asciicircum, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_numbersign, XK_sterling, NoSymbol, /* 32*/ + XK_4, XK_currency, XK_dollar, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_braceleft, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_bracketleft, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_bracketright,NoSymbol, /* 38*/ + XK_0, XK_equal, XK_braceright, NoSymbol, /* 39*/ + XK_plus, XK_question, XK_backslash, NoSymbol, /* 40*/ + SunXK_FA_Acute, SunXK_FA_Grave, NoSymbol, NoSymbol, /* 41*/ + XK_apostrophe, XK_asterisk, XK_grave, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_Aring, NoSymbol, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Circum,SunXK_FA_Tilde,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R8, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_Odiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 86*/ + XK_Adiaeresis, NoSymbol, NoSymbol, NoSymbol, /* 87*/ + XK_section, XK_onehalf, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_bar, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define SwedenFin4Modmap DenSwedFinSw4Modmap + +#else + +#define SwedenFin4Keymap NULL +#define SwedenFin4Modmap NULL + +#endif /* SWEDENFIN4 */ + + +#ifdef SWFR4 + +static KeySym SwissFr4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_greater, XK_braceright, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_plus, XK_exclam, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_asterisk, XK_numbersign, NoSymbol, /* 32*/ + XK_4, XK_ccedilla, XK_cent, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_section, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_bar, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_degree, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_backslash, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_asciicircum, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + SunXK_FA_Circum,SunXK_FA_Grave, NoSymbol, NoSymbol, /* 41*/ + XK_dollar, SunXK_FA_Tilde, XK_sterling, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_egrave, XK_udiaeresis, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Acute,NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_eacute, XK_odiaeresis, NoSymbol, NoSymbol, /* 86*/ + XK_agrave, XK_adiaeresis, NoSymbol, NoSymbol, /* 87*/ + XK_less, XK_braceleft, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_bracketright,XK_bracketleft, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define SwissFr4Modmap DenSwedFinSw4Modmap + +#else + +#define SwissFr4Keymap NULL +#define SwissFr4Modmap NULL + +#endif /* SWFR4 */ + + +#ifdef SWFR5 + +static KeySym SwissFr5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_plus, XK_bar, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_asterisk, XK_numbersign, NoSymbol, /* 32*/ + XK_4, XK_ccedilla, XK_asciicircum, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenright, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_grave, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, SunXK_FA_Acute, NoSymbol, /* 40*/ + SunXK_FA_Circum,SunXK_FA_Grave, SunXK_FA_Tilde, NoSymbol, /* 41*/ + XK_section, XK_degree, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_egrave, XK_udiaeresis, XK_bracketleft, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,XK_exclam, XK_bracketright,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_eacute, XK_odiaeresis, NoSymbol, NoSymbol, /* 86*/ + XK_agrave, XK_adiaeresis, XK_braceleft, NoSymbol, /* 87*/ + XK_dollar, XK_sterling, XK_braceright, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_backslash, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define SwissFr5Modmap Generic5Modmap + +#else + +#define SwissFr5Keymap NULL +#define SwissFr5Modmap NULL + +#endif /* SWFR5 */ + + +#ifdef SWGE4 + +static KeySym SwissGe4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + XK_greater, XK_braceright, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_plus, XK_exclam, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_asterisk, XK_numbersign, NoSymbol, /* 32*/ + XK_4, XK_ccedilla, XK_cent, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, XK_section, NoSymbol, /* 35*/ + XK_7, XK_slash, XK_bar, NoSymbol, /* 36*/ + XK_8, XK_parenleft, XK_degree, NoSymbol, /* 37*/ + XK_9, XK_parenright, XK_backslash, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_asciicircum, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, XK_grave, NoSymbol, /* 40*/ + SunXK_FA_Circum,SunXK_FA_Grave, NoSymbol, NoSymbol, /* 41*/ + XK_dollar, SunXK_FA_Tilde, XK_sterling, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_udiaeresis, XK_egrave, NoSymbol, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,SunXK_FA_Acute,NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_odiaeresis, XK_eacute, NoSymbol, NoSymbol, /* 86*/ + XK_adiaeresis, XK_agrave, NoSymbol, NoSymbol, /* 87*/ + XK_less, XK_braceleft, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, XK_mu, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_bracketright,XK_bracketleft, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define SwissGe4Modmap DenSwedFinSw4Modmap + +#else + +#define SwissGe4Keymap NULL +#define SwissGe4Modmap NULL + +#endif /* SWISSGE4 */ + + +#ifdef SWGE5 + +static KeySym SwissGe5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_plus, XK_bar, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, XK_at, NoSymbol, /* 31*/ + XK_3, XK_asterisk, XK_numbersign, NoSymbol, /* 32*/ + XK_4, XK_ccedilla, XK_asciicircum, NoSymbol, /* 33*/ + XK_5, XK_percent, XK_asciitilde, NoSymbol, /* 34*/ + XK_6, XK_ampersand, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_slash, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_parenleft, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenright, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_equal, XK_grave, NoSymbol, /* 39*/ + XK_apostrophe, XK_question, SunXK_FA_Acute, NoSymbol, /* 40*/ + SunXK_FA_Circum,SunXK_FA_Grave, SunXK_FA_Tilde, NoSymbol, /* 41*/ + XK_section, XK_degree, NoSymbol, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_udiaeresis, XK_egrave, XK_bracketleft, NoSymbol, /* 64*/ + SunXK_FA_Diaeresis,XK_exclam, XK_bracketright,NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_odiaeresis, XK_eacute, NoSymbol, NoSymbol, /* 86*/ + XK_adiaeresis, XK_agrave, XK_braceleft, NoSymbol, /* 87*/ + XK_dollar, XK_sterling, XK_braceright, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_semicolon, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_colon, NoSymbol, NoSymbol, /*108*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_less, XK_greater, XK_backslash, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define SwissGe5Modmap Generic5Modmap + +#else + +#define SwissGe5Keymap NULL +#define SwissGe5Modmap NULL + +#endif /* SWITZER_GE5 */ + + +#ifdef TAI4 + +static KeySym Taiwan4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, NoSymbol, NoSymbol, /* 87*/ + XK_backslash, XK_bar, XK_brokenbar, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Taiwan4Modmap Generic5Modmap + +#else + +#define Taiwan4Keymap NULL +#define Taiwan4Modmap NULL + +#endif /* TAIWAN4 */ + + +#ifdef TAI5 + +static KeySym Taiwan5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, NoSymbol, NoSymbol, /* 87*/ + XK_backslash, XK_bar, XK_brokenbar, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define Taiwan5Modmap Generic5Modmap + +#else + +#define Taiwan5Keymap NULL +#define Taiwan5Modmap NULL + +#endif /* TAIWAN5 */ + + +#ifdef UK4 + +static KeySym UK4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, XK_brokenbar, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_sterling, XK_numbersign, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, XK_notsign, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, XK_acute, NoSymbol, /* 87*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define UK4Modmap Generic5Modmap + +#else + +#define UK4Keymap NULL +#define UK4Modmap NULL + +#endif /* UK4 */ + + +#ifdef UK5 + +static KeySym UK5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_quotedbl, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_sterling, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_notsign, XK_brokenbar, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_at, XK_acute, NoSymbol, /* 87*/ + XK_numbersign, XK_asciitilde, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define UK5Modmap Generic5Modmap + +#else + +#define UK5Keymap NULL +#define UK5Modmap NULL + +#endif /* UK5 */ + + +#ifdef US101A + +static KeySym US101AKeymap[] = { + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 25*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 72*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, XK_acute, NoSymbol, /* 87*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +static SunModmapRec US101AModmap[] = { + { 99, ShiftMask }, + { 110, ShiftMask }, + { 119, LockMask }, + { 76, ControlMask }, + { 122, Meta_Mask }, + { 98, Num_Lock_Mask }, + { 120, Alt_Mask }, + { 0, 0 } +}; + +#else + +#define US101AKeymap NULL +#define US101AModmap NULL + +#endif /* US101A */ + + +#ifdef US4 + +static KeySym US4Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_R1, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_R2, NoSymbol, /* 22*/ + XK_Break, XK_Scroll_Lock, XK_R3, NoSymbol, /* 23*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + XK_KP_Equal, NoSymbol, XK_R4, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, XK_R5, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, XK_R6, NoSymbol, /* 47*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, XK_R7, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, XK_R8, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, XK_R9, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, XK_acute, NoSymbol, /* 87*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, XK_R10, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, XK_R11, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, XK_R12, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + XK_Linefeed, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, XK_R13, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, XK_R14, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, XK_R15, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, XK_Help, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define US4Modmap Generic5Modmap + +#else + +#define US4Keymap NULL +#define US4Modmap NULL + +#endif /* US4 */ + + +#ifdef US5 + +static KeySym US5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, XK_acute, NoSymbol, /* 87*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define US5Modmap Generic5Modmap + +#else + +#define US5Keymap NULL +#define US5Modmap NULL + +#endif /* US5 */ + +#ifdef US_UNIX5 + +static KeySym US_UNIX5Keymap[] = { + SunXK_Stop, NoSymbol, XK_L1, NoSymbol, /* 1*/ + SunXK_AudioLowerVolume,SunXK_VideoLowerBrightness,NoSymbol, NoSymbol, /* 2*/ + SunXK_Again, NoSymbol, XK_L2, NoSymbol, /* 3*/ + SunXK_AudioRaiseVolume,SunXK_VideoRaiseBrightness,NoSymbol, NoSymbol, /* 4*/ + XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 5*/ + XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 6*/ + XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 7*/ + XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 8*/ + XK_F11, NoSymbol, SunXK_F36, NoSymbol, /* 9*/ + XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 10*/ + XK_F12, NoSymbol, SunXK_F37, NoSymbol, /* 11*/ + XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 12*/ + SunXK_AltGraph, NoSymbol, NoSymbol, NoSymbol, /* 13*/ + XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 14*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 15*/ + XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 16*/ + XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 17*/ + XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 18*/ + XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 19*/ + XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 20*/ + XK_Pause, NoSymbol, XK_Break, NoSymbol, /* 21*/ + XK_Print, NoSymbol, XK_Sys_Req, SunXK_Sys_Req, /* 22*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, /* 23*/ + XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 24*/ + SunXK_Props, NoSymbol, XK_L3, NoSymbol, /* 25*/ + SunXK_Undo, NoSymbol, XK_L4, NoSymbol, /* 26*/ + XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 27*/ + XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 28*/ + XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 29*/ + XK_1, XK_exclam, NoSymbol, NoSymbol, /* 30*/ + XK_2, XK_at, NoSymbol, NoSymbol, /* 31*/ + XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 32*/ + XK_4, XK_dollar, NoSymbol, NoSymbol, /* 33*/ + XK_5, XK_percent, NoSymbol, NoSymbol, /* 34*/ + XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 35*/ + XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 36*/ + XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 37*/ + XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 38*/ + XK_0, XK_parenright, NoSymbol, NoSymbol, /* 39*/ + XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 40*/ + XK_equal, XK_plus, NoSymbol, NoSymbol, /* 41*/ + XK_grave, XK_asciitilde, XK_acute, NoSymbol, /* 42*/ + XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 43*/ + XK_Insert, NoSymbol, NoSymbol, NoSymbol, /* 44*/ + SunXK_AudioMute,SunXK_VideoDegauss,NoSymbol, NoSymbol, /* 45*/ + XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 46*/ + XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 47*/ + SunXK_PowerSwitch,SunXK_PowerSwitchShift, NoSymbol, NoSymbol, /* 48*/ + SunXK_Front, NoSymbol, XK_L5, NoSymbol, /* 49*/ + XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol, /* 50*/ + SunXK_Copy, NoSymbol, XK_L6, NoSymbol, /* 51*/ + XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 52*/ + XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 53*/ + XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 54*/ + XK_W, NoSymbol, NoSymbol, NoSymbol, /* 55*/ + XK_E, NoSymbol, NoSymbol, NoSymbol, /* 56*/ + XK_R, NoSymbol, NoSymbol, NoSymbol, /* 57*/ + XK_T, NoSymbol, NoSymbol, NoSymbol, /* 58*/ + XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 59*/ + XK_U, NoSymbol, NoSymbol, NoSymbol, /* 60*/ + XK_I, NoSymbol, NoSymbol, NoSymbol, /* 61*/ + XK_O, NoSymbol, NoSymbol, NoSymbol, /* 62*/ + XK_P, NoSymbol, NoSymbol, NoSymbol, /* 63*/ + XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 64*/ + XK_bracketright,XK_braceright, NoSymbol, NoSymbol, /* 65*/ + XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 66*/ + SunXK_Compose, NoSymbol, NoSymbol, NoSymbol, /* 67*/ + XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol, /* 68*/ + XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol, /* 69*/ + XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol, /* 70*/ + XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 71*/ + SunXK_Open, NoSymbol, XK_L7, NoSymbol, /* 72*/ + SunXK_Paste, NoSymbol, XK_L8, NoSymbol, /* 73*/ + XK_End, NoSymbol, NoSymbol, NoSymbol, /* 74*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 75*/ + XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 76*/ + XK_A, NoSymbol, NoSymbol, NoSymbol, /* 77*/ + XK_S, NoSymbol, NoSymbol, NoSymbol, /* 78*/ + XK_D, NoSymbol, NoSymbol, NoSymbol, /* 79*/ + XK_F, NoSymbol, NoSymbol, NoSymbol, /* 80*/ + XK_G, NoSymbol, NoSymbol, NoSymbol, /* 81*/ + XK_H, NoSymbol, NoSymbol, NoSymbol, /* 82*/ + XK_J, NoSymbol, NoSymbol, NoSymbol, /* 83*/ + XK_K, NoSymbol, NoSymbol, NoSymbol, /* 84*/ + XK_L, NoSymbol, NoSymbol, NoSymbol, /* 85*/ + XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 86*/ + XK_apostrophe, XK_quotedbl, XK_acute, NoSymbol, /* 87*/ + XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 88*/ + XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 89*/ + XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 90*/ + XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol, /* 91*/ + NoSymbol, XK_KP_5, NoSymbol, NoSymbol, /* 92*/ + XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol, /* 93*/ + XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol, /* 94*/ + SunXK_Find, NoSymbol, XK_L9, NoSymbol, /* 95*/ + XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 96*/ + SunXK_Cut, NoSymbol, XK_L10, NoSymbol, /* 97*/ + XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol, /* 98*/ + XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 99*/ + XK_Z, NoSymbol, NoSymbol, NoSymbol, /*100*/ + XK_X, NoSymbol, NoSymbol, NoSymbol, /*101*/ + XK_C, NoSymbol, NoSymbol, NoSymbol, /*102*/ + XK_V, NoSymbol, NoSymbol, NoSymbol, /*103*/ + XK_B, NoSymbol, NoSymbol, NoSymbol, /*104*/ + XK_N, NoSymbol, NoSymbol, NoSymbol, /*105*/ + XK_M, NoSymbol, NoSymbol, NoSymbol, /*106*/ + XK_comma, XK_less, NoSymbol, NoSymbol, /*107*/ + XK_period, XK_greater, NoSymbol, NoSymbol, /*108*/ + XK_slash, XK_question, NoSymbol, NoSymbol, /*109*/ + XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /*110*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*111*/ + XK_KP_End, XK_KP_1, NoSymbol, NoSymbol, /*112*/ + XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol, /*113*/ + XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol, /*114*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*115*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*116*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*117*/ + XK_Help, NoSymbol, NoSymbol, NoSymbol, /*118*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /*119*/ + XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /*120*/ + XK_space, NoSymbol, NoSymbol, NoSymbol, /*121*/ + XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /*122*/ + XK_Next, NoSymbol, NoSymbol, NoSymbol, /*123*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*124*/ + XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /*125*/ +}; + +#define US_UNIX5Modmap Generic5Modmap + +#else + +#define US_UNIX5Keymap NULL +#define US_UNIX5Modmap NULL + +#endif /* US_UNIX5 */ + +KeySym *sunType4KeyMaps[] = { + US4Keymap, /* 0 */ + US4Keymap, /* 1 */ + FranceBelg4Keymap, /* 2 */ + Canada4Keymap, /* 3 */ + Denmark4Keymap, /* 4 */ + Germany4Keymap, /* 5 */ + Italy4Keymap, /* 6 */ + Netherland4Keymap, /* 7 */ + Norway4Keymap, /* 8 */ + Portugal4Keymap, /* 9 */ + SpainLatAm4Keymap, /* 10 */ + SwedenFin4Keymap, /* 11 */ + SwissFr4Keymap, /* 12 */ + SwissGe4Keymap, /* 13 */ + UK4Keymap, /* 14 */ + NULL, /* 15 */ + Korea4Keymap, /* 16 */ + Taiwan4Keymap, /* 17 */ + NULL, /* 18 */ + US101AKeymap, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + NULL, /* 22 */ + NULL, /* 23 */ + NULL, /* 24 */ + NULL, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + NULL, /* 28 */ + NULL, /* 29 */ + NULL, /* 30 */ + NULL, /* 31 */ + Japan4Keymap, /* 32 */ + US5Keymap, /* 33 */ + US_UNIX5Keymap, /* 34 */ + France5Keymap, /* 35 */ + Denmark5Keymap, /* 36 */ + Germany5Keymap, /* 37 */ + Italy5Keymap, /* 38 */ + Netherland5Keymap, /* 39 */ + Norway5Keymap, /* 40 */ + Portugal5Keymap, /* 41 */ + Spain5Keymap, /* 42 */ + Sweden5Keymap, /* 43 */ + SwissFr5Keymap, /* 44 */ + SwissGe5Keymap, /* 45 */ + UK5Keymap, /* 46 */ + Korea5Keymap, /* 47 */ + Taiwan5Keymap, /* 48 */ + Japan5Keymap, /* 49 */ + CanadaFr5Keymap, /* 50 */ + NULL, /* Hungary5 */ /* 51 */ + NULL, /* Poland5 */ /* 52 */ + NULL, /* Czech5 */ /* 53 */ + NULL, /* Russia5 */ /* 54 */ + NULL, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + NULL, /* 58 */ + NULL, /* 59 */ + NULL, /* 60 */ + NULL, /* 61 */ + NULL, /* 62 */ + NULL, /* CanadaFr5+ */ /* 63 */ + NULL, /* 64 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ + NULL, /* 68 */ + NULL, /* 69 */ + NULL, /* 70 */ + NULL, /* 71 */ + NULL, /* 72 */ + NULL, /* 73 */ + NULL, /* 74 */ + NULL, /* 75 */ + NULL, /* 76 */ + NULL, /* 77 */ + NULL, /* 78 */ + NULL, /* 79 */ +/* + * We're punting on SPARC Voyager support for now. The OpenLook server + * apparently adds special semantics to Num_Lock, which requires indexing + * into column 5 of the keymap, which isn't handled by the core protocol + * at all, (it is in XKB.) We could do some tricky remapping, sort of + * like what the PC ddxen need to do to deal with funky PC keyboards; but + * for now we'll just pretend that Voyager (Hobo) keyboards are the same + * as the equivalent Sun5 keyboard. + */ + US5Keymap, /* 80 */ + US_UNIX5Keymap, /* 81 */ + France5Keymap, /* 82 */ + Denmark5Keymap, /* 83 */ + Germany5Keymap, /* 84 */ + Italy5Keymap, /* 85 */ + Netherland5Keymap, /* 86 */ + Norway5Keymap, /* 87 */ + Portugal5Keymap, /* 88 */ + Spain5Keymap, /* 89 */ + Sweden5Keymap, /* 90 */ + SwissFr5Keymap, /* 91 */ + SwissGe5Keymap, /* 92 */ + UK5Keymap, /* 93 */ + Korea5Keymap, /* 94 */ + Taiwan5Keymap, /* 95 */ + Japan5Keymap, /* 96 */ + CanadaFr5Keymap, /* 97 */ +}; + +int sunMaxLayout = sizeof(sunType4KeyMaps) / sizeof(sunType4KeyMaps[0]); + +SunModmapRec *sunType4ModMaps[] = { + US4Modmap, /* 0 */ + US4Modmap, /* 1 */ + FranceBelg4Modmap, /* 2 */ + Canada4Modmap, /* 3 */ + Denmark4Modmap, /* 4 */ + Germany4Modmap, /* 5 */ + Italy4Modmap, /* 6 */ + Netherland4Modmap, /* 7 */ + Norway4Modmap, /* 8 */ + Portugal4Modmap, /* 9 */ + SpainLatAm4Modmap, /* 10 */ + SwedenFin4Modmap, /* 11 */ + SwissFr4Modmap, /* 12 */ + SwissGe4Modmap, /* 13 */ + UK4Modmap, /* 14 */ + NULL, /* 15 */ + Korea4Modmap, /* 16 */ + Taiwan4Modmap, /* 17 */ + NULL, /* 18 */ + US101AModmap, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + NULL, /* 22 */ + NULL, /* 23 */ + NULL, /* 24 */ + NULL, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + NULL, /* 28 */ + NULL, /* 29 */ + NULL, /* 30 */ + NULL, /* 31 */ + Japan4Modmap, /* 32 */ + US5Modmap, /* 33 */ + US_UNIX5Modmap, /* 34 */ + France5Modmap, /* 35 */ + Denmark5Modmap, /* 36 */ + Germany5Modmap, /* 37 */ + Italy5Modmap, /* 38 */ + Netherland5Modmap, /* 39 */ + Norway5Modmap, /* 40 */ + Portugal5Modmap, /* 41 */ + Spain5Modmap, /* 42 */ + Sweden5Modmap, /* 43 */ + SwissFr5Modmap, /* 44 */ + SwissGe5Modmap, /* 45 */ + UK5Modmap, /* 46 */ + Korea5Modmap, /* 47 */ + Taiwan5Modmap, /* 48 */ + Japan5Modmap, /* 49 */ + CanadaFr5Modmap, /* 50 */ + NULL, /* Hungary5 */ /* 51 */ + NULL, /* Poland5 */ /* 52 */ + NULL, /* Czech5 */ /* 53 */ + NULL, /* Russia5 */ /* 54 */ + NULL, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + NULL, /* 58 */ + NULL, /* 59 */ + NULL, /* 60 */ + NULL, /* 61 */ + NULL, /* 62 */ + NULL, /* CanadaFr5+ */ /* 63 */ + NULL, /* 64 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ + NULL, /* 68 */ + NULL, /* 69 */ + NULL, /* 70 */ + NULL, /* 71 */ + NULL, /* 72 */ + NULL, /* 73 */ + NULL, /* 74 */ + NULL, /* 75 */ + NULL, /* 76 */ + NULL, /* 77 */ + NULL, /* 78 */ + NULL, /* 79 */ + US5Modmap, /* 80 */ + US_UNIX5Modmap, /* 81 */ + France5Modmap, /* 82 */ + Denmark5Modmap, /* 83 */ + Germany5Modmap, /* 84 */ + Italy5Modmap, /* 85 */ + Netherland5Modmap, /* 86 */ + Norway5Modmap, /* 87 */ + Portugal5Modmap, /* 88 */ + Spain5Modmap, /* 89 */ + Sweden5Modmap, /* 90 */ + SwissFr5Modmap, /* 91 */ + SwissGe5Modmap, /* 92 */ + UK5Modmap, /* 93 */ + Korea5Modmap, /* 94 */ + Taiwan5Modmap, /* 95 */ + Japan5Modmap, /* 96 */ + CanadaFr5Modmap, /* 97 */ +}; diff --git a/nx-X11/programs/Xserver/hw/sun/sunMfb.c b/nx-X11/programs/Xserver/hw/sun/sunMfb.c new file mode 100644 index 000000000..fa8eb70db --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunMfb.c @@ -0,0 +1,108 @@ + +/* $Xorg: sunMfb.c,v 1.4 2001/02/09 02:04:44 xorgcvs Exp $ */ + +/* +Copyright 1990, 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunMfb.c,v 3.3 2001/01/17 22:36:51 dawes Exp $ */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +/* + * Copyright 1987 by the Regents of the University of California + * Copyright 1987 by Adam de Boor, UC Berkeley + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +/****************************************************************/ +/* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ +/****************************************************************/ + +/* + * Copyright 1991, 1992, 1993 Kaleb S. Keithley + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. Kaleb S. Keithley makes no + * representations about the suitability of this software for + * any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include "sun.h" +#include "mfb.h" + +Bool sunBW2Init (screen, pScreen, argc, argv) + int screen; /* what screen am I going to be */ + ScreenPtr pScreen; /* The Screen to initialize */ + int argc; /* The number of the Server's arguments. */ + char **argv; /* The arguments themselves. Don't change! */ +{ + sunFbs[screen].EnterLeave = (void (*)())NoopDDA; + if (sunFlipPixels) { + pScreen->whitePixel = 1; + pScreen->blackPixel = 0; + } else { + pScreen->whitePixel = 0; + pScreen->blackPixel = 1; + } + return sunInitCommon (screen, pScreen, (off_t) 0, + mfbScreenInit, NULL, + mfbCreateDefColormap, sunSaveScreen, 0); +} + diff --git a/nx-X11/programs/Xserver/hw/sun/sunMouse.c b/nx-X11/programs/Xserver/hw/sun/sunMouse.c new file mode 100644 index 000000000..aad46e3d7 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunMouse.c @@ -0,0 +1,399 @@ +/* $Xorg: sunMouse.c,v 1.3 2000/08/17 19:48:32 cpqbld Exp $ */ +/*- + * Copyright 1987 by the Regents of the University of California + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. The University of California + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + */ + +/************************************************************ +Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright no- +tice appear in all copies and that both that copyright no- +tice and this permission notice appear in supporting docu- +mentation, and that the names of Sun or The Open Group +not be used in advertising or publicity pertaining to +distribution of the software without specific prior +written permission. Sun and The Open Group make no +representations about the suitability of this software for +any purpose. It is provided "as is" without any express or +implied warranty. + +SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ +/* + * Copyright 1991, 1992, 1993 Kaleb S. Keithley + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. Kaleb S. Keithley makes no + * representations about the suitability of this software for + * any purpose. It is provided "as is" without express or + * implied warranty. + */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunMouse.c,v 1.3 2001/10/28 03:33:12 tsi Exp $ */ + +#define NEED_EVENTS +#include "sun.h" +#include "mi.h" + +Bool sunActiveZaphod = TRUE; + +static Bool sunCursorOffScreen(); +static void sunCrossScreen(); +static void sunWarpCursor(); + +miPointerScreenFuncRec sunPointerScreenFuncs = { + sunCursorOffScreen, + sunCrossScreen, + sunWarpCursor, +}; + +/*- + *----------------------------------------------------------------------- + * sunMouseCtrl -- + * Alter the control parameters for the mouse. Since acceleration + * etc. is done from the PtrCtrl record in the mouse's device record, + * there's nothing to do here. + * + * Results: + * None. + * + * Side Effects: + * None. + * + *----------------------------------------------------------------------- + */ +/*ARGSUSED*/ +static +void sunMouseCtrl ( + DeviceIntPtr device, + PtrCtrl* ctrl) +{ +} + +/*- + *----------------------------------------------------------------------- + * sunMouseProc -- + * Handle the initialization, etc. of a mouse + * + * Results: + * none. + * + * Side Effects: + * + * Note: + * When using sunwindows, all input comes off a single fd, stored in the + * global windowFd. Therefore, only one device should be enabled and + * disabled, even though the application still sees both mouse and + * keyboard. We have arbitrarily chosen to enable and disable windowFd + * in the keyboard routine sunKbdProc rather than in sunMouseProc. + * + *----------------------------------------------------------------------- + */ +int sunMouseProc ( + DeviceIntPtr device, + int what) +{ + DevicePtr pMouse = (DevicePtr) device; + int format; + static int oformat; + BYTE map[4]; + + switch (what) { + case DEVICE_INIT: + if (pMouse != LookupPointerDevice()) { + ErrorF ("Cannot open non-system mouse"); + return !Success; + } + if (sunPtrPriv.fd == -1) + return !Success; + pMouse->devicePrivate = (pointer) &sunPtrPriv; + pMouse->on = FALSE; + map[1] = 1; + map[2] = 2; + map[3] = 3; + InitPointerDeviceStruct( + pMouse, map, 3, miPointerGetMotionEvents, + sunMouseCtrl, miPointerGetMotionBufferSize()); + break; + + case DEVICE_ON: + if (ioctl (sunPtrPriv.fd, VUIDGFORMAT, &oformat) == -1) { + Error ("sunMouseProc ioctl VUIDGFORMAT"); + return !Success; + } + format = VUID_FIRM_EVENT; + if (ioctl (sunPtrPriv.fd, VUIDSFORMAT, &format) == -1) { + Error ("sunMouseProc ioctl VUIDSFORMAT"); + return !Success; + } + sunPtrPriv.bmask = 0; + AddEnabledDevice (sunPtrPriv.fd); + pMouse->on = TRUE; + break; + + case DEVICE_CLOSE: + pMouse->on = FALSE; + if (ioctl (sunPtrPriv.fd, VUIDSFORMAT, &oformat) == -1) + Error ("sunMouseProc ioctl VUIDSFORMAT"); + break; + + case DEVICE_OFF: + pMouse->on = FALSE; + RemoveEnabledDevice (sunPtrPriv.fd); + break; + } + return Success; +} + +/*- + *----------------------------------------------------------------------- + * sunMouseGetEvents -- + * Return the events waiting in the wings for the given mouse. + * + * Results: + * A pointer to an array of Firm_events or (Firm_event *)0 if no events + * The number of events contained in the array. + * A boolean as to whether more events might be available. + * + * Side Effects: + * None. + *----------------------------------------------------------------------- + */ + +Firm_event* sunMouseGetEvents ( + int fd, + Bool on, + int* pNumEvents, + Bool* pAgain) +{ + int nBytes; /* number of bytes of events available. */ + static Firm_event evBuf[MAXEVENTS]; /* Buffer for Firm_events */ + + if ((nBytes = read (fd, (char *)evBuf, sizeof(evBuf))) == -1) { + if (errno == EWOULDBLOCK) { + *pNumEvents = 0; + *pAgain = FALSE; + } else { + Error ("sunMouseGetEvents read"); + FatalError ("Could not read from mouse"); + } + } else { + if (on) { + *pNumEvents = nBytes / sizeof (Firm_event); + *pAgain = (nBytes == sizeof (evBuf)); + } else { + *pNumEvents = 0; + *pAgain = FALSE; + } + } + return evBuf; +} + + +/*- + *----------------------------------------------------------------------- + * MouseAccelerate -- + * Given a delta and a mouse, return the acceleration of the delta. + * + * Results: + * The corrected delta + * + * Side Effects: + * None. + * + *----------------------------------------------------------------------- + */ +static short +MouseAccelerate (device, delta) + DeviceIntPtr device; + int delta; +{ + int sgn = sign(delta); + PtrCtrl *pCtrl; + short ret; + + delta = abs(delta); + pCtrl = &device->ptrfeed->ctrl; + if (delta > pCtrl->threshold) { + ret = + (short) sgn * + (pCtrl->threshold + ((delta - pCtrl->threshold) * pCtrl->num) / + pCtrl->den); + } else { + ret = (short) sgn * delta; + } + return ret; +} + +/*- + *----------------------------------------------------------------------- + * sunMouseEnqueueEvent -- + * Given a Firm_event for a mouse, pass it off the the dix layer + * properly converted... + * + * Results: + * None. + * + * Side Effects: + * The cursor may be redrawn...? devPrivate/x/y will be altered. + * + *----------------------------------------------------------------------- + */ + +void sunMouseEnqueueEvent ( + DeviceIntPtr device, + Firm_event *fe) +{ + xEvent xE; + sunPtrPrivPtr pPriv; /* Private data for pointer */ + int bmask; /* Temporary button mask */ + unsigned long time; + int x, y; + + pPriv = (sunPtrPrivPtr)device->public.devicePrivate; + + time = xE.u.keyButtonPointer.time = TVTOMILLI(fe->time); + + switch (fe->id) { + case MS_LEFT: + case MS_MIDDLE: + case MS_RIGHT: + /* + * A button changed state. Sometimes we will get two events + * for a single state change. Should we get a button event which + * reflects the current state of affairs, that event is discarded. + * + * Mouse buttons start at 1. + */ + xE.u.u.detail = (fe->id - MS_LEFT) + 1; + bmask = 1 << xE.u.u.detail; + if (fe->value == VKEY_UP) { + if (pPriv->bmask & bmask) { + xE.u.u.type = ButtonRelease; + pPriv->bmask &= ~bmask; + } else { + return; + } + } else { + if ((pPriv->bmask & bmask) == 0) { + xE.u.u.type = ButtonPress; + pPriv->bmask |= bmask; + } else { + return; + } + } + mieqEnqueue (&xE); + break; + case LOC_X_DELTA: + miPointerDeltaCursor (MouseAccelerate(device,fe->value),0,time); + break; + case LOC_Y_DELTA: + /* + * For some reason, motion up generates a positive y delta + * and motion down a negative delta, so we must subtract + * here instead of add... + */ + miPointerDeltaCursor (0,-MouseAccelerate(device,fe->value),time); + break; + case LOC_X_ABSOLUTE: + miPointerPosition (&x, &y); + miPointerAbsoluteCursor (fe->value, y, time); + break; + case LOC_Y_ABSOLUTE: + miPointerPosition (&x, &y); + miPointerAbsoluteCursor (x, fe->value, time); + break; + default: + FatalError ("sunMouseEnqueueEvent: unrecognized id\n"); + break; + } +} + +/*ARGSUSED*/ +static Bool +sunCursorOffScreen (pScreen, x, y) + ScreenPtr *pScreen; + int *x, *y; +{ + int index, ret = FALSE; + extern Bool PointerConfinedToScreen(); + + if (PointerConfinedToScreen()) return TRUE; + /* + * Active Zaphod implementation: + * increment or decrement the current screen + * if the x is to the right or the left of + * the current screen. + */ + if (sunActiveZaphod && + screenInfo.numScreens > 1 && (*x >= (*pScreen)->width || *x < 0)) { + index = (*pScreen)->myNum; + if (*x < 0) { + index = (index ? index : screenInfo.numScreens) - 1; + *pScreen = screenInfo.screens[index]; + *x += (*pScreen)->width; + } else { + *x -= (*pScreen)->width; + index = (index + 1) % screenInfo.numScreens; + *pScreen = screenInfo.screens[index]; + } + ret = TRUE; + } + return ret; +} + +static void +sunCrossScreen (pScreen, entering) + ScreenPtr pScreen; + Bool entering; +{ + if (sunFbs[pScreen->myNum].EnterLeave) + (*sunFbs[pScreen->myNum].EnterLeave) (pScreen, entering ? 0 : 1); +} + +static void +sunWarpCursor (pScreen, x, y) + ScreenPtr pScreen; + int x, y; +{ +#ifndef i386 + sigset_t newsigmask; + + (void) sigemptyset (&newsigmask); +#ifdef SVR4 + (void) sigaddset (&newsigmask, SIGPOLL); +#else + (void) sigaddset (&newsigmask, SIGIO); +#endif + (void) sigprocmask (SIG_BLOCK, &newsigmask, (sigset_t *)NULL); + miPointerWarpCursor (pScreen, x, y); + (void) sigprocmask (SIG_UNBLOCK, &newsigmask, (sigset_t *)NULL); +#else + int oldmask; + + oldmask = sigblock (sigmask (SIGIO)); + miPointerWarpCursor (pScreen, x, y); + sigsetmask (oldmask); +#endif +} diff --git a/nx-X11/programs/Xserver/hw/sun/sunMultiDepth.c b/nx-X11/programs/Xserver/hw/sun/sunMultiDepth.c new file mode 100644 index 000000000..a8adf353f --- /dev/null +++ b/nx-X11/programs/Xserver/hw/sun/sunMultiDepth.c @@ -0,0 +1,277 @@ +/* $Xorg: sunMultiDepth.c,v 1.4 2001/02/09 02:04:44 xorgcvs Exp $ */ +/* + +Copyright 1992, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +/* $XFree86: xc/programs/Xserver/hw/sun/sunMultiDepth.c,v 1.5 2001/01/17 22:36:51 dawes Exp $ */ + +#include <X11/X.h> +#include <X11/Xmd.h> +#include "servermd.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "resource.h" +#include "colormap.h" +#include "colormapst.h" +#include "mi.h" +#include "mistruct.h" +#include "dix.h" +#include "gcstruct.h" +#include "mibstore.h" + +#ifndef SINGLEDEPTH + +static Bool +sunCfbCreateGC(pGC) + GCPtr pGC; +{ + if (pGC->depth == 1) + { + return mfbCreateGC (pGC); + } + else if (pGC->depth <= 8) + { + return cfbCreateGC (pGC); + } + else if (pGC->depth <= 16) + { + return cfb16CreateGC (pGC); + } + else if (pGC->depth <= 32) + { + return cfb32CreateGC (pGC); + } + return FALSE; +} + +static void +sunCfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart) + DrawablePtr pDrawable; /* drawable from which to get bits */ + int wMax; /* largest value of all *pwidths */ + register DDXPointPtr ppt; /* points to start copying from */ + int *pwidth; /* list of number of bits to copy */ + int nspans; /* number of scanlines to copy */ + char *pdstStart; /* where to put the bits */ +{ + switch (pDrawable->bitsPerPixel) { + case 1: + mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + case 8: + cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + case 16: + cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + case 32: + cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + break; + } + return; +} + +static void +sunCfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine) + DrawablePtr pDrawable; + int sx, sy, w, h; + unsigned int format; + unsigned long planeMask; + char *pdstLine; +{ + switch (pDrawable->bitsPerPixel) + { + case 1: + mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + case 8: + cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + case 16: + cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + case 32: + cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + break; + } +} + +Bool +sunCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; /* bits per pixel of root */ +{ + extern int cfbWindowPrivateIndex; + extern int cfbGCPrivateIndex; + int ret; + + sunRegisterPixmapFormat( /* depth */ 1, /* bits per pixel */ 1); + sunRegisterPixmapFormat( /* depth */ 8, /* bits per pixel */ 8); + sunRegisterPixmapFormat( /* depth */ 12, /* bits per pixel */ 16); + sunRegisterPixmapFormat( /* depth */ 24, /* bits per pixel */ 32); + + switch (bpp) { + case 8: + ret = cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); + break; + case 16: + ret = cfb16SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); + break; + case 32: + ret = cfb32SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); + break; + default: + return FALSE; + } + pScreen->CreateGC = sunCfbCreateGC; + pScreen->GetImage = sunCfbGetImage; + pScreen->GetSpans = sunCfbGetSpans; + return ret; +} + +extern BSFuncRec cfbBSFuncRec, cfb16BSFuncRec, cfb32BSFuncRec; +extern int cfb16ScreenPrivateIndex, cfb32ScreenPrivateIndex; +extern Bool cfbCloseScreen(), cfb16CloseScreen(), cfb32CloseScreen(); + +Bool +sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; +{ + int i; + pointer oldDevPrivate; + VisualPtr visuals; + int nvisuals; + DepthPtr depths; + int ndepths; + VisualID defaultVisual; + int rootdepth; + + if (!cfbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, + &rootdepth, &defaultVisual, 1 << (bpp - 1), 8)) + return FALSE; + oldDevPrivate = pScreen->devPrivate; + if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, + rootdepth, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + switch (bpp) + { + case 8: + pScreen->CloseScreen = cfbCloseScreen; + pScreen->BackingStoreFuncs = cfbBSFuncRec; + break; + case 16: + pScreen->CloseScreen = cfb16CloseScreen; + pScreen->devPrivates[cfb16ScreenPrivateIndex].ptr = + pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; + pScreen->BackingStoreFuncs = cfb16BSFuncRec; + break; + case 32: + pScreen->CloseScreen = cfb32CloseScreen; + pScreen->devPrivates[cfb32ScreenPrivateIndex].ptr = + pScreen->devPrivate; + pScreen->devPrivate = oldDevPrivate; + pScreen->BackingStoreFuncs = cfb32BSFuncRec; + break; + } + return TRUE; +} + + +Bool +sunCfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; +{ + if (!sunCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp)) + return FALSE; + return sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, + dpiy, width, bpp); +} + + +#else /* SINGLEDEPTH */ + +/* stuff for 8-bit only server */ + +Bool +sunCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; /* bits per pixel of root */ +{ + sunRegisterPixmapFormat( /* depth */ 1, /* bits per pixel */ 1); + sunRegisterPixmapFormat( /* depth */ 8, /* bits per pixel */ 8); + return cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, + width); +} + +Bool +sunCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; +{ + return cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width); +} + +Bool +sunCfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp) + register ScreenPtr pScreen; + pointer pbits; /* pointer to screen bitmap */ + int xsize, ysize; /* in pixels */ + int dpix, dpiy; /* dots per inch */ + int width; /* pixel width of frame buffer */ + int bpp; +{ + sunRegisterPixmapFormat( /* depth */ 1, /* bits per pixel */ 1); + sunRegisterPixmapFormat( /* depth */ 8, /* bits per pixel */ 8); + return cfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width); +} + +#endif /* SINGLEDEPTH */ |