Home | History | Annotate | Line # | Download | only in sun_vndr
solaris revision 1.1.1.2
      1      1.1   mrg //-------------------------------------------------------------------------
      2      1.1   mrg //
      3  1.1.1.2  ghen // Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
      4      1.1   mrg //
      5      1.1   mrg // Permission is hereby granted, free of charge, to any person obtaining a
      6      1.1   mrg // copy of this software and associated documentation files (the
      7      1.1   mrg // "Software"), to deal in the Software without restriction, including
      8      1.1   mrg // without limitation the rights to use, copy, modify, merge, publish,
      9      1.1   mrg // distribute, and/or sell copies of the Software, and to permit persons
     10      1.1   mrg // to whom the Software is furnished to do so, provided that the above
     11      1.1   mrg // copyright notice(s) and this permission notice appear in all copies of
     12      1.1   mrg // the Software and that both the above copyright notice(s) and this
     13      1.1   mrg // permission notice appear in supporting documentation.
     14      1.1   mrg //
     15      1.1   mrg // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     16      1.1   mrg // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     17      1.1   mrg // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
     18      1.1   mrg // OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
     19      1.1   mrg // HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
     20      1.1   mrg // INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
     21      1.1   mrg // FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
     22      1.1   mrg // NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
     23      1.1   mrg // WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     24      1.1   mrg //
     25      1.1   mrg // Except as contained in this notice, the name of a copyright holder
     26      1.1   mrg // shall not be used in advertising or otherwise to promote the sale, use
     27      1.1   mrg // or other dealings in this Software without prior written authorization
     28      1.1   mrg // of the copyright holder.
     29      1.1   mrg //
     30      1.1   mrg //-------------------------------------------------------------------------
     31      1.1   mrg //
     32  1.1.1.2  ghen 
     33  1.1.1.2  ghen //
     34  1.1.1.2  ghen // CDDL HEADER START
     35  1.1.1.2  ghen //
     36  1.1.1.2  ghen // The contents of this file are subject to the terms of the
     37  1.1.1.2  ghen // Common Development and Distribution License (the "License").
     38  1.1.1.2  ghen // You may not use this file except in compliance with the License.
     39  1.1.1.2  ghen //
     40  1.1.1.2  ghen // You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
     41  1.1.1.2  ghen // or http://www.opensolaris.org/os/licensing.
     42  1.1.1.2  ghen // See the License for the specific language governing permissions
     43  1.1.1.2  ghen // and limitations under the License.
     44  1.1.1.2  ghen //
     45  1.1.1.2  ghen // When distributing Covered Code, include this CDDL HEADER in each
     46  1.1.1.2  ghen // file and include the License file at src/OPENSOLARIS.LICENSE.
     47  1.1.1.2  ghen // If applicable, add the following below this CDDL HEADER, with the
     48  1.1.1.2  ghen // fields enclosed by brackets "[]" replaced with your own identifying
     49  1.1.1.2  ghen // information: Portions Copyright [yyyy] [name of copyright owner]
     50  1.1.1.2  ghen //
     51  1.1.1.2  ghen // CDDL HEADER END
     52      1.1   mrg //
     53      1.1   mrg 
     54      1.1   mrg // Default map provides backwards compatibility with Sun keyboards from
     55      1.1   mrg // long ago and the key mappings still used in Solaris Xsun today
     56      1.1   mrg 
     57      1.1   mrg partial default
     58  1.1.1.2  ghen xkb_symbols "defaults_common" {
     59      1.1   mrg 
     60      1.1   mrg     // Left side keys were labeled L1-L10 on Sun Type 2 & Type 3 keyboards
     61      1.1   mrg     // and the names have stuck (you can spot a longtime Sun admin when you
     62      1.1   mrg     // hear them say to hit "L1-A" to enter the OpenBoot PROM)
     63      1.1   mrg     // These names get mapped to the keysyms F11-F20
     64      1.1   mrg     key <STOP> { [ L1,  L1              ], [ SunStop    ]       };
     65      1.1   mrg     key <AGAI> { [ L2,  L2              ], [ SunAgain   ]       };
     66      1.1   mrg     key <PROP> { [ L3,  L3              ], [ SunProps   ]       };
     67      1.1   mrg     key <UNDO> { [ L4,  L4              ], [ SunUndo    ]       };
     68      1.1   mrg     key <FRNT> { [ L5,  L5              ], [ SunFront   ]       };
     69      1.1   mrg     key <COPY> { [ L6,  L6              ], [ SunCopy    ]       };
     70      1.1   mrg     key <OPEN> { [ L7,  L7              ], [ SunOpen    ]       };
     71      1.1   mrg     key <PAST> { [ L8,  L8              ], [ SunPaste   ]       };
     72      1.1   mrg     key <FIND> { [ L9,  L9              ], [ SunFind    ]       };
     73      1.1   mrg     key <CUT>  { [ L10, L10             ], [ SunCut     ]       };
     74      1.1   mrg 
     75      1.1   mrg     // And on the right side, the function keys were labeled R1-R15,
     76      1.1   mrg     // which get mapped to the keysyms F21-F35
     77      1.1   mrg     // This includes the keys that became the numeric keypad
     78      1.1   mrg     key <PAUS> { [ R1,  R1              ], [ Pause              ] };
     79      1.1   mrg     key <PRSC> { [ R2,  R2              ], [ Print              ] };
     80      1.1   mrg     key <SCLK> { [ R3,  R3              ], [ Scroll_Lock, Break ] };
     81      1.1   mrg 
     82      1.1   mrg     key <KPEQ> { [ KP_Equal             ], [ R4, KP_Equal       ] };
     83      1.1   mrg     key <KPDV> { [ KP_Divide            ], [ R5, KP_Divide      ] };
     84      1.1   mrg     key <KPMU> { [ KP_Multiply          ], [ R6, KP_Multiply    ] };
     85      1.1   mrg 
     86      1.1   mrg     key  <KP7> { [ KP_Home,  KP_7, R7   ], [ R7, KP_7, Home     ] };
     87      1.1   mrg     key  <KP8> { [ KP_Up,    KP_8, R8   ], [ R8, KP_8, Up       ] };
     88      1.1   mrg     key  <KP9> { [ KP_Prior, KP_9, R9   ], [ R9, KP_9, Prior    ] };
     89      1.1   mrg 
     90      1.1   mrg     key  <KP4> { [ KP_Left,  KP_4, R10  ], [ R10, KP_4, Left    ] };
     91      1.1   mrg     key  <KP5> { [ KP_Begin, KP_5, R11  ], [ R11, KP_5          ] };
     92      1.1   mrg     key  <KP6> { [ KP_Right, KP_6, R12  ], [ R12, KP_6, Right   ] };
     93      1.1   mrg 
     94      1.1   mrg     key  <KP1> { [ KP_End,   KP_1, R13  ], [ R13, KP_1, End     ] };
     95      1.1   mrg     key  <KP2> { [ KP_Down,  KP_2, R14  ], [ R14, KP_2, Down    ] };
     96      1.1   mrg     key  <KP3> { [ KP_Next,  KP_3, R15  ], [ R15, KP_3, Next    ] };
     97      1.1   mrg 
     98      1.1   mrg     // F11 & F12 are mapped to SunF36 and SunF37 since they were added
     99      1.1   mrg     // after F11-F35 were already assigned on Sun keyboards
    100      1.1   mrg     key <FK11> { [ SunF36               ], [ F11                ] };
    101      1.1   mrg     key <FK12> { [ SunF37               ], [ F12                ] };
    102      1.1   mrg 
    103      1.1   mrg     // These were added to the keyboard much later and simply got mapped
    104      1.1   mrg     // to their logical names
    105      1.1   mrg     key <HELP> { [ Help                 ]                       };
    106      1.1   mrg     key <MUTE> { [  SunAudioMute,	SunVideoDegauss		]	};
    107      1.1   mrg     key <VOL-> { [  SunAudioLowerVolume,SunVideoLowerBrightness ]	};
    108      1.1   mrg     key <VOL+> { [  SunAudioRaiseVolume,SunVideoRaiseBrightness	]	};
    109  1.1.1.2  ghen     key <POWR> { [  XF86Sleep,		XF86Hibernate		]	};
    110      1.1   mrg 
    111  1.1.1.2  ghen //    key <LALT> { [ Alt_L                ]                       };
    112  1.1.1.2  ghen //    key <LMTA> { [ Meta_L               ]                       };
    113  1.1.1.2  ghen //    key <RMTA> { [ Meta_R               ]                       };
    114  1.1.1.2  ghen //    key <COMP> { [ Multi_key            ]                       };
    115  1.1.1.2  ghen };
    116  1.1.1.2  ghen 
    117  1.1.1.2  ghen partial default
    118  1.1.1.2  ghen xkb_symbols "defaults" {
    119  1.1.1.2  ghen     include "sun_vndr/solaris(defaults_common)"
    120  1.1.1.2  ghen //    key <RALT> { [ Mode_switch          ]                       };
    121  1.1.1.2  ghen //    key <ALGR> { [ Mode_switch          ]                       };
    122      1.1   mrg 
    123      1.1   mrg     // begin modifier mappings
    124  1.1.1.2  ghen //    modifier_map Shift          { Shift_R, Shift_L };
    125  1.1.1.2  ghen //    modifier_map Mod1           { Alt_L };
    126  1.1.1.2  ghen //    modifier_map Mod2           { Num_Lock };
    127  1.1.1.2  ghen //    modifier_map Mod3           { Alt_R, Mode_switch };
    128  1.1.1.2  ghen //    modifier_map Mod4           { Meta_L, Meta_R };
    129  1.1.1.2  ghen };
    130  1.1.1.2  ghen 
    131  1.1.1.2  ghen partial default
    132  1.1.1.2  ghen xkb_symbols "defaults_type7jp" {
    133  1.1.1.2  ghen     include "sun_vndr/solaris(defaults_common)"
    134  1.1.1.2  ghen     // begin modifier mappings
    135      1.1   mrg     modifier_map Shift          { Shift_R, Shift_L };
    136  1.1.1.2  ghen     modifier_map Mod1           { Alt_L , Alt_R};
    137  1.1.1.2  ghen     modifier_map Mod2           { Num_Lock };
    138  1.1.1.2  ghen     modifier_map Mod3           { Mode_switch };
    139      1.1   mrg     modifier_map Mod4           { Meta_L, Meta_R };
    140      1.1   mrg };
    141      1.1   mrg 
    142      1.1   mrg // Map the keys to the actual key names instead of the ancient Sun function
    143      1.1   mrg // keys
    144      1.1   mrg partial
    145      1.1   mrg xkb_symbols "keynames" {
    146      1.1   mrg     key <FK11> { [ F11          ],      [ SunF36   ]    };
    147      1.1   mrg     key <FK12> { [ F12          ],      [ SunF37   ]    };
    148      1.1   mrg 
    149      1.1   mrg     key <STOP> { [ Cancel	],	[ F11	]	};
    150      1.1   mrg     key <AGAI> { [ Redo		],	[ F12	]	};
    151      1.1   mrg     key <PROP> { [ SunProps	],	[ F13	]	};
    152      1.1   mrg     key <UNDO> { [ Undo		],	[ F14	]	};
    153      1.1   mrg     key <FRNT> { [ SunFront	],	[ F15	]	};
    154      1.1   mrg     key <COPY> { [ SunCopy	],	[ F16	]	};
    155      1.1   mrg     key <OPEN> { [ SunOpen	],	[ F17	]	};
    156      1.1   mrg     key <PAST> { [ SunPaste	],	[ F18	]	};
    157      1.1   mrg     key <FIND> { [ Find		],	[ F19	]	};
    158      1.1   mrg     key <CUT>  { [ SunCut	],	[ F20	]	};
    159      1.1   mrg 
    160      1.1   mrg     key <HELP> { [ Help		]	                };
    161      1.1   mrg 
    162      1.1   mrg     key <PAUS> {  [  Pause                      ]       };
    163      1.1   mrg     key <PRSC> {  [  Print                      ]       };
    164      1.1   mrg     key <SCLK> {  [  Scroll_Lock, Break         ]       };
    165      1.1   mrg 
    166      1.1   mrg     key  <KP7> {        [  KP_Home,     KP_7    ]       };
    167      1.1   mrg     key  <KP8> {        [  KP_Up,       KP_8    ]       };
    168      1.1   mrg     key  <KP9> {        [  KP_Prior,    KP_9    ]       };
    169      1.1   mrg 
    170      1.1   mrg     key  <KP4> {        [  KP_Left,     KP_4    ]       };
    171      1.1   mrg     key  <KP5> {        [  KP_Begin,    KP_5    ]       };
    172      1.1   mrg     key  <KP6> {        [  KP_Right,    KP_6    ]       };
    173      1.1   mrg 
    174      1.1   mrg     key  <KP1> {        [  KP_End,      KP_1    ]       };
    175      1.1   mrg     key  <KP2> {        [  KP_Down,     KP_2    ]       };
    176      1.1   mrg     key  <KP3> {        [  KP_Next,     KP_3    ]       };
    177      1.1   mrg 
    178      1.1   mrg     key <KPEN> {        [       KP_Enter        ]       };
    179      1.1   mrg     key <KPEQ> {        [       KP_Equal        ]       };
    180      1.1   mrg 
    181      1.1   mrg     key <MUTE> { [ SunAudioMute,	SunVideoDegauss		]	};
    182      1.1   mrg     key <VOL-> { [ SunAudioLowerVolume, SunVideoLowerBrightness ]	};
    183      1.1   mrg     key <VOL+> { [ SunAudioRaiseVolume, SunVideoRaiseBrightness	]	};
    184      1.1   mrg     key <POWR> { [ SunPowerSwitch,	SunPowerSwitchShift	]	};
    185      1.1   mrg 
    186      1.1   mrg     key <LALT> { [ Alt_L                ]                       };
    187      1.1   mrg     key <RALT> { [ Mode_switch          ]                       };
    188      1.1   mrg     key <ALGR> { [ Mode_switch          ]                       };
    189      1.1   mrg     key <LMTA> { [ Meta_L               ]                       };
    190      1.1   mrg     key <RMTA> { [ Meta_R               ]                       };
    191      1.1   mrg     key <COMP> { [ Multi_key            ]                       };
    192      1.1   mrg 
    193      1.1   mrg };
    194      1.1   mrg 
    195      1.1   mrg // Map the keys to the XFree86 key names instead of the Sun key names
    196      1.1   mrg partial
    197      1.1   mrg xkb_symbols "xf86keynames" {
    198      1.1   mrg     key <STOP> { [ XF86Stop	],	[ F11	]	};
    199      1.1   mrg     key <AGAI> { [ Redo		],	[ F12	]	};
    200      1.1   mrg     key <PROP> { [ SunProps	],	[ F13	]	};
    201      1.1   mrg     key <UNDO> { [ Undo		],	[ F14	]	};
    202      1.1   mrg     key <FRNT> { [ SunFront	],	[ F15	]	};
    203      1.1   mrg     key <COPY> { [ XF86Copy	],	[ F16	]	};
    204      1.1   mrg     key <OPEN> { [ XF86Open	],	[ F17	]	};
    205      1.1   mrg     key <PAST> { [ XF86Paste	],	[ F18	]	};
    206      1.1   mrg     key <FIND> { [ Find		],	[ F19	]	};
    207      1.1   mrg     key <CUT>  { [ XF86Cut	],	[ F20	]	};
    208      1.1   mrg 
    209      1.1   mrg     key <MUTE> { [ XF86AudioMute,	SunVideoDegauss		]	};
    210      1.1   mrg     key <VOL-> { [ XF86AudioLowerVolume,SunVideoLowerBrightness ]	};
    211      1.1   mrg     key <VOL+> { [ XF86AudioRaiseVolume,SunVideoRaiseBrightness	]	};
    212      1.1   mrg     key <POWR> { [ XF86Sleep,		XF86PowerDown	]	};
    213      1.1   mrg };
    214