Bug 468825 - evdev ignores xkb options from HAL
evdev ignores xkb options from HAL
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-evdev (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-28 05:31 EDT by Anton Guda
Modified: 2018-04-11 07:18 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-29 05:41:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Sample HAL keyboard file (667 bytes, text/plain)
2008-10-28 05:31 EDT, Anton Guda
no flags Details
Debug patch with hardcoded group switch. (673 bytes, patch)
2008-10-28 05:34 EDT, Anton Guda
no flags Details | Diff
Log with patch 321686. (27.92 KB, text/plain)
2008-10-28 05:38 EDT, Anton Guda
no flags Details

  None (edit)
Description Anton Guda 2008-10-28 05:31:40 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):

How reproducible:

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.
4. startx
Actual results:
Keyboard layout cannot be toggled by given key or combination,
but can be toggled by external program.

Expected results:
Keyboard layout can be toggled by given key or combination.

Additional info:
I wrote a simple debug patch, with "grp:rctrl_toggle"
default and debug messages.
Hardcoded values does work, but can't be altred
by HAL.
Comment 1 Anton Guda 2008-10-28 05:34:25 EDT
Created attachment 321686 [details]
Debug patch with hardcoded group switch.

Added xf86Msg for xkb options 
and default "XkbOptions",    "grp:rctrl_toggle".
Comment 2 Anton Guda 2008-10-28 05:38:47 EDT
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.
Comment 3 Matěj Cepl 2008-10-28 19:49:30 EDT
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?
Comment 4 Peter Hutterer 2008-10-28 20:32:43 EDT
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.
Comment 5 Anton Guda 2008-10-29 04:38:25 EDT
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
   different keybindings.

Now I use modified fedora-setup-keyboaard with check:

if [[ "$DONT_USE_fedora_setup_keyboard" == 'yes' ]] ; then
  exit 0

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.
Comment 6 Anton Guda 2008-10-29 04:43:45 EDT
I tested input.xkb.options as string: is works!
Comment 7 Matěj Cepl 2008-10-29 05:41:24 EDT
I guess we can close it now.

Note You need to log in before you can comment on or make changes to this bug.