Sign in to follow this  
Valderman

Gentoo Linux keyboard issues

Recommended Posts

Valderman    513
I've already posted this to the Gentoo forums, with no luck. Perhaps someone here can help. After a long period of using Debian, I thought I'd check up on how things are in the Gentoo world again, and almost immediately I ran into a few keyboard issues. I'm using a Swedish keyboard layout, and GNOME for my desktop environment. Recently installed modular X.org, which seems to be the direct cause of problem 2. First off, I seem completely unable to use the characters Å, Ä and Ö (would be aring, auml and ouml in HTML) in gnome-terminal. I haven't had the opportunity to try with other terminals yet. This seems Gentoo-specific, as I've never experienced it before with any other dist. Second, and this one appeared after installing modular X.org, my Alt Gr key doesn't work on the login screen. It works just fine after login though, and all other keys seem to work. This problem seems quite universal to modular X.org, as I've experienced it with several dists and modular X. [SOLVED] Third, and this isn't related to X, but I thought it better to gather all the issues in one thread, in the "normal" text only console, I can't use arrow keys, backspace, delete, etc. However, Å, Ä and Ö works quite fine. This is another Gentoo specific. Fourth, I get the same error message as this guy when starting GNOME or fiddling with the keyboard config through the GNOME control panel, except, obviously, it's in English. It doesn't seem to cause any trouble other than the two problems I first mentioned. The relevant section from xorg.conf:
Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "keyboard"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "se"
EndSection
In rc.conf, UNICODE is set to "yes". KEYMAP is set to "sv-latin1". CONSOLEFONT is set to "iso01.14". If there are any other config files or variables related, please do tell. I don't know what more info to include, however. If I did, I might be able to solve the problem myself. [Edited by - Valderman on March 14, 2006 6:44:25 AM]

Share this post


Link to post
Share on other sites
Valderman    513
Nothing in there solved the problems with Xorg. On the brighter side of things, I managed to get the text only console working as intended. One down, three to go.

Share this post


Link to post
Share on other sites
__filip    218
A simple (but prehaps not the best) way to get swedish characters is to create a file called .Xmodmap in your home directory (I've only tried it with slackware) with the following content:


! Xmodmap.sw: Swedish keyboard setup for IBM PC

! AltGr selects the modifier map 1 (mod1)
! Alt prepends an ESC to each pressed key (two characters sent)

clear mod1
! keysym Alt_R = Mode_switch
add mod1 = Alt_L
add mod5 = Mode_switch

! Keysyms suitable for a swedish keyboard (Ändrad av Erik Jonsson)

keycode 8 =
!keycode 9 = Escape
keycode 9 = backslash braceleft braceright slash
keycode 10 = 1 exclam paragraph onesuperior
keycode 11 = 2 quotedbl at twosuperior
keycode 12 = 3 numbersign sterling threesuperior
keycode 13 = 4 currency dollar cent
keycode 14 = 5 percent parenleft guillemotright
keycode 15 = 6 ampersand parenright guillemotleft
keycode 16 = 7 slash braceleft greater
keycode 17 = 8 parenleft bracketleft less
keycode 18 = 9 parenright bracketright brokenbar
keycode 19 = 0 equal braceright bar
keycode 20 = plus question backslash plusminus
keycode 21 = dead_acute dead_grave acute grave
keycode 22 = BackSpace
keycode 23 = Tab
keycode 24 = q Q agrave
keycode 25 = w W ediaeresis
keycode 26 = e E ecircumflex
keycode 27 = r R registered copyright
keycode 28 = t T thorn
keycode 29 = y Y yacute
keycode 30 = u U udiaeresis
keycode 31 = i I iacute
keycode 32 = o O ocircumflex
keycode 33 = p P bracketleft braceleft
keycode 34 = aring Aring bracketright braceright
keycode 35 = dead_diaeresis dead_circumflex dead_tilde
keycode 36 = Return
keycode 37 = Control_L
keycode 38 = a A exclamdown acircumflex
keycode 39 = s S ssharp asciicircum
keycode 40 = d D eth
keycode 41 = f F ordfeminine masculine
keycode 42 = g G degree asciitilde
keycode 43 = h H eacute
keycode 44 = j J egrave
keycode 45 = k K ograve
keycode 46 = l L oacute
keycode 47 = odiaeresis Odiaeresis oslash
keycode 48 = adiaeresis Adiaeresis ae
keycode 49 = section onehalf onequarter threequarters
keycode 50 = Shift_L
keycode 51 = apostrophe asterisk grave asciitilde
keycode 52 = z Z questiondown diaeresis
keycode 53 = x X multiply division
keycode 54 = c C ccedilla Ccedilla
keycode 55 = v V ucircumflex
keycode 56 = b B notsign aacute
keycode 57 = n N ntilde Ntilde
keycode 58 = m M mu
keycode 59 = comma semicolon less grave
keycode 60 = period colon greater acute
keycode 61 = minus underscore hyphen macron
keycode 62 = Shift_R
keycode 63 = KP_Multiply KP_Multiply KP_Divide KP_Divide
keycode 64 = Alt_L
keycode 65 = space
keycode 66 = Escape
!keycode 66 = Control_L XF86ModeLock
keycode 67 = F1 F11
keycode 68 = F2 F12
keycode 69 = F3 F13
keycode 70 = F4 F14
keycode 71 = F5 F15
keycode 72 = F6 F16
keycode 73 = F7 F17
keycode 74 = F8 F18
keycode 75 = F9 F19
keycode 76 = F10 F20
keycode 77 = Num_Lock
keycode 78 = Scroll_Lock
!keycode 79 = Home KP_7 KP_7 Home
keycode 79 = braceleft KP_7 KP_7 braceleft
!keycode 80 = Up KP_8 KP_8 Up
keycode 80 = backslash KP_8 KP_9 backslash
!keycode 81 = Prior KP_9 KP_9 Prior
keycode 81 = braceright KP_9 KP_9 Prior
keycode 82 = KP_Subtract KP_Subtract KP_Add KP_Add
!keycode 83 = Left KP_4 KP_4 Left
keycode 83 = guillemotright KP_4 KP_4 guillemotright
keycode 84 = asciitilde KP_5 KP_5 asciitilde
!keycode 84 = Begin KP_5 KP_5 F7
!keycode 84 = Meta_R KP_5 KP_5 F7
keycode 85 = guillemotleft KP_6 KP_6 guillemotleft
!keycode 85 = Right KP_6 KP_6 Right
keycode 86 = KP_Add equal KP_Add KP_Add
!keycode 87 = End KP_1 KP_1 End
keycode 87 = bracketleft KP_1 KP_1 End
!keycode 88 = Down KP_2 KP_2 Down
keycode 88 = at KP_2 KP_2 Down
!keycode 89 = Next KP_3 KP_3 Next
keycode 89 = bracketright KP_3 KP_3 Next
keycode 90 = Insert KP_0 KP_0 Insert
!keycode 90 = parenleft KP_0 KP_0 Insert
keycode 91 = Delete KP_Decimal KP_Decimal Delete
!keycode 91 = parenright KP_Decimal KP_Decimal Delete
!keycode 92 = 0x1007ff00
keycode 93 =
keycode 94 = less greater bar backslash
keycode 95 = F11
keycode 96 = F12
keycode 97 = Home
keycode 98 = Up
keycode 99 = Prior
keycode 100 = Left
keycode 101 = Begin
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
!keycode 106 = Insert
keycode 106 = Escape
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Caps_Lock
!keycode 110 = Pause
keycode 111 = grave acute asciitilde asciicircum
!keycode 111 = Print
keycode 112 = KP_Divide KP_Divide backslash backslash
keycode 113 = Mode_switch
!keycode 113 = AltGr
keycode 114 = Break
keycode 115 = slash braceleft bracketleft asciitilde
!keycode 115 = vaenster win95
keycode 116 = backslash braceright bracketright asciicircum
!keycode 116 = hoeger win95
keycode 117 = Escape
!keycode 117 = win95 startlista


! Override some of the above settings to make the
! "feel" of the keyboard more comfortable (IMHO)

! Set Control_L to Caps_Lock
! Set Caps_Lock to Control_L

keycode 37 = Control_L
!keycode 66 = Control_L
keycode 110 = Caps_Lock
keycode 117 = Escape
!keycode 9 = Caps_Lock
clear Lock
clear Control
add Lock = Caps_Lock
add Control = Control_L Control_R

! Set backspace (left arrow) to delete
! (Backspace is still available via C-h.)

! keycode 22 = Delete

! Move Escape "closer" to the left hand

! keycode 9 = section onehalf
! keycode 49 = Escape



Share this post


Link to post
Share on other sites
Valderman    513
Thanks, that worked like a charm! I don't suppose there's a way to apply such a file system wide?

The dialog in #4 still bitches at me at login though, and I think I might be on to something. X.org 7 has a bit different directory structure from previous versions, is there a possibility that someone forgot to move some keyboard-related files?
Where would such files be located under the old (X.org 6.9.0 and earlier) structure? perhaps I'd find something if I went poking around there for a bit.

Share this post


Link to post
Share on other sites
Sign in to follow this