* Copyright (c) 1988 Regents of the University of California.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* @(#)qfont.c 1.4 (Berkeley) 6/28/90
* @(#)qfont.c 1.1 (ULTRIX) 8/21/85
* The following tables are used to translate LK201 key strokes
* into ascii characters. The tables also support the special
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 /* 0 */
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 /* 8 */
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 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,'I' ,'K' /* 224 */
,',' ,0x00 ,'(' ,'O' ,'L' ,'.' ,0x00 ,')' /* 232 */
,'P' ,0x00 ,':' ,'?' ,0x00 ,'+' ,'}' ,'|' /* 240 */
,0x00 ,'_' ,'{' ,'"' ,0x00 ,0x00 ,0x00 ,0x00 /* 248 */
* LK201 special purpose keys. Translations from the tables above
* includes codes for the function keys and other goodies. They can
* be determined by the presence of the 8th bit being set. The
* following table is accessed by removing that bit and using the
* result as the index to the following table. Note that table begins
"\33OM", /* key pad enter */
"\33O/*", /* key pad , */
* The following strings are to allow a numeric keypad
* mode and still use the same translation tables
* QVSS font table of displayable characters.
0x00, /* 0x00000000 /* */
0x00, /* 0x00000000 /* */
0x00, /* 0x00000000 /* */
0x00, /* 0x00000000 /* */
0x00, /* 0x00000000 /* */
0x08, /* 0x00001000 /* */
0x1c, /* 0x00011100 /* */
0x08, /* 0x00001000 /* */
0x00, /* 0x00000000 /* */
0x00, /* 0x00000000 /* */
0x1c, /* 0x00011100 /* */
0x0c, /* 0x00001100 /* */
0x02, /* 0x00000010 /* */
0x00, /* 0x00000000 /* */
0x00, /* 0x00000000 /* */
unsigned short q_cursor
[] = {