# alt and alt-gr not working anymore

## zerb

Hi all,

i experienced the weirdest problem ever today.

After some up- and downgrading on a friends gentoo, alt and alt-tab stopped working.

Well, they do work, but looking at showkeys output, it looks like everytime i hit alt or alt-gr there are about 10-15 random keycodes sent, producing a whole lot of garbage and (very) unexpected behavior.

This has nothing to do with X. In happens in consoles and X, so it seems like the problem is a little deeper than just keymaps (i already reemerged kbd) or x. It has nothing to do with rc.conf or keymaps at all. Seems like the problem's roots are in kernel-land.

Has anyone experienced anything similar?

Cheers,

Ben

----------

## zerb

*bump*

----------

## andip

got the same problem. none of my "alt-gr chars" are working in X/KDE, but they do work when i'm in console.

i'm not sure about the random keycodes you mention, but all i get when pressing alt-gr and 2, for instance, i get "arg 2" in xterm, instead of @

also, delete works as backspace

----------

## zerb

Well, i know now that my problem was a hardware one.

Your's seeems to be related to the keyboard setting in xorg.conf. There are a whole bunch of posts about these.  :Smile: 

----------

## polle

I had that also (couldn't use AltGr neither in X or console) with me it was caused by upgrade of xorg.

to check this, try in console this command:

md5sum /usr/X11R6/bin/xkbcomp /usr/X11R6/lib/X11/xkb/xkbcomp

if the result is different, then there is your problem

----------

## cluster one

I think there's a file for that. I'm not on my linux box right now, but there are config settings in /etc (the main /etc dir) that designate the keyboard map. It'd have to be an x-only setting if you've not got the problem on the console.

----------

## andip

i'm still using xfree, so it's got nothing to do with xorg at least  :Wink: 

the strange thing is that is just stopped working last week, so it's gotta be some kind of update that have done it. strange that not more people have, or have had, the same problem.

----------

## cluster one

/etc/rc.conf has it for both xorg and xfree, the variable's called Xkblayout, I think. The commenting's good enough it's pretty obvious anyway. The file'll get changed if you re-emerge a bunch of stuff, and if you just automerged everything with etc-update it might have changed .

----------

## Gex

After an update my AltGR isn`t working anymore, too. 

I can´t find any entry in my rc.conf regarding Xkblayout.

md5sum /usr/X11R6/bin/xkbcomp /usr/X11R6/lib/X11/xkb/xkbcomp 

shows no error..

Any ideas for a solution?

----------

## Gex

found this solution:

cp /usr/X11R6/bin/xkbcomp /usr/X11R6/lib/X11/xkb 

in that thread

https://forums.gentoo.org/viewtopic.php?t=252018&highlight=xkbcomp

and it worked for me  :Wink: 

----------

## forbjok

I've had that problem with every xorg 6.8 (i think that was the version) install. Apparently the ebuild is slightly broken, so the xkbcomp file in /usr/X11R6/lib/X11/xkb/ at the end of the installation is just a zero-byte file. It probably should've been a symlink or something.

----------

## cluster one

The variable in /etc/rc.conf is called KEYMAP; it's probably set to "us", which do not have AltGr on their keyboards. I'm not sure what the code for germany is, but the files are in /usr/share/keymaps and are very easily viewable. The commenting in them is decent, too, so finding the proper map shouldn't be too difficult.

----------

