1 //-------------------------------------------------------------------------
3 // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
5 // Permission is hereby granted, free of charge, to any person obtaining a
6 // copy of this software and associated documentation files (the "Software"),
7 // to deal in the Software without restriction, including without limitation
8 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 // and/or sell copies of the Software, and to permit persons to whom the
10 // Software is furnished to do so, subject to the following conditions:
12 // The above copyright notice and this permission notice (including the next
13 // paragraph) shall be included in all copies or substantial portions of the
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 // DEALINGS IN THE SOFTWARE.
24 //-------------------------------------------------------------------------
26 // ident "@(#)solaris 1.7 05/11/08 SMI"
29 // Default map provides backwards compatibility with Sun keyboards from
30 // long ago and the key mappings still used in Solaris Xsun today
33 xkb_symbols "defaults" {
35 // Left side keys were labeled L1-L10 on Sun Type 2 & Type 3 keyboards
36 // and the names have stuck (you can spot a longtime Sun admin when you
37 // hear them say to hit "L1-A" to enter the OpenBoot PROM)
38 // These names get mapped to the keysyms F11-F20
39 key <STOP> { [ L1, L1 ], [ SunStop ] };
40 key <AGAI> { [ L2, L2 ], [ SunAgain ] };
41 key <PROP> { [ L3, L3 ], [ SunProps ] };
42 key <UNDO> { [ L4, L4 ], [ SunUndo ] };
43 key <FRNT> { [ L5, L5 ], [ SunFront ] };
44 key <COPY> { [ L6, L6 ], [ SunCopy ] };
45 key <OPEN> { [ L7, L7 ], [ SunOpen ] };
46 key <PAST> { [ L8, L8 ], [ SunPaste ] };
47 key <FIND> { [ L9, L9 ], [ SunFind ] };
48 key <CUT> { [ L10, L10 ], [ SunCut ] };
50 // And on the right side, the function keys were labeled R1-R15,
51 // which get mapped to the keysyms F21-F35
52 // This includes the keys that became the numeric keypad
53 key <PAUS> { [ R1, R1 ], [ Pause ] };
54 key <PRSC> { [ R2, R2 ], [ Print ] };
55 key <SCLK> { [ R3, R3 ], [ Scroll_Lock, Break ] };
57 key <KPEQ> { [ KP_Equal ], [ R4, KP_Equal ] };
58 key <KPDV> { [ KP_Divide ], [ R5, KP_Divide ] };
59 key <KPMU> { [ KP_Multiply ], [ R6, KP_Multiply ] };
61 key <KP7> { [ KP_Home, KP_7, R7 ], [ R7, KP_7, Home ] };
62 key <KP8> { [ KP_Up, KP_8, R8 ], [ R8, KP_8, Up ] };
63 key <KP9> { [ KP_Prior, KP_9, R9 ], [ R9, KP_9, Prior ] };
65 key <KP4> { [ KP_Left, KP_4, R10 ], [ R10, KP_4, Left ] };
66 key <KP5> { [ KP_Begin, KP_5, R11 ], [ R11, KP_5 ] };
67 key <KP6> { [ KP_Right, KP_6, R12 ], [ R12, KP_6, Right ] };
69 key <KP1> { [ KP_End, KP_1, R13 ], [ R13, KP_1, End ] };
70 key <KP2> { [ KP_Down, KP_2, R14 ], [ R14, KP_2, Down ] };
71 key <KP3> { [ KP_Next, KP_3, R15 ], [ R15, KP_3, Next ] };
73 // F11 & F12 are mapped to SunF36 and SunF37 since they were added
74 // after F11-F35 were already assigned on Sun keyboards
75 key <FK11> { [ SunF36 ], [ F11 ] };
76 key <FK12> { [ SunF37 ], [ F12 ] };
78 // These were added to the keyboard much later and simply got mapped
79 // to their logical names
80 key <HELP> { [ Help ] };
81 key <MUTE> { [ SunAudioMute, SunVideoDegauss ] };
82 key <VOL-> { [ SunAudioLowerVolume,SunVideoLowerBrightness ] };
83 key <VOL+> { [ SunAudioRaiseVolume,SunVideoRaiseBrightness ] };
84 key <POWR> { [ SunPowerSwitch, SunPowerSwitchShift ] };
86 key <LALT> { [ Alt_L ] };
87 // key <RALT> { [ Mode_switch ] };
88 // key <ALGR> { [ Mode_switch ] };
89 key <LMTA> { [ Meta_L ] };
90 key <RMTA> { [ Meta_R ] };
91 key <COMP> { [ Multi_key ] };
93 // begin modifier mappings
94 modifier_map Shift { Shift_R, Shift_L };
95 modifier_map Mod1 { Alt_L };
96 modifier_map Mod2 { Alt_R, Mode_switch };
97 modifier_map Mod3 { Num_Lock };
98 modifier_map Mod4 { Meta_L, Meta_R };
102 // Map the keys to the actual key names instead of the ancient Sun function
105 xkb_symbols "keynames" {
106 key <FK11> { [ F11 ], [ SunF36 ] };
107 key <FK12> { [ F12 ], [ SunF37 ] };
109 key <STOP> { [ Cancel ], [ F11 ] };
110 key <AGAI> { [ Redo ], [ F12 ] };
111 key <PROP> { [ SunProps ], [ F13 ] };
112 key <UNDO> { [ Undo ], [ F14 ] };
113 key <FRNT> { [ SunFront ], [ F15 ] };
114 key <COPY> { [ SunCopy ], [ F16 ] };
115 key <OPEN> { [ SunOpen ], [ F17 ] };
116 key <PAST> { [ SunPaste ], [ F18 ] };
117 key <FIND> { [ Find ], [ F19 ] };
118 key <CUT> { [ SunCut ], [ F20 ] };
120 key <HELP> { [ Help ] };
122 key <PAUS> { [ Pause ] };
123 key <PRSC> { [ Print ] };
124 key <SCLK> { [ Scroll_Lock, Break ] };
126 key <KP7> { [ KP_Home, KP_7 ] };
127 key <KP8> { [ KP_Up, KP_8 ] };
128 key <KP9> { [ KP_Prior, KP_9 ] };
130 key <KP4> { [ KP_Left, KP_4 ] };
131 key <KP5> { [ KP_Begin, KP_5 ] };
132 key <KP6> { [ KP_Right, KP_6 ] };
134 key <KP1> { [ KP_End, KP_1 ] };
135 key <KP2> { [ KP_Down, KP_2 ] };
136 key <KP3> { [ KP_Next, KP_3 ] };
138 key <KPEN> { [ KP_Enter ] };
139 key <KPEQ> { [ KP_Equal ] };
141 key <MUTE> { [ SunAudioMute, SunVideoDegauss ] };
142 key <VOL-> { [ SunAudioLowerVolume, SunVideoLowerBrightness ] };
143 key <VOL+> { [ SunAudioRaiseVolume, SunVideoRaiseBrightness ] };
144 key <POWR> { [ SunPowerSwitch, SunPowerSwitchShift ] };
146 key <LALT> { [ Alt_L ] };
147 key <RALT> { [ Mode_switch ] };
148 key <ALGR> { [ Mode_switch ] };
149 key <LMTA> { [ Meta_L ] };
150 key <RMTA> { [ Meta_R ] };
151 key <COMP> { [ Multi_key ] };
155 // Map the keys to the XFree86 key names instead of the Sun key names
157 xkb_symbols "xf86keynames" {
158 key <STOP> { [ XF86Stop ], [ F11 ] };
159 key <AGAI> { [ Redo ], [ F12 ] };
160 key <PROP> { [ SunProps ], [ F13 ] };
161 key <UNDO> { [ Undo ], [ F14 ] };
162 key <FRNT> { [ SunFront ], [ F15 ] };
163 key <COPY> { [ XF86Copy ], [ F16 ] };
164 key <OPEN> { [ XF86Open ], [ F17 ] };
165 key <PAST> { [ XF86Paste ], [ F18 ] };
166 key <FIND> { [ Find ], [ F19 ] };
167 key <CUT> { [ XF86Cut ], [ F20 ] };
169 key <MUTE> { [ XF86AudioMute, SunVideoDegauss ] };
170 key <VOL-> { [ XF86AudioLowerVolume,SunVideoLowerBrightness ] };
171 key <VOL+> { [ XF86AudioRaiseVolume,SunVideoRaiseBrightness ] };
172 key <POWR> { [ XF86Sleep, XF86PowerDown ] };