xkb keyboard switching strangness
Hi,
I use two keymaps: us and il, I use the dvorak variant of us, and I
switch between us and il using some key combination, generally alt
+shift. I used to configure this in Xorg.conf thus:
Option "XkbLayout" "us,il"
Option "XkbVariant" "dvorak,"
Option "XkbOptions" "grp:alt_shift_toggle,ctrl:swapcaps"
Recently, with the Xorg switch to evdev and hal for input device
configuration, this stopped working, and I eventually discovered that
the keyboard is no longer configured in Xorg.conf. From NEWS.Debian.gz:
> * Changes in handling of input devices
>
> Starting from this version, input devices are no longer configured
> statically in /etc/X11/xorg.conf. Instead, input devices are detected at
> runtime (and can be hotplugged) and configured individually. The default
> keyboard layout is shared with the console and is configured in
> /etc/default/console-setup. As a result, devices configured in xorg.conf to
> use the mouse or kbd driver are ignored by the X server by default.
>
> For more details, see:
> http://who-t.blogspot.com/2008/12/evdev-xorgconf-hal-and-other-fud.html
> http://who-t.blogspot.com/2008/10/new-keyboard-configuration-handling.html
I therefore configured the keyboard in /etc/default/console-setup thus:
> XKBMODEL="acer_laptop"
> XKBLAYOUT="us,il"
> XKBVARIANT="dvorak,"
> XKBOPTIONS="lv3:ralt_switch"
> XKBOPTIONS="grp:alt_shift_toggle,ctrl:swapcaps"
[A combination of the Debian defaults and my Xorg options.] This works
fine in the console, but for some reason behaves strangely in X. I
have to hit alt+shift *twice* to switch to il, and once to switch
back. I tried changing the toggle to lwin, with the same results.
[I notice using xev that when alt+shift is configured, ISO_Prev_Group
keysyms are generated, while when lwin is configured, ISO_Next_Group
keysyms are generated. I have no idea why, or if this is significant.]
My questions:
I) Why on earth do I need to hit my toggle key combo twice in X (it
works properly in the console, as above)?
II) What is the current method for configuring the keyboard for X,
without altering the console-setup stuff? [I tried using an fdi file
under /etc/hal/fdi/policy, but I couldn't get it to work properly.]
Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator
Reply to: