How do I configure keyboard layouts in Ubuntu 12.04?

1

Edit: I screwed up, but somehow I got it right after several attempts. HAL has nothing to do with it.


Ubuntu has moved to HAL, and commented out the keyboard section in xorg.conf. This means that GNOME keyboard layout tool no longer works outside of GNOME (I don't remember if it did before, but the point is, I never had this problem before either). Also, this means I can't just edit xorg.conf and set up everything I need as usual (or can I)?

So, is there any way to configure keyboard layouts for a HAL keyboard that would work, say, in XMonad?

UPD: Editing xorg.conf does not work, here's the relevant section from mine:

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbLayout" "us,ru"
    Option         "XkbOptions" "grp:ctrl_shift_toggle, caps:ctrl_modifier, compose:sclk, terminate:ctrl_alt_bksp, grp_led:scroll"
EndSection

This is a copy of the question I asked at askubuntu.se: https://askubuntu.com/questions/132616/how-do-i-configure-keyboard-layouts-using-xmonad-as-my-window-manager

Alexei Averchenko

Posted 2012-05-06T14:31:50.480

Reputation: 569

Answers

1

If you like, you could create always a xorg.conf in /etx/X11 with keyboard definition. By default Ubuntu creates it on the fly. If you create your own, Ubuntu includes it and gives to your settings priority.

wk.

Posted 2012-05-06T14:31:50.480

Reputation: 148

Normally it would work, but Ubuntu 12 switched to HAL so it doesn't (see the updated question). – Alexei Averchenko – 2012-05-07T03:15:19.070