Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sun type 5 keyboard on an ultra 10
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
simon_6162
n00b
n00b


Joined: 07 Jul 2005
Posts: 8

PostPosted: Thu Jul 07, 2005 1:08 am    Post subject: Sun type 5 keyboard on an ultra 10 Reply with quote

Hello all,

This is my first play about with gentoo on a sparc machine and so far it looks really impressive. I've compiled a 2.4.31 kernel and got everything running on in a terminal.

I've installed xorg xorg-x11-6.8.2-r1 along with gnome. The problem I have is that all my keys along the top row of my type5 keyboard seem out of place. eg pressing r prints t, and then the bottom row of keys is completely wrong.

Attached is my keyboard section from my xorg.conf file.

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "Protocol" "Standard"
Option "XkbKeycodes" "sun(type5)"
Option "XkbModel" "type5"
Option "XkbRules" "sun"
Option "XkbLayout" "en_US"
Option "XkbTypes" "types/complete"
Option "XkbCompat" "compat/complete"
Option "XkbGeometry" "sun(type5unix)"
EndSection

Is there a simple solution to this ? If not can any one tell me how you get the key codes from the keyboard and if it is possible to make a new keymap file.

Thanks for you time

Simon
Back to top
View user's profile Send private message
simon_6162
n00b
n00b


Joined: 07 Jul 2005
Posts: 8

PostPosted: Fri Jul 08, 2005 1:51 am    Post subject: Reply with quote

Well to answer my own question I re-mapped the keyboard so that the x events my keyboard is sending are now mapped to match the symbols that I want.

If people have the same problem replace /usr/lib/X11/xkb/keycodes/sun with the one below!

If people need this for a type 4 keyboard it should be the same as 5 however here is how I created the type5

Start x and running xev from a terminal (i had to use the mouse to copy and paste letters from a mozilla page into gnomes run command then note down all the keys and there matching keycodes on a piece of paper.

Now exit X and edit
/usr/lib/X11/xkb/keycodes/sun

on a second terminal open (eg ctrl + alt + F2)
/usr/lib/X11/xkb/symbols/sun/us

Use the second file to find the key reference (eg F1 is knows to xorg as FK01)
then go to the first file and edit the keycode to match FK01

When you have finished this you need to edit the min and max at the top of the keycodes section so they reflext the smallest and largest keycodes you keyboad sends.

I hope this helps Allot of people :D

Regards

Simon




// $Xorg: sun,v 1.4 2001/02/09 02:05:52 xorgcvs Exp $
//
//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.
//
// $XFree86: xc/programs/xkbcomp/keycodes/sun,v 3.5 2001/12/14 20:02:00 dawes Exp $
//
//
//
//
//
//
//
//
//
//
//
//###############################################################################
// Modified Simon Dible 8th July 2005
// Remaped sun type 5 for gentoo 2.4.31 kernel with
// xorg-x11 6.8.2........
// using keyboard driver
// I have used xev to get the keycodes being sent and then mapped them to the current keys.
// All I can say is this works for me
// This solves the problem of most of the keys being displaced by one.
//###############################################################################

default xkb_keycodes "type4" {

minimum= 8;
maximum= 132;

<ESC> = 36;
<AE01> = 37;
<AE02> = 38;
<AE03> = 39;
<AE04> = 40;
<AE05> = 41;
<AE06> = 42;
<AE07> = 43;
<AE08> = 44;
<AE09> = 45;
<AE10> = 46;
<AE11> = 47;
<AE12> = 48;
<TLDE> = 49;
<BKSP> = 50;

<TAB> = 60;
<AD01> = 61;
<AD02> = 62;
<AD03> = 63;
<AD04> = 64;
<AD05> = 65;
<AD06> = 66;
<AD07> = 67;
<AD08> = 68;
<AD09> = 69;
<AD10> = 70;
<AD11> = 71;
<AD12> = 72;
<DELE> = 73;

<LCTL> = 83;
<AC01> = 84;
<AC02> = 85;
<AC03> = 86;
<AC04> = 87;
<AC05> = 88;
<AC06> = 89;
<AC07> = 90;
<AC08> = 91;
<AC09> = 92;
<AC10> = 93;
<AC11> = 94;
<BKSL> = 95;
<RTRN> = 96;

<LFSH> = 106;
<AB01> = 107;
<AB02> = 108;
<AB03> = 109;
<AB04> = 110;
<AB05> = 111;
<AB06> = 112;
<AB07> = 113;
<AB08> = 114;
<AB09> = 115;
<AB10> = 116;
<RTSH> = 117;
<LNFD> = 118;

<HELP> = 125;
<CAPS> = 126;
<LALT> = 26;
<LMTA> = 127;
<SPCE> = 128;
<RMTA> = 129;
<COMP> = 74;
<ALGR> = 20;
alias <RALT> = <ALGR>;

<FK01> = 12;
<FK02> = 13;
<FK03> = 15;
<FK04> = 17;
<FK05> = 19;
<FK06> = 21;
<FK07> = 23;
<FK08> = 24;
<FK09> = 25;
<FK10> = 14;
<FK11> = 16;
<FK12> = 18;

<STOP> = 8;
<AGAI> = 10;
<PROP> = 32;
<UNDO> = 33;
<FRNT> = 56;
<COPY> = 58;
<OPEN> = 79;
<PAST> = 80;
<FIND> = 102;
<CUT> = 104;

<PRSC> = 29;
<SCLK> = 30;
<PAUS> = 28;

<NMLK> = 105;
<KPEQ> = 52;
<KPDV> = 53;
<KPMU> = 54;
<KPSU> = 78;

<KP7> = 75;
<KP8> = 76;
<KP9> = 77;
<KPAD> = 132;

<KP4> = 98;
<KP5> = 99;
<KP6> = 100;

<KP1> = 119;
<KP2> = 120;
<KP3> = 121;
<KPEN> = 97;

<KP0> = 101;
<KPDL> = 57;
indicator 4 = "Caps Lock";
indicator 3 = "Compose";
indicator 2 = "Scroll Lock";
indicator 1 = "Num Lock";
};

xkb_keycodes "type5" {

minimum= 8;
maximum= 224;

<ESC> = 37;
<AE01> = 38;
<AE02> = 39;
<AE03> = 40;
<AE04> = 41;
<AE05> = 42;
<AE06> = 43;
<AE07> = 44;
<AE08> = 45;
<AE09> = 46;
<AE10> = 47;
<AE11> = 48;
<AE12> = 49;
<TLDE> = 50;
<BKSP> = 51;

<TAB> = 61;
<AD01> = 62;
<AD02> = 63;
<AD03> = 64;
<AD04> = 65;
<AD05> = 66;
<AD06> = 67;
<AD07> = 68;
<AD08> = 69;
<AD09> = 70;
<AD10> = 71;
<AD11> = 72;
<AD12> = 73;
<DELE> = 74;
<COMP> = 75;
<ALGR> = 21;
alias <RALT> = <ALGR>;

<LCTL> = 84;
<AC01> = 85;
<AC02> = 86;
<AC03> = 87;
<AC04> = 88;
<AC05> = 89;
<AC06> = 90;
<AC07> = 91;
<AC08> = 111;
<AC09> = 93;
<AC10> = 94;
<AC11> = 95;
<BKSL> = 96;
<RTRN> = 157;

<LFSH> = 190;
<AB01> = 191;
<AB02> = 192;
<AB03> = 193;
<AB04> = 198;
<AB05> = 199;
<AB06> = 200;
<AB07> = 201;
<AB08> = 203;
<AB09> = 204;
<AB10> = 205;
<RTSH> = 206;

<LALT> = 27;
<CAPS> = 127;
<LMTA> = 128;
<SPCE> = 129;
<RMTA> = 130;

<FK01> = 13;
<FK02> = 14;
<FK03> = 16;
<FK04> = 18;
<FK05> = 20;
<FK06> = 22;
<FK07> = 24;
<FK08> = 25;
<FK09> = 26;
<FK10> = 15;
<FK11> = 17;
<FK12> = 19;
<STOP> = 9;
<AGAI> = 11;
<PROP> = 33;
<UNDO> = 34;
<FRNT> = 57;
<COPY> = 59;
<OPEN> = 80;
<PAST> = 81;
<FIND> = 184;
//<CUT> = 104;

<PRSC> = 30;
<SCLK> = 31;
<PAUS> = 29;

<NMLK> = 189;
<KPDV> = 54;
<KPMU> = 55;
<KPSU> = 79;

<KP7> = 76;
<KP8> = 77;
<KP9> = 78;
<KPAD> = 133;

<KP4> = 181;
<KP5> = 126;
<KP6> = 182;

<KP1> = 208;
<KP2> = 209;
<KP3> = 210;
<KPEN> = 170;

<KP0> = 183;
<KPDL> = 58;

<UP> = 28;
<LEFT> = 32;
<DOWN> = 35;
<RGHT> = 36;

<INS> = 52;
<HOME> = 60;
<END> = 82;
<PGUP> = 224;
<PGDN> = 131;
<HELP> = 221;

<MUTE> = 53;
<VOL-> = 10;
<VOL+> = 12;
<POWR> = 56;
indicator 4 = "Caps Lock";
indicator 3 = "Compose";
indicator 2 = "Scroll Lock";
indicator 1 = "Num Lock";
};

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";
};

xkb_keycodes "type4_euro" {
include "sun(type4)"
<LSGT> = 131;
};

xkb_keycodes "type5_euro" {
include "sun(type5)"
<LSGT> = 131;
};

xkb_keycodes "type6_euro" {
include "sun(type6)"
<LSGT> = 94;
};

xkb_keycodes "type5_se" {

minimum= 8;
maximum= 132;

// Row G
<HELP> = 125;
//
<ESC> = 36;
//
<FK01> = 12;
<FK02> = 13;
<FK03> = 15;
<FK04> = 17;
//
<FK05> = 19;
<FK06> = 21;
<FK07> = 23;
<FK08> = 24;
//
<FK09> = 25;
<FK10> = 14;
<FK11> = 16;
<FK12> = 18;
//
<PRSC> = 29;
<SCLK> = 30;
<PAUS> = 28;
//
<MUTE> = 52;
<VOL-> = 9;
<VOL+> = 11;
<POWR> = 55;
// End Row G

// Row F
//
// End Row F

// Row E
<STOP> = 8;
<AGAI> = 10;
//
<AE00> = 49;
alias <TLDE> = <AE00>;
<AE01> = 37;
<AE02> = 38;
<AE03> = 39;
<AE04> = 40;
<AE05> = 41;
<AE06> = 42;
<AE07> = 43;
<AE08> = 44;
<AE09> = 45;
<AE10> = 46;
<AE11> = 47;
<AE12> = 48;
<BKSP> = 50;
//
<INS> = 51;
<HOME> = 59;
<PGUP> = 103;
//
<NMLK> = 105;
<KPDV> = 53;
<KPMU> = 54;
<KPSU> = 78;
//End Row E

// Row D
<PROP> = 32;
<UNDO> = 33;
//
<AD00> = 60;
alias <TAB> = <AD00>;
<AD01> = 61;
<AD02> = 62;
<AD03> = 63;
<AD04> = 64;
<AD05> = 65;
<AD06> = 66;
<AD07> = 67;
<AD08> = 68;
<AD09> = 69;
<AD10> = 70;
<AD11> = 71;
<AD12> = 72;
//
<DELE> = 73;
<END> = 81;
<PGDN> = 130;
//
<KP7> = 75;
<KP8> = 76;
<KP9> = 77;
<KPAD> = 132;
// End Row D

// Row C
<FRNT> = 56;
<COPY> = 58;
//
<AC00> = 126;
alias <CAPS> = <AC00>;
<AC01> = 84;
<AC02> = 85;
<AC03> = 86;
<AC04> = 87;
<AC05> = 88;
<AC06> = 89;
<AC07> = 90;
<AC08> = 91;
<AC09> = 92;
<AC10> = 93;
<AC11> = 94;
<AC12> = 95;
alias <BKSL> = <AC12>;
<RTRN> = 96;
//
<KP4> = 98;
<KP5> = 99;
<KP6> = 100;
// End Row C

// Row B
<OPEN> = 79;
<PAST> = 80;
//
<LFSH> = 106;
<AB00> = 131;
alias <LSGT> = <AB00>;
<AB01> = 107;
<AB02> = 108;
<AB03> = 109;
<AB04> = 110;
<AB05> = 111;
<AB06> = 112;
<AB07> = 113;
<AB08> = 114;
<AB09> = 115;
<AB10> = 116;
<RTSH> = 117;
//
<UP> = 27;
//
<KP1> = 119;
<KP2> = 120;
<KP3> = 121;
<KPEN> = 97;
// End Row B

// Row A
<FIND> = 102;
<CUT> = 104;
//
<LCTL> = 83;
<LALT> = 26;
<LMTA> = 127;
<SPCE> = 128;
<RMTA> = 129;
<COMP> = 74;
<ALGR> = 20;
alias <RALT> = <ALGR>;
//
<LEFT> = 31;
<DOWN> = 34;
<RGHT> = 35;
//
<KP0> = 101;
<KPDL> = 57;
// End Row A

indicator 4 = "Caps Lock";
indicator 3 = "Compose";
indicator 2 = "Scroll Lock";
indicator 1 = "Num Lock";
};

xkb_keycodes "type5c_se" {
include "sun(type5_se)"
};

xkb_keycodes "type4__se" {

minimum= 8;
maximum= 132;

// Row F
<STOP> = 8;
<AGAI> = 10;
//
<FK01> = 12;
<FK02> = 13;
<FK03> = 15;
<FK04> = 17;
<FK05> = 19;
<FK06> = 21;
<FK07> = 23;
<FK08> = 24;
<FK09> = 25;
<FK10> = 14;
<FK11> = 16;
<FK12> = 18;
<AF13> = 95;
alias <TLDE> = <AF13>;
<AF14> = 22;
<DELE> = 73;
//
<PAUS> = 28;
<PRSC> = 29;
<SCLK> = 30;
<NMLK> = 105;
// End Row F

// Row E
<PROP> = 32;
<UNDO> = 33;
//
<AE00> = 36;
alias <ESC> = <AE00>;
<AE01> = 37;
<AE02> = 38;
<AE03> = 39;
<AE04> = 40;
<AE05> = 41;
<AE06> = 42;
<AE07> = 43;
<AE08> = 44;
<AE09> = 45;
<AE10> = 46;
<AE11> = 47;
<AE12> = 48;
<BKSP> = 50;
//
<KPEQ> = 52;
<KPDV> = 53;
<KPMU> = 54;
<KPSU> = 78;
// End Row E

// Row D
<FRNT> = 56;
<COPY> = 58;
//
<AD00> = 60;
alias <TAB> = <AD00>;
<AD01> = 61;
<AD02> = 62;
<AD03> = 63;
<AD04> = 64;
<AD05> = 65;
<AD06> = 66;
<AD07> = 67;
<AD08> = 68;
<AD09> = 69;
<AD10> = 70;
<AD11> = 71;
<AD12> = 72;
//
<KP7> = 75;
<KP8> = 76;
<KP9> = 77;
<KPAD> = 132;
// End Row D

// Row C
<OPEN> = 79;
<PAST> = 80;
//
<AC00> = 83;
// alias <CAPS> = <AC00>;
<AC01> = 84;
<AC02> = 85;
<AC03> = 86;
<AC04> = 87;
<AC05> = 88;
<AC06> = 89;
<AC07> = 90;
<AC08> = 91;
<AC09> = 92;
<AC10> = 93;
<AC11> = 94;
<AC12> = 49;
alias <BKSL> = <AC12>;
<RTRN> = 96;
//
<KP4> = 98;
<KP5> = 99;
<KP6> = 100;
// End Row C

// Row B
<FIND> = 102;
<CUT> = 104;
//
<LFSH> = 106;
<AB00> = 131;
alias <LSGT> = <AB00>;
<AB01> = 107;
<AB02> = 108;
<AB03> = 109;
<AB04> = 110;
<AB05> = 111;
<AB06> = 112;
<AB07> = 113;
<AB08> = 114;
<AB09> = 115;
<AB10> = 116;
<RTSH> = 117;
<LNFD> = 118;
//
<KP1> = 119;
<KP2> = 120;
<KP3> = 121;
<KPEN> = 97;
// End Row B

// Row A
<HELP> = 125;
//
<AA00> = 126;
// alias <LCTL> = <AA00>;
<LALT> = 26;
<LMTA> = 127;
<SPCE> = 128;
<RMTA> = 129;
<COMP> = 74;
<ALGR> = 20;
alias <RALT> = <ALGR>;
//
<KP0> = 101;
<KPDL> = 57;
// End Row A

indicator 4 = "Caps Lock";
indicator 3 = "Compose";
indicator 2 = "Scroll Lock";
indicator 1 = "Num Lock";
};

xkb_keycodes "type4_se" {

include "sun(type4__se)"

alias <LCTL> = <AA00>;
alias <CAPS> = <AC00>;
};

xkb_keycodes "type4_se_swapctl" {

include "sun(type4__se)"

alias <LCTL> = <AC00>;
alias <CAPS> = <AA00>;
};
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum