Red Hat Bugzilla – Bug 468825
evdev ignores xkb options from HAL
Last modified: 2018-04-11 07:18:58 EDT
Created attachment 321685 [details]
Sample HAL keyboard file
Description of problem:
Keys: "input.xkb.options" and "input.xkb.variant"
ignored by evdev. This lead to layout switch fault.
But "input.xkb.layout" is used, so if some application
(like kkbswitch) toggles it, layout changed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. For clean results disable fedora-setup-keyword.
2. Create file /etc/hal/fdi/policy/x11-input.fdi with
some xkb options, like "grp:rctrl_toggle" (see attached file)
3. Restart HAL.
Keyboard layout cannot be toggled by given key or combination,
but can be toggled by external program.
Keyboard layout can be toggled by given key or combination.
I wrote a simple debug patch, with "grp:rctrl_toggle"
default and debug messages.
Hardcoded values does work, but can't be altred
Created attachment 321686 [details]
Debug patch with hardcoded group switch.
Added xf86Msg for xkb options
and default "XkbOptions", "grp:rctrl_toggle".
Created attachment 321687 [details]
Log with patch 321686.
Before run, HAL files was modified to
another toggle key: "grp:shifts_toggle".
But it dont affect to evdev (line 476).
If disable hardcoded default,
no xkb options is set.
Try to say that input.xkb.options is string -- it helped me in the mother of all HAL .fdi bugs bug 439386 comment 88. Does it help?
the input.xkb.* values are taken from /etc/sysconfig/keyboard and shouldn't be touched.
If you want to just change the options in X only (but not on the console), you
need to specify them as input.x11_options.XkbOptions,
input.x11_options.XkbVariant, etc (as strings, not strlist). These will then have precedence.
I tested input.x11_options.XkbOptions both as string
and strlist. Both worked!
But why input.xkb.* shouldn't be touched?
1. fedora-setup-keyboard can't figure X keyboard parameters
from console settings, for example: I use custom
ru_atu console keymap with combined en+ru+ua keys.
2. X keymap may differ from console.
3. Different keyboards on same computer may have
Now I use modified fedora-setup-keyboaard with check:
if [[ "$DONT_USE_fedora_setup_keyboard" == 'yes' ]] ; then
and set DONT_USE_fedora_setup_keyboard to 'yes'
in /etc/sysconfig/keyboard and use HAL policy approach.
IMHO, usage of input.xkb.*, input.x11_options.*,
and interference with fedora-setup-keyboard must be documented
in evdev man.
I tested input.xkb.options as string: is works!
I guess we can close it now.