You are not logged in.

#1 2012-03-07 15:49:33

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

[Solved] Alt Gr not work in LXDE

I have no such issue in XFCE4 of KDE, but in LXDE (only thing concern me using LXDE, otherwise I love using it)
example: Alt Gr + V, Alt Gr + F etc. are characters I use everyday.. But cant type them.
My keyboard layout is Bosnian, bs (in tooltip it shows me: "Serbian (latin)") lol but anyway.. Do you maybe know what could be a problem? LXDE bug?

Thanks.


Edit: I had same problem in XFCE because the shortcut to change layout was ALT Gr + (somekey), so I disabled it to get Alt Gr work, but I just cant find a way to disable that shortcut in LXDE (I just guess its same issue in LXDE as it was in XFCE)

Last edited by broi (2012-03-10 11:00:10)

Offline

#2 2012-03-07 16:45:05

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

Keyboard shortcuts for LXDE are specified in ~/.config/openbox/lxde-rc.xml. But I don't think that'll be the issue here.

Do you still have the issue after you run the following?

# setxkbmap ba

Burninate!

Offline

#3 2012-03-07 16:55:18

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Gcool wrote:

Keyboard shortcuts for LXDE are specified in ~/.config/openbox/lxde-rc.xml. But I don't think that'll be the issue here.

Thank you, I already checked it out and there are many shortcuts like Alt+F4, Alt+Tab, which are usual in KDE and XFCE.. but no clue of AltGR+something which I would try to remove, like I did in XFCE, soo, no issue there as u said..

Gcool wrote:

Do you still have the issue after you run the following?

# setxkbmap ba

Yes

Offline

#4 2012-03-07 18:05:19

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

Would it be possible to post the content of the following files?

/etc/X11/xorg.conf
/etc/X11/xorg.conf.d/10-evdev.conf


Burninate!

Offline

#5 2012-03-07 18:27:44

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Gcool wrote:

Would it be possible to post the content of the following files?

/etc/X11/xorg.conf
/etc/X11/xorg.conf.d/10-evdev.conf

/etc/X11/xorg.conf is empty.
/etc/X11/xorg.conf.d/10-evdev-conf:

#
# Catch-all evdev loader for udev-based systems
# We don't simply match on any device since that also adds accelerometers
# and other devices that we don't really want to use. The list below
# matches everything but joysticks.

Section "InputClass"
        Identifier "evdev pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Offline

#6 2012-03-07 19:20:43

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

LXDE normally gets its keyboard settings directly from your Xorg config. Could you try changing...

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

to...

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "ba"
EndSection

Change "ba" to whatever your desired keyboard layout is obviously (it shows as being the Bosnian layout in the Xorg docs). Restart X for the changes to take effect. If this doesn't change anything; perhaps also use xev to see which keycode your AltGr key maps to and check with "xmodmap -pke" to see if it's perhaps mapped to anything.


Burninate!

Offline

#7 2012-03-07 20:21:58

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Gcool wrote:

LXDE normally gets its keyboard settings directly from your Xorg config. Could you try changing...

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

to...

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "ba"
EndSection

Change "ba" to whatever your desired keyboard layout is obviously (it shows as being the Bosnian layout in the Xorg docs). Restart X for the changes to take effect. If this doesn't change anything; perhaps also use xev to see which keycode your AltGr key maps to and check with "xmodmap -pke" to see if it's perhaps mapped to anything.

adding Option "XkbLayout" "ba" not helps... hmm but anyway thanks for time and info!

This is output when I press AltGR in xev

KeyPress event, serial 46, synthetic NO, window 0x1e00001,
    root 0x196, subw 0x0, time 1039952, (226,184), root:(389,602),
    state 0x10, keycode 108 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

PropertyNotify event, serial 46, synthetic NO, window 0x1e00001,
    atom 0x18a (_NET_WM_ICON_GEOMETRY), time 1039961, state PropertyNewValue

PropertyNotify event, serial 46, synthetic NO, window 0x1e00001,
    atom 0x18a (_NET_WM_ICON_GEOMETRY), time 1039969, state PropertyNewValue

KeyRelease event, serial 46, synthetic NO, window 0x1e00001,
    root 0x196, subw 0x0, time 1040192, (226,184), root:(389,602),
    state 0x2010, keycode 108 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

PropertyNotify event, serial 46, synthetic NO, window 0x1e00001,
    atom 0x18a (_NET_WM_ICON_GEOMETRY), time 1040203, state PropertyNewValue

PropertyNotify event, serial 46, synthetic NO, window 0x1e00001,
    atom 0x18a (_NET_WM_ICON_GEOMETRY), time 1040209, state PropertyNewValue

So, the keycode is 108, when I enter "xmodmap -pke", I see "keycode 108 = Mode_switch NoSymbol Mode_switch"

Im not really familiar with those codes..

Offline

#8 2012-03-07 21:06:48

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

Looks fine to me. So somewhat running out of ideas here.

Perhaps try:

# xmodmap -e "keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol"

Burninate!

Offline

#9 2012-03-07 21:13:48

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Gcool wrote:
# xmodmap -e "keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol"

Works fine until reboot..:/
But hey, how about putting this cmd to start with X?

exec xmodmap -e "keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol"

in /etc/X11/xorg.conf

One minute...

Offline

#10 2012-03-07 21:26:46

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Adding exec " ..." to /xorg.conf" was a bad idea lol, X couldnt start, but I "fixed" this by adding .desktop to ~/.config/autostart with command u wrote, thanks smile Now it works.. I just wonder why I cant get this fixed without adding it to autostart, why it not "remembers" what 108 will be...  Hmm

Could this be solved?

Offline

#11 2012-03-07 22:06:51

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

Good to hear it's working. To make this permanent, do the following (saving your mappings to .Xmodmap in your home directory basically):

# xmodmap -e "keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol"
# xmodmap -pke > ~/.Xmodmap

and add the following to your .xinitrc (activating the changes upon starting X):

if [ -f $HOME/.Xmodmap ]; then
    /usr/bin/xmodmap $HOME/.Xmodmap
fi

Burninate!

Offline

#12 2012-03-08 10:55:34

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Gcool wrote:

Good to hear it's working. To make this permanent, do the following (saving your mappings to .Xmodmap in your home directory basically):

# xmodmap -e "keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol"
# xmodmap -pke > ~/.Xmodmap

and add the following to your .xinitrc (activating the changes upon starting X):

if [ -f $HOME/.Xmodmap ]; then
    /usr/bin/xmodmap $HOME/.Xmodmap
fi

I did this but its all still the same after reboot o.O

Offline

#13 2012-03-08 13:09:34

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

Do you use a display manager in order to log in (LXDM for example) or how do you start your lxde session exactly?


Burninate!

Offline

#14 2012-03-08 14:11:42

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

Gcool wrote:

Do you use a display manager in order to log in (LXDM for example) or how do you start your lxde session exactly?

I start it from LXDM.

Offline

#15 2012-03-08 16:37:30

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] Alt Gr not work in LXDE

LXDM doesn't use your .xinitrc file; so you'll need to add those changes in /etc/lxdm/PostLogin instead.


Burninate!

Offline

#16 2012-03-10 10:59:51

broi
Member
From: Bosnia & Herzegovina
Registered: 2011-12-10
Posts: 127

Re: [Solved] Alt Gr not work in LXDE

I did reinstall of my Arch system for some reason and I came to fix this again and belive or not I fixed it on this part when I add 'bs' layout:

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "bs"
EndSection

Anyway, Thanks alot for your time, it's solved now smile ^_^

Offline

#17 2012-12-07 16:22:18

josemaria.alkala
Member
Registered: 2012-12-07
Posts: 25

Re: [Solved] Alt Gr not work in LXDE

I know this thread is closed, but I think this could be helpful for somebody else as it was for me.

What I did was editing **/etc/X11/xorg.conf.d/10-evdev.conf**

I included the following:

  Section "InputClass"
          Identifier "evdev keyboard catchall"
          MatchIsKeyboard "on"
          MatchDevicePath "/dev/input/event*"
          Driver "evdev"
          Option "XkbLayout" "es"
          Option "XkbVariant" "dvorak"
          Option "XkbOptions" "lv3:ralt_switch_multikey"
  EndSection

Regards,
José María

Offline

Board footer

Powered by FluxBB