us revision bfd7cbc1
1//
2// Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the
6// "Software"), to deal in the Software without restriction, including
7// without limitation the rights to use, copy, modify, merge, publish,
8// distribute, and/or sell copies of the Software, and to permit persons
9// to whom the Software is furnished to do so, provided that the above
10// copyright notice(s) and this permission notice appear in all copies of
11// the Software and that both the above copyright notice(s) and this
12// permission notice appear in supporting documentation.
13// 
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
17// OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18// HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
19// INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
20// FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
21// NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
22// WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23// 
24// Except as contained in this notice, the name of a copyright holder
25// shall not be used in advertising or otherwise to promote the sale, use
26// or other dealings in this Software without prior written authorization
27// of the copyright holder.
28//
29//
30//Copyright 1996, 1998  The Open Group
31//
32//All Rights Reserved.
33//
34//The above copyright notice and this permission notice shall be
35//included in all copies or substantial portions of the Software.
36//
37//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38//EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
39//MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
40//IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
41//OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
42//ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43//OTHER DEALINGS IN THE SOFTWARE.
44//
45//Except as contained in this notice, the name of The Open Group shall
46//not be used in advertising or otherwise to promote the sale, use or
47//other dealings in this Software without prior written authorization
48//from The Open Group.
49//
50
51//
52// CDDL HEADER START
53//
54// The contents of this file are subject to the terms of the
55// Common Development and Distribution License (the "License").
56// You may not use this file except in compliance with the License.
57//
58// You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
59// or http://www.opensolaris.org/os/licensing.
60// See the License for the specific language governing permissions
61// and limitations under the License.
62//
63// When distributing Covered Code, include this CDDL HEADER in each
64// file and include the License file at src/OPENSOLARIS.LICENSE.
65// If applicable, add the following below this CDDL HEADER, with the
66// fields enclosed by brackets "[]" replaced with your own identifying
67// information: Portions Copyright [yyyy] [name of copyright owner]
68//
69// CDDL HEADER END
70//
71
72// Symbols shared by all Sun Keyboard layouts
73xkb_symbols "sunbasic" {
74    include "srvr_ctrl(xfree86)"
75
76    // Needed for left function keys and volume keys
77    // Need to include this before us(basic) otherwise tilde is mapped to 
78    // a jp key
79    include "inet(evdev)"
80
81    include "us(basic)"
82    include "pc(function)"
83    include "pc(editing)"
84    include "keypad(x11)"
85
86    key <ESC>  { [ Escape               ]                       };
87
88    // the extra key on most European keyboards
89    key <LSGT> { [ less,    greater,      bar,    brokenbar   ] };
90
91    // these keys are common to almost all layouts
92    key <BKSL> { [ backslash,    bar    ]                       };
93    key <SPCE> { [ space                ]                       };
94
95    key <BKSP> { [ BackSpace            ]                       };
96    key  <TAB> { [ Tab,  ISO_Left_Tab   ]                       };
97    key <RTRN> { [ Return               ]                       };
98
99    key <NMLK> { [ Num_Lock, Pointer_EnableKeys               ] };
100
101    key <COMP> { [ Multi_key            ]                       };
102    // End alphanumeric section
103
104    key <LFSH> { [ Shift_L              ]                       };
105    key <LCTL> { [ Control_L            ]                       };
106
107    key <RTSH> { [ Shift_R              ]                       };
108    key <RCTL> { [ Control_R            ]                       };
109
110
111    // begin modifier mappings
112    modifier_map Shift  { Shift_L, Shift_R };
113    modifier_map Lock   { Caps_Lock, ISO_Lock };
114    modifier_map Control{ Control_L, Control_R };
115    modifier_map Mod2   { Num_Lock };
116
117    //  Fake keys for virtual<->real modifiers mapping 
118    key <LVL3> { [ ISO_Level3_Shift      ]                     };
119    key <MDSW> { [ Mode_switch           ]                     };
120    modifier_map Mod5   { <LVL3>, <MDSW> };
121
122    key <ALT>  { [ NoSymbol, Alt_L       ]                     };
123    key <LALT> {        [       Alt_L,  Alt_L           ]       };
124    key <LWIN> {        [       Meta_L                  ]       };
125    key <RWIN> {        [       Meta_R                  ]       };
126    modifier_map Mod1   { Alt_L };
127    modifier_map Mod4   { Meta_L, Meta_R };
128
129//    key <LALT> { [ Alt_L		]			};
130//    key <ALGR> { [ Mode_switch	]			};
131//    key <LMTA> { [ Meta_L		]			};
132//    key <RMTA> { [ Meta_R		]			};
133
134    include "sun_vndr/us(left_funkeys)"
135
136    include "capslock(capslock)"
137    //include "capslock(shiftlock)"
138
139
140// This default section uses the same symbols as other XKB implementations
141// for greater compatibility & AccessX MouseKeys support, but it is
142// different than the traditional Sun key mappings that date back to the
143// Sun Type 2 keyboard, in which the right side numpad were "R" function
144// keys.  To restore the original behavior, comment out this section and
145// uncomment the section below that lists the R key mappings.
146    key <KPDV> {        [  KP_Divide            ]       };
147    key <KPMU> {        [  KP_Multiply          ]       };
148    key <KPSU> {        [  KP_Subtract          ]       };
149
150    key  <KP7> {        [  KP_Home,     KP_7    ]       };
151    key  <KP8> {        [  KP_Up,       KP_8    ]       };
152    key  <KP9> {        [  KP_Prior,    KP_9    ]       };
153    key <KPAD> {        [       KP_Add          ]       };
154
155    key  <KP4> {        [  KP_Left,     KP_4    ]       };
156    key  <KP5> {        [  KP_Begin,    KP_5    ]       };
157    key  <KP6> {        [  KP_Right,    KP_6    ]       };
158
159    key  <KP1> {        [  KP_End,      KP_1    ]       };
160    key  <KP2> {        [  KP_Down,     KP_2    ]       };
161    key  <KP3> {        [  KP_Next,     KP_3    ]       };
162    key <KPEN> {        [       KP_Enter        ]       };
163
164    key  <KP0> {        [  KP_Insert,   KP_0    ]       };
165    key <KPDL> {  	[  KP_Delete, KP_Decimal ]    	};
166
167// End New Keypad section - Begin Sun traditional Keypad section
168
169//    key  <KP7> { [ R7,        R7              ], [ KP_7, Home         ] };
170//    key  <KP8> { [ Up, R8               ], [ KP_8               ] };
171//    key  <KP9> { [ R9,        R9              ], [ KP_9, Prior        ] };
172//    key <KPAD> { [ KP_Add             ]                       };
173//
174//    key  <KP4> { [ Left, R10          ], [ KP_4               ] };
175//    key  <KP5> { [ R11,       R11             ], [ KP_5               ] };
176//    key  <KP6> { [ Right, R12         ], [ KP_6               ] };
177//
178//    key  <KP1> { [ R13,       R13             ], [ KP_1,      End     ] };
179//    key  <KP2> { [ Down, R14          ], [ KP_2               ] };
180//    key  <KP3> { [ R15,       R15             ], [ KP_3,      Next    ] };
181//    key <KPEN> { [ KP_Enter           ]                       };
182//    key  <KP0> { [ KP_Insert, KP_Insert], [ KP_0              ]       };
183//    key <KPDL> { [ Delete, Delete     ], [ KP_Decimal ]       };
184
185// End "Keypad" section
186
187};
188
189
190xkb_symbols "left_funkeys" {
191    // Suppliment to inet(evdev) for added functionality of left-funkeys
192    //key <STOP> { [ NoSymbol ],      [ L1, L1   ]       };
193    //key <AGAI> { [ NoSymbol ],      [ L2, L2   ]       };
194    //key <PROP> { [ NoSymbol ],      [ L3, L3   ]       };
195    //key <UNDO> { [ NoSymbol ],      [ L4, L4   ]       };
196    //key <FRNT> { [ NoSymbol ],      [ L5, L5   ]       };
197    //key <COPY> { [ NoSymbol ],      [ L6, L6   ]       };
198    //key <OPEN> { [ NoSymbol ],      [ L7, L7   ]       };
199    //key <PAST> { [ NoSymbol ],      [ L8, L8   ]       };
200    //key <FIND> { [ NoSymbol ],      [ L9, L9   ]       };
201    //key <CUT>  { [ NoSymbol ],      [ L10, L10 ]       };
202
203    // The above symbols were chosen for better compatibility withother xkb
204    // mappings.  The old mappings are kepy below in case someone needs them
205    key <STOP> { [ L1,        L1,  SunStop    ]       };
206    key <AGAI> { [ L2,        L2,  SunAgain   ]       };
207    key <PROP> { [ L3,        L3,  SunProps   ]       };
208    key <UNDO> { [ L4,        L4,  SunUndo    ]       };
209    key <FRNT> { [ L5,        L5,  SunFront   ]       };
210    key <COPY> { [ L6,        L6,  SunCopy    ]       };
211    key <OPEN> { [ L7,        L7,  SunOpen    ]       };
212    key <PAST> { [ L8,        L8,  SunPaste   ]       };
213    key <FIND> { [ L9,        L9,  SunFind    ]       };
214    key <CUT>  { [ L10,       L10, SunCut     ]       };
215};
216
217hidden
218xkb_symbols "volumekeys" {
219    // Suppliment to inet(evdev) for added functionality of audio keys
220    key <MUTE> { [ NoSymbol,    SunVideoDegauss         ]       };
221    key <VOL-> { [ NoSymbol,    XF86MonBrightnessDown   ]       };
222    key <VOL+> { [ NoSymbol,    XF86MonBrightnessUp     ]       };
223
224    // The above symbols were chosen for better compatibility withother xkb
225    // mappings.  The old mappings are kepy below in case someone needs them
226    //key <MUTE> { [ SunAudioMute,      SunVideoDegauss         ]       };
227    //key <VOL-> { [ SunAudioLowerVolume,       SunVideoLowerBrightness ]       };
228    //key <VOL+> { [ SunAudioRaiseVolume,       SunVideoRaiseBrightness ]       };
229    //key <POWR> { [ SunPowerSwitch,    SunPowerSwitchShift     ]       };
230};
231
232
233// US/ASCII layout for a Type 4 Sun keyboard
234xkb_symbols "type4basic" {
235    include "sun_vndr/us(sunbasic)"
236
237    // A few alphanumeric keys are different
238    key <AE04> { [ 4, dollar,  EuroSign	]	};
239    key <AE05> { [ 5, percent,  EuroSign	]	};
240    key <AD03> { [ e, E,  EuroSign	]	};
241
242    key <LNFD> { [ Linefeed		]			};
243
244    // Begin "Editing" section
245    key <PRSC> { [ R2,	R2,  Print		] };
246    key <SCLK> { [ R3,	R3,  Scroll_Lock, Break	] };
247    key <PAUS> { [ R1,	R1,  Pause		] };
248
249    // End "Editing" section, begin "Keypad"
250    key <KPEQ> { [ R4,	KP_Equal,  KP_Equal		] };
251
252};
253
254xkb_symbols "type4" {
255    include "sun_vndr/us(type4basic)"
256
257    key <BKSL> { [ backslash, bar,  brokenbar	]	};
258};
259
260// US/ASCII layout for a Type 5 Sun keyboard
261xkb_symbols "type5basic" {
262    include "sun_vndr/us(sunbasic)"
263    include "sun_vndr/us(volumekeys)"
264
265    // Begin "Editing" section
266    key <PRSC> { [ R2, R2,  Print, SunSys_Req	]	};
267    key <SCLK> { [ R3, R3,  Scroll_Lock	]	};
268    key <PAUS> { [ R1, R1,  Pause, Break	]	};
269    // End "Editing" section
270};
271
272xkb_symbols "type5" {
273    include "sun_vndr/us(type5basic)"
274
275    // A few alphanumeric keys are different
276    key <AE04> { [ 4, dollar,  EuroSign	]	};
277    key <AE05> { [ 5, percent,  EuroSign	]	};
278    key <AD03> { [ e, E	,  EuroSign	]	};
279    key <BKSL> { [ backslash, bar,  brokenbar	]	};
280};
281
282// US/ASCII layout for a Type 5 Sun keyboard
283xkb_symbols "type5hobobasic" {
284    include "sun_vndr/us(type5basic)"
285};
286
287xkb_symbols "type5hobo" {
288    include "sun_vndr/us(type5hobobasic)"
289
290    // A few alphanumeric keys are different
291    key <AE04> { [ 4, dollar,  EuroSign   ]       };
292    key <AE05> { [ 5, percent,  EuroSign   ]       };
293    key <AD03> { [ e, E,  EuroSign   ]       };
294    key <BKSL> { [ backslash, bar,  brokenbar  ]       };
295
296    // Here is the hobo keypad:
297
298    key <AE07> { [ 7, ampersand, NoSymbol, NoSymbol, KP_7       ] };
299    key <AE08> { [ 8, asterisk,  NoSymbol, NoSymbol, KP_8       ] };
300    key <AE09> { [ 9, parenleft, NoSymbol, NoSymbol, KP_9       ] };
301    key <AE10> { [ 0, parenright, NoSymbol, NoSymbol, KP_Multiply] };
302
303    key <AD07> { [ u, U, NoSymbol, NoSymbol, KP_4       ] };
304    key <AD08> { [ i, I, NoSymbol, NoSymbol, KP_5       ] };
305    key <AD09> { [ o, O, NoSymbol, NoSymbol, KP_6       ] };
306    key <AD10> { [ p, P, NoSymbol, NoSymbol, KP_Subtract] };
307
308    key <AC07> { [ j, J, NoSymbol, NoSymbol, KP_1       ] };
309    key <AC08> { [ k, K, NoSymbol, NoSymbol, KP_2       ] };
310    key <AC09> { [ l, L, NoSymbol, NoSymbol, KP_3       ] };
311    key <AC10> { [ semicolon, colon, NoSymbol, NoSymbol, KP_Add   ] };
312
313    key <RTRN> { [ Return, NoSymbol, NoSymbol, KP_Enter    ] };
314
315    key <AB07> { [ m, M,  NoSymbol, NoSymbol, KP_0       ] };
316
317    key <AB09> { [ period, greater, NoSymbol, NoSymbol, KP_Decimal] };
318    key <AB10> { [ slash, question, NoSymbol, NoSymbol, KP_Divide ] };
319};
320
321
322xkb_symbols "type6" {
323    include "sun_vndr/us(sunbasic)"
324    include "sun_vndr/us(volumekeys)"
325    include "eurosign(4)"
326    include "level3(ralt_switch)"
327
328    key <SYRQ> { [ SunSys_Req                   ]};
329};
330
331
332
333xkb_symbols "pc101" {
334    include "us(pc101)"
335    key <RALT> { [ Mode_switch, Meta_R	] };
336};
337
338xkb_symbols "pc102" {
339    include "us(pc102)"
340    key <RALT> { [ Mode_switch, Meta_R	] };
341};
342
343xkb_symbols "pc104" {
344    include "us(pc104)"
345};
346
347xkb_symbols "pc101currency" {
348
349    key <AE04> { [ 4, dollar		], [ EuroSign	]	};
350    key <AE05> { [ 5, percent		], [ EuroSign	]	};
351    key <AD03> { [ e, E			], [ EuroSign	]	};
352    key <BKSL> { [ backslash, bar	], [ brokenbar			]};
353};
354
355xkb_symbols "US101A_Sun" {
356
357    key <AE04> { [ 4, dollar		], [ EuroSign	]	};
358    key <AE05> { [ 5, percent		], [ EuroSign	]	};
359    key <AD03> { [ e, E			], [ EuroSign	]	};
360    key <BKSL> { [ backslash, bar	], [ brokenbar			]};
361
362    // Begin "Editing" section
363    key <PRSC> { [ L5, L5		], [ Print, SunSys_Req 		]};
364    key <SCLK> { [ L7, L7		], [  Scroll_Lock		]};
365    key <PAUS> { [ L1, L1		], [ Pause, Break 		]};
366    key  <INS> { [ L8, L8		], [  Insert			]};
367    key <HOME> { [ L6, L6		], [  Home			]};
368    key <PGUP> { [ L3, L3		], [  Prior			]};
369
370
371    key <DELE> { [ L10, L10		], [ Delete			]};
372    key  <END> { [ L9, L9		], [  End			]};
373    key <PGDN> { [ L4, L4		], [  Next			]};
374
375    key   <UP> {	[  Up			]	};
376    key <LEFT> {	[  Left			]	};
377    key <DOWN> {	[  Down			]	};
378    key <RGHT> {	[  Right		]	};
379
380    key <KPDV> { [ R5, R5		], [ KP_Divide	]	};
381    key <KPMU> { [ R6, R6		], [ KP_Multiply	]	};
382
383    key  <KP7> { [ R7, KP_7		], [ KP_7, Home		]	};
384    key  <KP8> { [ KP_Up, KP_8		], [ KP_8		]	};
385    key  <KP9> { [ R9, KP_9		], [ KP_9, Prior	]	};
386    key <KPAD> { [ KP_Add		]				};
387
388    key  <KP4> { [ KP_Left, KP_4	], [ KP_4		]	};
389    key  <KP5> { [ R11,	KP_5		], [ KP_5		]	};
390    key  <KP6> { [ KP_Right, KP_6	], [ KP_6		]	};
391
392    key  <KP1> { [ R13,	KP_1		], [ KP_1, End		]	};
393    key  <KP2> { [ KP_Down, KP_2	], [ KP_2		]	};
394    key  <KP3> { [ R15,	KP_3		], [ KP_3, Next		]	};
395    key <KPEN> { [ KP_Enter		]				};
396
397    key <LALT> { [ Meta_L		]				};
398    key <RALT> { [ Alt_L		]				};
399    key <RCTL> { [ Multi_key		]				};
400};
401