The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/sun/wskbdmap_sun.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: wskbdmap_sun.c,v 1.3 2003/07/14 15:47:28 lukem Exp $   */
    2 /*      $OpenBSD: sunkbd.c,v 1.9 2002/09/08 23:22:00 miod Exp $ */
    3 
    4 /*
    5  * Copyright (c) 2002 Jason L. Wright (jason@thought.net)
    6  * All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or without
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above copyright
   14  *    notice, this list of conditions and the following disclaimer in the
   15  *    documentation and/or other materials provided with the distribution.
   16  * 3. All advertising materials mentioning features or use of this software
   17  *    must display the following acknowledgement:
   18  *      This product includes software developed by Jason L. Wright
   19  * 4. The name of the author may not be used to endorse or promote products
   20  *    derived from this software without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   24  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   25  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
   26  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   27  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   30  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   32  * POSSIBILITY OF SUCH DAMAGE.
   33  *
   34  * Effort sponsored in part by the Defense Advanced Research Projects
   35  * Agency (DARPA) and Air Force Research Laboratory, Air Force
   36  * Materiel Command, USAF, under agreement number F30602-01-2-0537.
   37  *
   38  */
   39 
   40 #include <sys/cdefs.h>
   41 __KERNEL_RCSID(0, "$NetBSD: wskbdmap_sun.c,v 1.3 2003/07/14 15:47:28 lukem Exp $");
   42 
   43 #include <sys/types.h>
   44 #include <dev/wscons/wsksymdef.h>
   45 #include <dev/wscons/wsksymvar.h>
   46 
   47 #define KC(n) KS_KEYCODE(n)
   48 
   49 static const keysym_t wssun_keydesctab_us [] = {
   50 /*  pos      command                    normal          shifted */
   51     KC(0x01), KS_Cmd,
   52     KC(0x02), KS_Cmd_BrightnessDown,
   53     KC(0x03),                           KS_Again,
   54     KC(0x04), KS_Cmd_BrightnessUp,
   55     KC(0x05),                           KS_f1,
   56     KC(0x06),                           KS_f2,
   57     KC(0x07),                           KS_f10,
   58     KC(0x08),                           KS_f3,
   59     KC(0x09),                           KS_f11,
   60     KC(0x0a),                           KS_f4,
   61     KC(0x0b),                           KS_f12,
   62     KC(0x0c),                           KS_f5,
   63     KC(0x0d),                           KS_Alt_R,
   64     KC(0x0e),                           KS_f6,
   65     KC(0x10),                           KS_f7,
   66     KC(0x11),                           KS_f8,
   67     KC(0x12),                           KS_f9,
   68     KC(0x13),                           KS_Alt_L,
   69     KC(0x14),                           KS_Up,
   70     KC(0x15),                           KS_Pause,
   71     KC(0x16),                           KS_Print_Screen,
   72     KC(0x17),                           KS_Hold_Screen,
   73     KC(0x18),                           KS_Left,
   74     KC(0x19),                           KS_Props,
   75     KC(0x1a),                           KS_Undo,
   76     KC(0x1b),                           KS_Down,
   77     KC(0x1c),                           KS_Right,
   78     KC(0x1d),                           KS_Escape,
   79     KC(0x1e),                           KS_1,           KS_exclam,
   80     KC(0x1f),                           KS_2,           KS_at,
   81     KC(0x20),                           KS_3,           KS_numbersign,
   82     KC(0x21),                           KS_4,           KS_dollar,
   83     KC(0x22),                           KS_5,           KS_percent,
   84     KC(0x23),                           KS_6,           KS_asciicircum,
   85     KC(0x24),                           KS_7,           KS_ampersand,
   86     KC(0x25),                           KS_8,           KS_asterisk,
   87     KC(0x26),                           KS_9,           KS_parenleft,
   88     KC(0x27),                           KS_0,           KS_parenright,
   89     KC(0x28),                           KS_minus,       KS_underscore,
   90     KC(0x29),                           KS_equal,       KS_plus,
   91     KC(0x2a),                           KS_grave,       KS_asciitilde,
   92     KC(0x2b),                           KS_Delete,
   93     KC(0x2c),                           KS_Insert,
   94     KC(0x2d),                           KS_KP_Equal,
   95     KC(0x2e),                           KS_KP_Divide,
   96     KC(0x2f),                           KS_KP_Multiply,
   97     KC(0x31),                           KS_Front,
   98     KC(0x32),                           KS_KP_Delete,   KS_KP_Decimal,
   99     KC(0x33),                           KS_Copy,
  100     KC(0x34),                           KS_Home,
  101     KC(0x35),                           KS_Tab,
  102     KC(0x36),                           KS_q,
  103     KC(0x37),                           KS_w,
  104     KC(0x38),                           KS_e,
  105     KC(0x39),                           KS_r,
  106     KC(0x3a),                           KS_t,
  107     KC(0x3b),                           KS_y,
  108     KC(0x3c),                           KS_u,
  109     KC(0x3d),                           KS_i,
  110     KC(0x3e),                           KS_o,
  111     KC(0x3f),                           KS_p,
  112     KC(0x40),                           KS_bracketleft, KS_braceleft,
  113     KC(0x41),                           KS_bracketright,KS_braceright,
  114     KC(0x42),                           KS_Delete,
  115     KC(0x43),                           KS_Multi_key,
  116     KC(0x44),                           KS_KP_Home,     KS_KP_7,
  117     KC(0x45),                           KS_KP_Up,       KS_KP_8,
  118     KC(0x46),                           KS_KP_Prior,    KS_KP_9,
  119     KC(0x47),                           KS_KP_Subtract,
  120     KC(0x48),                           KS_Open,
  121     KC(0x49),                           KS_Paste,
  122     KC(0x4a),                           KS_End,
  123     KC(0x4c),                           KS_Control_L,
  124     KC(0x4d), KS_Cmd_Debugger,          KS_a,
  125     KC(0x4e),                           KS_s,
  126     KC(0x4f),                           KS_d,
  127     KC(0x50),                           KS_f,
  128     KC(0x51),                           KS_g,
  129     KC(0x52),                           KS_h,
  130     KC(0x53),                           KS_j,
  131     KC(0x54),                           KS_k,
  132     KC(0x55),                           KS_l,
  133     KC(0x56),                           KS_semicolon,   KS_colon,
  134     KC(0x57),                           KS_apostrophe,  KS_quotedbl,
  135     KC(0x58),                           KS_backslash,   KS_bar,
  136     KC(0x59),                           KS_Return,
  137     KC(0x5a),                           KS_KP_Enter,
  138     KC(0x5b),                           KS_KP_Left,     KS_KP_4,
  139     KC(0x5c),                           KS_KP_Begin,    KS_KP_5,
  140     KC(0x5d),                           KS_KP_Right,    KS_KP_6,
  141     KC(0x5e),                           KS_KP_Insert,   KS_KP_0,
  142     KC(0x5f),                           KS_Find,
  143     KC(0x60),                           KS_Prior,
  144     KC(0x61),                           KS_Cut,
  145     KC(0x62),                           KS_Num_Lock,
  146     KC(0x63),                           KS_Shift_L,
  147     KC(0x64),                           KS_z,
  148     KC(0x65),                           KS_x,
  149     KC(0x66),                           KS_c,
  150     KC(0x67),                           KS_v,
  151     KC(0x68),                           KS_b,
  152     KC(0x69),                           KS_n,
  153     KC(0x6a),                           KS_m,
  154     KC(0x6b),                           KS_comma,       KS_less,
  155     KC(0x6c),                           KS_period,      KS_greater,
  156     KC(0x6d),                           KS_slash,       KS_question,
  157     KC(0x6e),                           KS_Shift_R,
  158     KC(0x6f),                           KS_Linefeed,
  159     KC(0x70),                           KS_KP_End,      KS_KP_1,
  160     KC(0x71),                           KS_KP_Down,     KS_KP_2,
  161     KC(0x72),                           KS_KP_Next,     KS_KP_3,
  162     KC(0x76),                           KS_Help,
  163     KC(0x77),                           KS_Caps_Lock,
  164     KC(0x78),                           KS_Meta_L,
  165     KC(0x79),                           KS_space,
  166     KC(0x7a),                           KS_Meta_R,
  167     KC(0x7b),                           KS_Next,
  168     KC(0x7d),                           KS_KP_Add,
  169 };
  170 
  171 const keysym_t wssun_keydesctab_sv[] = {
  172     KC(0x0d),           KS_Multi_key,
  173     KC(0x0f),           KS_asciitilde,  KS_asciicircum, 
  174     KC(0x1f),           KS_2,           KS_quotedbl,    KS_at,
  175     KC(0x20),           KS_3,           KS_numbersign,  KS_sterling,
  176     KC(0x21),           KS_4,           KS_currency,    KS_dollar,
  177     KC(0x23),           KS_6,           KS_ampersand,
  178     KC(0x24),           KS_7,           KS_slash,       KS_braceleft,
  179     KC(0x25),           KS_8,           KS_parenleft,   KS_bracketleft,
  180     KC(0x26),           KS_9,           KS_parenright,  KS_bracketright,
  181     KC(0x27),           KS_0,           KS_equal,       KS_braceright,
  182     KC(0x28),           KS_plus,        KS_question,    KS_backslash,
  183     KC(0x29),           KS_dead_acute,  KS_dead_grave,
  184     KC(0x2a),           KS_apostrophe,  KS_asterisk,    KS_grave,
  185     KC(0x40),           KS_aring,
  186     KC(0x41),           KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  187     KC(0x43),           KS_Mode_switch,
  188     KC(0x4c),           KS_Caps_Lock,
  189     KC(0x56),           KS_odiaeresis,
  190     KC(0x57),           KS_adiaeresis,
  191     KC(0x58),           KS_paragraph,   KS_onehalf,
  192     KC(0x6b),           KS_comma,       KS_semicolon,
  193     KC(0x6c),           KS_period,      KS_colon,
  194     KC(0x6d),           KS_minus,       KS_underscore,
  195     KC(0x77),           KS_Control_L,
  196     KC(0x7c),           KS_less,        KS_greater,     KS_bar,
  197 };
  198 
  199 const keysym_t wssun_keydesctab_sv_nodead[] = {
  200     KC(0x29),           KS_apostrophe,  KS_grave,
  201     KC(0x41),           KS_diaeresis,   KS_asciicircum, KS_asciitilde,
  202 };
  203 
  204 #define KBD_MAP(name, base, map) \
  205                         { name, base, sizeof(map)/sizeof(keysym_t), map }
  206 /* KBD_NULLMAP generates a entry for machine native variant.
  207    the entry will be modified by machine dependent keyboard driver. */
  208 #define KBD_NULLMAP(name, base) { name, base, 0, 0 }
  209 
  210 const struct wscons_keydesc wssun_keydesctab[] = {
  211         KBD_MAP(KB_US,                  0,      wssun_keydesctab_us),
  212         KBD_MAP(KB_SV,                  KB_US,  wssun_keydesctab_sv),
  213         KBD_MAP(KB_SV | KB_NODEAD,      KB_SV,  wssun_keydesctab_sv_nodead),
  214         { 0, 0, 0, 0 }
  215 };

Cache object: f955c9cc77a8582da1edd66507541daa


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.