You are not logged in.

#1 2009-07-30 21:20:31

kanalj
Member
From: Gothenburg
Registered: 2008-04-21
Posts: 11

problem with hotplugging

hi,

i have some problem with my 10-keymap.fdi. I can only get the last of these three lines to work correctly

      <merge key="input.xkb.options" type="string">grp:lwin_toggle</merge> 
      <merge key="input.xkb.options" type="string">caps:escape</merge>
      <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

if i remove terminate:ctrl_alt_bksp then caps:escape starts to work instead. i guess the last line overwrites the other two or similar. anyone knows how to solve this?:rolleyes:

this is my config file:

[kanalj@adam-pc ~]$ cat /etc/hal/fdi/policy/10-keymap.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">us,se</merge>
      <merge key="input.xkb.variant" type="string" /> 
      <merge key="input.xkb.options" type="string">grp:lwin_toggle</merge> 
      <merge key="input.xkb.options" type="string">caps:escape</merge>
      <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>
    </match>
  </device>
</deviceinfo>

thanks for helping me out!;)


"Making mistakes is the privilege of the active. It is always the mediocre people who are negative, who spend their time proving that they were not wrong - I.Kamprad"

Offline

#2 2009-08-12 09:31:53

dmitry_k
Member
From: Russia
Registered: 2009-08-12
Posts: 10

Re: problem with hotplugging

I think you should have only one line with options separated by commas, like this:
<merge key="input.xkb.options" type="string">grp:lwin_toggle,caps:escape</merge>

It is just a guess. I could not find any clue in hal documentation.

Offline

#3 2009-08-12 20:04:01

dmitry_k
Member
From: Russia
Registered: 2009-08-12
Posts: 10

Re: problem with hotplugging

I see it works like I wrote above.

Here is my /etc/hal/fdi/policy/10-keymap.fdi:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>
      <merge key="input.xkb.layout" type="string">us,ru</merge>
      <merge key="input.xkb.variant" type="string">,winkeys</merge>
      <merge key="input.xkb.options"type="string">grp:alt_shift_toggle,terminate:ctrl_alt_bksp</merge> 
    </match>
  </device>
</deviceinfo>

After restarting HAL with
'/etc/rc.d/hal restart'
and somehow (?!) restarting X server I have in the output  of
'tail /var/log/Xorg.0.log' the desired xkb_options:

(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us,ru"
(**) Option "xkb_variant" ",winkeys"
(**) Option "xkb_options" "grp:alt_shift_toggle,terminate:ctrl_alt_bksp"

Hoorah, now I can kill X server with "Control Alt Backspace" and toggle keyboard layouts with "Alt Shift"! "One giant leap for mankind", isn't it?

Last edited by dmitry_k (2009-08-12 20:16:36)

Offline

Board footer

Powered by FluxBB