You are not logged in.

#1 2009-07-20 08:50:06

furakon
Member
Registered: 2009-07-20
Posts: 16

HAL keyboard settings and VIM

Hi,
I put file /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy/10-keymap.fdi
and edit it, because I need two keyboard layouts.

<?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,cz</merge>
      <merge key="input.xkb.variant" type="string">,qwerty</merge>
      <merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle</merge>

    </match>
  </device>
</deviceinfo>

Now I can switch the layouts by CTRL+SHIFT, This is OK
But when I start VIM and try to edit something, the arrow keys move a cursor over all words, so I can't edit them in the middle. I have to turn off the insert mode and navigate the cursor by [H] and [L] keys, but it is very uncomfortable.
If I set only one layout my problem disapears. But I need both. Any idea?

Offline

#2 2009-07-20 12:01:17

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: HAL keyboard settings and VIM

Well I have a similar problem except that the toggling doesn't work for me at all.
I have to manually set the keymap every time. Is there anything else that you did other that that .fdi file to allow the keymap toggling to work? Are you using an xorg.conf at all?


neutral

Offline

#3 2009-07-20 14:32:38

furakon
Member
Registered: 2009-07-20
Posts: 16

Re: HAL keyboard settings and VIM

I thing I didn't do anything else. And I'm not using xorg.conf, because when I tried to set up keyboard layouts in xorg.conf it didn't work. So I tried HAL and it stated working. But now I have that problem with VIM.

Offline

#4 2009-07-21 17:40:12

furakon
Member
Registered: 2009-07-20
Posts: 16

Re: HAL keyboard settings and VIM

Anybody else didn't meet this strange bahaviour of VIM?

Offline

#5 2009-07-22 16:21:21

furakon
Member
Registered: 2009-07-20
Posts: 16

Re: HAL keyboard settings and VIM

Argh... I may have to say "adie" to cz keymap or VIM. What a difficult decision. sad

Offline

#6 2009-07-24 10:27:36

furakon
Member
Registered: 2009-07-20
Posts: 16

Re: HAL keyboard settings and VIM

And what about this?

<merge key="input.xkb.model" type="string">keyboard</merge>

Where I can get what is the best options here? keyboard, pc101, etc...
I have Arch on Acer laptop (Acer TravelMate 243X exactly). I thing there is possible value acer_laptop. But I don't know if I can use it bacause my laptop is quite old model.

Offline

Board footer

Powered by FluxBB