[Bug 2037] New: Sun type6 keycode and geometry fixes for xkbcomp (with patch)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 8 19:00:18 PST 2004


Please do not reply to this email: if you want to comment on the bug, go to          
the URL shown below and enter yourcomments there.   
 
https://bugs.freedesktop.org/show_bug.cgi?id=2037        
   
           Summary: Sun type6 keycode and geometry fixes for xkbcomp (with
                    patch)
           Product: xorg
           Version: 6.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: App/xkbcomp
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: freedesktop at davidhull.org


The keycode and geometry files included with Xorg 6.8.1 for the Sun type6
keyboard are incorrect.  Sun makes two type6 keyboards: one says "MODEL: TYPE 6"
underneath and has Sun's interface, and one says "MODEL: TYPE 6 USB" and has
a USB interface.  In addition, these keyboards comes in multiple layouts, which
include "US" and "US/UNIX".  These two differ in the placement of the esc,
tilde, backspace, backslash, control, and caps lock keys.

The Xorg 6.8.1 kbdcomp has support for "type6", which actually appears to be
for the USB version, but even if this is the case is has mistakes
for some of the special keys on the type6 keyboard.

This patch tries to restore the distinction between these different keyboard
types.

  Model            Sun PN      Description
  type6            320-1270    Sun interface, US layout
  type6_unix       320-1272    Sun interface, US/UNIX layout
  type6_usb        320-1271    USB interface, US layout
  type6_unix_usb   320-1273    USB interface, US/UNIX layout

The patch changes the following files:

  xkb/rules/sun  Support new model names.
  xkb/keycodes/sun  Restores type6 keycodes from Solaris keycodes file.
                 Adds type6_usb keycodes.
  xbk/symbols/sun/us  Adds ctrl-alt-fkey assignment to switch virtual terminals
                 under Linux.
  xkb/geometry/sun  Cleaned up type5unix definition: adjusted width of backspace
                 key, and removed grey key coloring, which was not applied
                 consistently.

I have a type6_unix_usb keyboard which I have used with Xorg 6.8.1 and verified
that this patch is correct for that keyboard.  I am fairly certain that
type6_usb is correct as well.  I did not verify that the type6 keycodes
(for the Sun-interface keyboard) were correct under Xorg, since we don't
run Linux on any of our SPARC boxes; I did check them using
Sun's Xsun server, and I think they should be the same as the type5 keycodes
(the Sun keycodes file says that they are).

--- xkb/rules/sun.orig	2004-11-18 16:43:50.000000000 -0800
+++ xkb/rules/sun	2004-12-08 18:35:53.114975094 -0800
@@ -5,23 +5,35 @@
   type5			=    sun(type5)			sun
   type5_euro		=    sun(type5_euro)		sun(type5euro)
   type5_unix		=    sun(type5)			sun(type5unix)
-  type6			=    sun(type6)                 sun(type5) // no type6 yet
+  type6			=    sun(type6)                 sun(type5)
   type6_euro		=    sun(type6_euro)            sun(type5)
+  type6_unix		=    sun(type6)                 sun(type5unix)
+  type6_usb		=    sun(type6_usb)             sun(type5)
+  type6_unix_usb	=    sun(type6_usb)             sun(type5unix)
 
 ! model		layout	=  symbols
   type4		us	=  sun/us(sun4)
   type5		us	=  sun/us(sun5)
   type5_unix	us	=  sun/us(sun5)
   type6		us      =  sun/us(sun6)
+  type6_unix	us      =  sun/us(sun6)
+  type6_usb	us      =  sun/us(sun6)
+  type6_unix_usb us     =  sun/us(sun6)
   type4		en_US	=  sun/us(sun4)+iso9995-3(basic)
   type5		en_US	=  sun/us(sun5)+iso9995-3(basic)
   type5_unix	en_US	=  sun/us(sun5)+iso9995-3(basic)
   type6		en_US   =  sun/us(sun6)+iso9995-3(basic)
+  type6_unix	en_US   =  sun/us(sun6)+iso9995-3(basic)
+  type6_usb	en_US   =  sun/us(sun6)+iso9995-3(basic)
+  type6_unix_usb en_US  =  sun/us(sun6)+iso9995-3(basic)
   type4		*	=  sun/us(sun4)+%l%(v)
   type5		*	=  sun/us(sun5)+%l%(v)
   type5_euro	*	=  sun/us(sun5)+%l%(v)
   type6		*	=  sun/us(sun6)+%l%(v)
+  type6_unix	*	=  sun/us(sun6)+%l%(v)
   type6_euro	*	=  sun/us(sun6)+%l%(v)
+  type6_usb	*	=  sun/us(sun6)+%l%(v)
+  type6_unix_usb *	=  sun/us(sun6)+%l%(v)
 
 ! model   layout   =    compat     types
   *       *        =    complete   complete
--- xkb/keycodes/sun.orig	2004-11-18 16:43:47.000000000 -0800
+++ xkb/keycodes/sun	2004-12-08 17:04:50.376129527 -0800
@@ -301,150 +301,9 @@
     indicator 1 = "Num Lock";
 };
 
+// Keycodes for Sun Model 320-1272 (Type 6), Sun interface.
 xkb_keycodes "type6" {
-    minimum= 8;
-    maximum= 255;
-
-    <TLDE> =  49;
-    <AE01> =  10;
-    <AE02> =  11;
-    <AE03> =  12;
-    <AE04> =  13;
-    <AE05> =  14;
-    <AE06> =  15;
-    <AE07> =  16;
-    <AE08> =  17;
-    <AE09> =  18;
-    <AE10> =  19;
-    <AE11> =  20;
-    <AE12> =  21;
-    <BKSP> =  22;
-
-    <TAB>  =  23;
-    <AD01> =  24;
-    <AD02> =  25;
-    <AD03> =  26;
-    <AD04> =  27;
-    <AD05> =  28;
-    <AD06> =  29;
-    <AD07> =  30;
-    <AD08> =  31;
-    <AD09> =  32;
-    <AD10> =  33;
-    <AD11> =  34;
-    <AD12> =  35;
-    <RTRN> =  36;
-
-    <CAPS> =  66;
-    <AC01> =  38;
-    <AC02> =  39;
-    <AC03> =  40;
-    <AC04> =  41;
-    <AC05> =  42;
-    <AC06> =  43;
-    <AC07> =  44;
-    <AC08> =  45;
-    <AC09> =  46;
-    <AC10> =  47;
-    <AC11> =  48;
-
-    <LFSH> =  50;
-    <AB01> =  52;
-    <AB02> =  53;
-    <AB03> =  54;
-    <AB04> =  55;
-    <AB05> =  56;
-    <AB06> =  57;
-    <AB07> =  58;
-    <AB08> =  59;
-    <AB09> =  60;
-    <AB10> =  61;
-    <RTSH> =  62;
-    <BKSL> =  51;
-
-    <LALT> =  64;
-    <LCTL> =  37;
-    <SPCE> =  65;
-    <ALGR> = 113;
-    alias <RALT> = <ALGR>;
-
-    <LMTA> = 115;
-    <RMTA> = 116;
-    <COMP> = 117;
-
-    <ESC>  =   9;
-    <FK01> =  67;
-    <FK02> =  68;
-    <FK03> =  69;
-    <FK04> =  70;
-    <FK05> =  71;
-    <FK06> =  72;
-    <FK07> =  73;
-    <FK08> =  74;
-    <FK09> =  75;
-    <FK10> =  76;
-    <FK11> =  95;
-    <FK12> =  96;
-
-    <PRSC> = 111;
-    <SCLK> =  78;
-    <PAUS> = 110;
-
-    <INS>  = 106;
-    <HOME> =  97;
-    <PGUP> =  99;
-    <DELE> = 107;
-    <END>  = 103;
-    <PGDN> = 105;
-
-    <UP>   =  98;
-    <LEFT> = 100;
-    <DOWN> = 104;
-    <RGHT> = 102;
-
-    <NMLK> =  77;
-    <KPDV> = 112;
-    <KPMU> =  63;
-    <KPSU> =  82;
-
-    <KP7>  =  79;
-    <KP8>  =  80;
-    <KP9>  =  81;
-    <KPAD> =  86;
-
-    <KP4>  =  83;
-    <KP5>  =  84;
-    <KP6>  =  85;
-
-    <KP1>  =  87;
-    <KP2>  =  88;
-    <KP3>  =  89;
-    <KPEN> = 108;
-
-    <KP0>  =  90;
-    <KPDL> =  91;
-
-    <STOP> = 222;
-    <AGAI> = 223;
-    <PROP> = 224;
-    <UNDO> = 225;
-    <FRNT> = 226;
-    <COPY> = 227;
-    <OPEN> = 228;
-    <PAST> = 229;
-    <FIND> = 230;
-    <CUT>  = 231;
-
-    <HELP> = 232;
-
-    <MUTE> = 165;
-    <VOL-> = 159;
-    <VOL+> = 158;
-    <POWR> = 160;
-
-    indicator 1 = "Caps Lock";
-    indicator 2 = "Num Lock";
-    indicator 3 = "Scroll Lock";
+    include "sun(type5)"
 };
 
 xkb_keycodes "type4_euro" {
@@ -459,7 +318,7 @@
 
 xkb_keycodes "type6_euro" {
     include "sun(type6)"
-    <LSGT> =  94;
+    <LSGT> = 131;
 };
 
 xkb_keycodes "type5_se" {
@@ -817,3 +676,157 @@
     alias <LCTL> = <AC00>;
     alias <CAPS> = <AA00>;
 };
+
+// Keycodes for Sun Model 320-1273 (Type 6 USB).
+xkb_keycodes "type6_usb" {
+    minimum= 8;
+    maximum= 255;
+
+    <ESC>  =   9;
+    <AE01> =  10;
+    <AE02> =  11;
+    <AE03> =  12;
+    <AE04> =  13;
+    <AE05> =  14;
+    <AE06> =  15;
+    <AE07> =  16;
+    <AE08> =  17;
+    <AE09> =  18;
+    <AE10> =  19;
+    <AE11> =  20;
+    <AE12> =  21;
+    <BKSL> =  51;
+    <TLDE> =  49;
+
+    <TAB>  =  23;
+    <AD01> =  24;
+    <AD02> =  25;
+    <AD03> =  26;
+    <AD04> =  27;
+    <AD05> =  28;
+    <AD06> =  29;
+    <AD07> =  30;
+    <AD08> =  31;
+    <AD09> =  32;
+    <AD10> =  33;
+    <AD11> =  34;
+    <AD12> =  35;
+    <RTRN> =  36;
+    <BKSP> =  22;
+
+    <LCTL> =  37;
+    <AC01> =  38;
+    <AC02> =  39;
+    <AC03> =  40;
+    <AC04> =  41;
+    <AC05> =  42;
+    <AC06> =  43;
+    <AC07> =  44;
+    <AC08> =  45;
+    <AC09> =  46;
+    <AC10> =  47;
+    <AC11> =  48;
+
+    <LFSH> =  50;
+    <AB01> =  52;
+    <AB02> =  53;
+    <AB03> =  54;
+    <AB04> =  55;
+    <AB05> =  56;
+    <AB06> =  57;
+    <AB07> =  58;
+    <AB08> =  59;
+    <AB09> =  60;
+    <AB10> =  61;
+    <RTSH> =  62;
+
+    <CAPS> =  66;
+    <LALT> =  64;
+    <SPCE> =  65;
+    <ALGR> = 113;
+    alias <RALT> = <ALGR>;
+
+    <LMTA> = 115;
+    <RMTA> = 116;
+    <COMP> = 117;
+
+    <FK01> =  67;
+    <FK02> =  68;
+    <FK03> =  69;
+    <FK04> =  70;
+    <FK05> =  71;
+    <FK06> =  72;
+    <FK07> =  73;
+    <FK08> =  74;
+    <FK09> =  75;
+    <FK10> =  76;
+    <FK11> =  95;
+    <FK12> =  96;
+
+    <PRSC> = 111;
+    <SCLK> =  78;
+    <PAUS> = 110;
+
+    <INS>  = 106;
+    <HOME> =  97;
+    <PGUP> =  99;
+    <DELE> = 107;
+    <END>  = 103;
+    <PGDN> = 105;
+
+    <UP>   =  98;
+    <LEFT> = 100;
+    <DOWN> = 104;
+    <RGHT> = 102;
+
+    <NMLK> =  77;
+    <KPDV> = 112;
+    <KPMU> =  63;
+    <KPSU> =  82;
+
+    <KP7>  =  79;
+    <KP8>  =  80;
+    <KP9>  =  81;
+    <KPAD> =  86;
+
+    <KP4>  =  83;
+    <KP5>  =  84;
+    <KP6>  =  85;
+
+    <KP1>  =  87;
+    <KP2>  =  88;
+    <KP3>  =  89;
+    <KPEN> = 108;
+
+    <KP0>  =  90;
+    <KPDL> =  91;
+
+    <STOP> = 232;
+    <AGAI> = 133;
+    <PROP> = 134;
+    <UNDO> = 135;
+    <FRNT> = 140;
+    <COPY> = 248;
+    <OPEN> = 191;
+    <PAST> = 192;
+    <FIND> = 122;
+    <CUT>  = 188;
+
+    <HELP> = 245;
+
+    <MUTE> = 160;
+    <VOL-> = 174;
+    <VOL+> = 176;
+    <POWR> = 222;
+
+    indicator 1 = "Caps Lock";
+    indicator 2 = "Num Lock";
+    indicator 3 = "Scroll Lock";
+    indicator 4 = "Compose";
+};
+
+xkb_keycodes "type6_euro_usb" {
+    include "sun(type6_usb)"
+    <LSGT> =  94;	// 104 ?
+};
+
--- xkb/symbols/sun/us.orig	2004-11-18 16:43:50.000000000 -0800
+++ xkb/symbols/sun/us	2004-12-08 17:24:14.737430490 -0800
@@ -245,18 +245,54 @@
     key <COMP> {       [       Multi_key       ]       };
 
     // Begin "Function" section
-    key <FK01> {       [       F1      ]       };
-    key <FK02> {       [       F2      ]       };
-    key <FK03> {       [       F3      ]       };
-    key <FK04> {       [       F4      ]       };
-    key <FK05> {       [       F5      ]       };
-    key <FK06> {       [       F6      ]       };
-    key <FK07> {       [       F7      ]       };
-    key <FK08> {       [       F8      ]       };
-    key <FK09> {       [       F9      ]       };
-    key <FK10> {       [       F10     ]       };
-    key <FK11> {       [       F11     ]       };
-    key <FK12> {       [       F12     ]       };
+    key <FK01> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F1,	XF86_Switch_VT_1 ]
+    };
+    key <FK02> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F2,	XF86_Switch_VT_2 ]
+    };
+    key <FK03> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F3,	XF86_Switch_VT_3 ]
+    };
+    key <FK04> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F4,	XF86_Switch_VT_4 ]
+    };
+    key <FK05> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F5,	XF86_Switch_VT_5 ]
+    };
+    key <FK06> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F6,	XF86_Switch_VT_6 ]
+    };
+    key <FK07> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F7,	XF86_Switch_VT_7 ]
+    };
+    key <FK08> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F8,	XF86_Switch_VT_8 ]
+    };
+    key <FK09> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F9,	XF86_Switch_VT_9 ]
+    };
+    key <FK10> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F10,	XF86_Switch_VT_10 ]
+    };
+    key <FK11> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F11,	XF86_Switch_VT_11 ]
+    };
+    key <FK12> {
+        type="CTRL+ALT",
+        symbols[Group1]= [ F12,	XF86_Switch_VT_12 ]
+    };
     // End "Function" section
 
     // Begin "Editing" section
--- xkb/geometry/sun.orig	2004-11-18 16:43:47.000000000 -0800
+++ xkb/geometry/sun	2004-12-08 18:35:42.317021102 -0800
@@ -162,6 +162,7 @@
     // keyboard.  I just took a similar layout (101 key PC keyboard)
     // and adjusted the sizes.
 
+    // Sun Type6 US keyboard (PN 320-1270, PN 320-1271) is identical.
     description= "Sun Type5 keyboard";
 
     width= 515;
@@ -459,6 +460,7 @@
     // keyboard.  I just took a similar layout (101 key PC keyboard)
     // and adjusted the sizes.
 
+    // Sun Type6 US/UNIX keyboard (PN 320-1272, PN 320-1273) is identical.
     description= "Sun Type5 Unix keyboard";
 
     width= 515;
@@ -467,9 +469,8 @@
     shape "EDGE" { cornerRadius= 2, { [ 515, 170 ] } };
     shape.cornerRadius= 1;
     shape "NORM" { { [ 18,18] }, { [2,1], [16,17] } };
-    shape "BKSP" { { [ 27,18] }, { [2,1], [25,17] } };
+    shape "BKSP" { { [ 28,18] }, { [2,1], [26,17] } };
     shape "TABK" { { [ 27,18] }, { [2,1], [25,17] } };
-    shape "BKSL" { { [ 27,18] }, { [2,1], [25,17] } };
     shape "RTRN" { { [ 42,18] }, { [2,1], [40,17] } };
     shape "CAPS" { { [ 32,18] }, { [2,1], [30,17] } };
     shape "LFSH" { { [ 42,18] }, { [2,1], [40,17] } };
@@ -540,7 +541,7 @@
 	    keys { <OPEN>, <PAST>, { <LFSH>, 9 , shape="LFSH" }, 
 		   <AB01>, <AB02>, <AB03>, <AB04>, <AB05>, 
 		   <AB06>, <AB07>, <AB08>, <AB09>, <AB10>, 
-		 { <RTSH>, "RTSH", color="grey20" }
+		 { <RTSH>, "RTSH" }
 	    };
 	};
 	row {
@@ -584,7 +585,7 @@
 	};
 	row {
 	    top= 20;
-	    keys { <KP7>, <KP8>, <KP9>, { <KPAD>, "KPAD", color= "grey20" } };
+	    keys { <KP7>, <KP8>, <KP9>, { <KPAD>, "KPAD" } };
 	};
 	row {
 	    top= 39;
@@ -592,7 +593,7 @@
 	};
 	row {
 	    top= 58;
-	    keys { <KP1>, <KP2>, <KP3>, { <KPEN>, "KPAD", color= "grey20" } };
+	    keys { <KP1>, <KP2>, <KP3>, { <KPEN>, "KPAD" } };
 	};
 	row {
 	    top= 77;        
   
   
--         
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email       
   
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-bugzilla-noise mailing list