From 240a40cbd3c2dea858e84868d423b3d826efa2dc Mon Sep 17 00:00:00 2001 From: "Sergey V. Udaltsov" Date: Sat, 13 Nov 2010 00:22:45 +0000 Subject: [PATCH] Added sanwa kbd model, jp(kana86) variant https://bugs.freedesktop.org/show_bug.cgi?id=31340 --- geometry/Makefile.am | 2 +- geometry/sanwa | 151 +++++++++++++++++++++++++++++++++++++++++++ rules/base.m_g.part | 1 + rules/base.xml.in | 13 ++++ symbols/jp | 28 ++++++++ symbols/keypad | 48 ++++++++++++++ 6 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 geometry/sanwa diff --git a/geometry/Makefile.am b/geometry/Makefile.am index 84619fb..2a83d16 100644 --- a/geometry/Makefile.am +++ b/geometry/Makefile.am @@ -7,7 +7,7 @@ amiga ataritt chicony \ dell everex fujitsu \ hhk hp keytronic kinesis \ macintosh microsoft nec nokia \ -northgate pc sony thinkpad \ +northgate pc sanwa sony thinkpad \ sun typematrix winbook README dir_data = $(dist_geom_DATA) diff --git a/geometry/sanwa b/geometry/sanwa new file mode 100644 index 0000000..ccb09d6 --- /dev/null +++ b/geometry/sanwa @@ -0,0 +1,151 @@ +// $Xorg: $ +// +//Copyright 1996, 1998 The Open Group +// +//Permission to use, copy, modify, distribute, and sell this software and its +//documentation for any purpose is hereby granted without fee, provided that +//the above copyright notice appear in all copies and that both that +//copyright notice and this permission notice appear in supporting +//documentation. +// +//The above copyright notice and this permission notice shall be +//included in all copies or substantial portions of the Software. +// +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +//EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +//MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +//IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +//OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +//ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +//OTHER DEALINGS IN THE SOFTWARE. +// +//Except as contained in this notice, the name of The Open Group shall +//not be used in advertising or otherwise to promote the sale, use or +//other dealings in this Software without prior written authorization +//from The Open Group. +// +default xkb_geometry "sanwaskbkg3" { + + description= "Sanwa Supply SKB-KG3"; + // SKB-KG3BK (black) + // http://www.sanwa.co.jp/product/syohin.asp?code=SKB-KG3BK + // http://www.sanwa.co.jp/zooma/keybord/SKB-KG3BK/ + // SKB-KG3W (white) + // http://www.sanwa.co.jp/product/syohin.asp?code=SKB-KG3W + // http://www.sanwa.co.jp/zooma/keybord/SKB-KG3SW/ + // SKB-KG3SV (silver) + // http://www.sanwa.co.jp/product/syohin.asp?code=SKB-KG3SV + // http://www.sanwa.co.jp/zooma/keybord/SKB-KG3SV/ + + width= 304; + height= 127; + + shape.cornerRadius= 1; + shape "TOP" { { [15.25,13] }, { [2,2], [13.25,11] } }; + shape "NORM" { { [17,16] }, { [2,2], [15,14] } }; + shape "TBBK" { { [24.5,16] }, { [2,2], [22.5,14] } }; + shape "RTRN" { { [0,0], [36,0], [36,34], [8.5,34], [8.5,16], [0,16] }, + { [2,2], [34,2], [34,32], [10.5,32], [10.5,14], [2,14] } }; + shape "CAPS" { { [33,16] }, { [28,16] }, { [2,2], [26,14] } }; + shape "LFSH" { { [41,16] }, { [2,2], [39,14] } }; + shape "CTSH" { { [19.5,16] }, { [2,2], [17.5,14] } }; + shape "SPCE" { { [57.5,16] }, { [2,2], [55.5,14] } }; + + shape "LED" { cornerRadius= 0, { [5,1] } }; + + indicator.onColor= "green"; + indicator.offColor= "green30"; + indicator.top= 3; + indicator.shape= "LED"; + indicator "Num Lock" { left= 247; }; + indicator "Caps Lock" { left= 266; }; + indicator "Scroll Lock" { left= 285; }; + text.color= "black"; + text.top= 1; + text "Vendor1" { left= 10; text="SANWA"; }; + text.top= 4.5; + text "Vendor2" { left= 10; text="SUPPLY"; }; + text "NumLockLabel" { left= 241; text="Num Lock"; }; + text "CapsLockLabel" { left= 260; text="Caps Lock"; }; + text "ScrollLockLabel" { left= 279; text="Scroll Lock"; }; + + section.left= 3; + row.left= 1; + key.shape= "NORM"; + key.gap= 2; + section "Function" { + key.shape= "TOP"; + top= 10; + row { + top= 1; + keys { , , , , , , , + , , , , , , , + {, color="grey20"}, , {, color="grey20"} + }; + }; + overlay "SCLK" { + = + }; + overlay "FN" { + = + }; + }; // End of "Function" section + + section "Alpha" { + top= 24; + row { + top= 2; + keys { , , , , , , , + {, color="grey20"}, {, color="grey20"}, + {, color="grey20"}, {, color="grey20"}, + , , , { , "TBBK" } + }; + }; + row { + top= 20; + keys { { , "TBBK" }, , , , , , + , {, color="grey20"}, {, color="grey20"}, + {, color="grey20"}, {, color="grey20"}, , + , { , "RTRN" } + }; + }; + row { + top= 38; + keys { { , "CAPS" }, , , , , , + , {, color="grey20"}, {, color="grey20"}, + {, color="grey20"}, {, color="grey20"}, , + + }; + }; + row { + top= 56; + keys { { , "LFSH" }, , , , , , + , {, color="grey20"}, , + {, color="grey20"}, {, color="grey20"}, , + {, color="grey20"}, {, key.shape= "CTSH" } + }; + }; + row { + top= 74; + keys { { , key.shape= "CTSH" }, {, color="grey20"}, + , , , {, "SPCE" }, , , + , , {, color="grey20"}, + {, color="grey20"}, + {, key.shape= "CTSH", color="grey20"} + }; + }; + overlay "SCLK" { + =, =, =, =, + =, =, =, =, + =, =, =, =, + =, =, = + }; + overlay "FN" { + =, =, =, = + }; + }; // End of "Alpha" section + + alias = ; + alias = ; + +}; // End of "default" geometry diff --git a/rules/base.m_g.part b/rules/base.m_g.part index c76a55e..753f2ed 100644 --- a/rules/base.m_g.part +++ b/rules/base.m_g.part @@ -8,6 +8,7 @@ hpmini110 = hp(mini110) hpdv5 = hp(dv5) omnikey101 = northgate(omnikey101) + sanwaskbkg3 = sanwa(sanwaskbkg3) $pcmodels = pc(%m) $pcgeometries = pc(%m) everex = everex(STEPnote) diff --git a/rules/base.xml.in b/rules/base.xml.in index 75f88fc..159af8d 100644 --- a/rules/base.xml.in +++ b/rules/base.xml.in @@ -895,6 +895,13 @@ Samsung + + + sanwaskbkg3 + Sanwa Supply SKB-KG3 + Sanwa Supply Inc. + + sk1300 @@ -2952,6 +2959,12 @@ <_description>Kana + + + kana86 + <_description>Kana 86 + + OADG109A diff --git a/symbols/jp b/symbols/jp index 68ffff7..3da0dd5 100644 --- a/symbols/jp +++ b/symbols/jp @@ -116,6 +116,34 @@ xkb_symbols "OADG109A" { key { [ yen, bar ] }; }; +// 86 keys with kana map +partial alphanumeric_keys +xkb_symbols "kana86" { + + include "pc(function)" + include "pc(editing)" + include "keypad(numoperdecsep)" + include "altwin(menu)" + include "jp(kana)" + include "jp(OADG109A)" + name[Group1]= "Japan - Kana 86"; + + key { [ Escape ] }; + key { [ Num_Lock, Pointer_EnableKeys ] }; + key { [ BackSpace ] }; + key { [ Tab, ISO_Left_Tab ] }; + key { [ Return ] }; + key { [ Shift_L ] }; + key { [ Shift_R ] }; + key { [ Super_L ] }; + key { [ Alt_L ] }; + key { [ space ] }; + key { [ Alt_R ] }; +// for compatability with other keyboards connected at the same time + key { [ Super_R ] }; + key { [ Control_R ] }; +}; + partial alphanumeric_keys xkb_symbols "kana" { diff --git a/symbols/keypad b/symbols/keypad index a6aaa14..406d40b 100644 --- a/symbols/keypad +++ b/symbols/keypad @@ -586,3 +586,51 @@ xkb_symbols "pointerkeys" { key { [ Num_Lock, Pointer_EnableKeys ] }; }; +// Only numbers, operators and decimal separator, +// as seen on keypad overlay on Japanese keyboard. +// ┌─┬─┬─┬─┐ +// │7│8│9│*│ +// ├─┼─┼─┼─┤ +// │4│5│6│-│ +// ├─┼─┼─┼─┤ +// │1│2│3│+│ +// ├─┼─┼─┼─┤ +// │0│ │·│/│ +// └─┴─┴─┴─┘ +partial keypad_keys +xkb_symbols "numoperdecsep" { + key { [ KP_7 ] }; + key { [ KP_8 ] }; + key { [ KP_9 ] }; +// ClsGrb kills whichever client has a grab in effect + key { + type="CTRL+ALT", + symbols[Group1]= [ KP_Multiply, XF86_ClearGrab ] + }; + + key { [ KP_4 ] }; + key { [ KP_5 ] }; + key { [ KP_6 ] }; +// -VMode switches to the previous video mode + key { + type="CTRL+ALT", + symbols[Group1]= [ KP_Subtract, XF86_Prev_VMode ] + }; + + key { [ KP_1 ] }; + key { [ KP_2 ] }; + key { [ KP_3 ] }; +// +VMode switches to the next video mode + key { + type="CTRL+ALT", + symbols[Group1]= [ KP_Add, XF86_Next_VMode ] + }; + + key { [ KP_0 ] }; + key { [ KP_Decimal ] }; +// Ungrab cancels server/keyboard/pointer grabs + key { + type="CTRL+ALT", + symbols[Group1]= [ KP_Divide, XF86_Ungrab ] + }; +}; -- 2.32.0.93.g670b81a890