You are not logged in.

#1 2009-05-15 13:19:04

mhh91
Member
From: Cairo,Egypt
Registered: 2009-05-14
Posts: 21

XKB problem

okay,the deal is that i want to have two keyboard layouts on LXDE roll

i can do this with the following command :

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ar

but the problem is that i have to type this every time i log in hmm


i tried modifying the keyboard section of xorg.conf,but no use sad

can somebody help me with that?

Offline

#2 2009-05-15 13:48:56

bds
Member
Registered: 2004-02-27
Posts: 47

Re: XKB problem

You are probably using hal to configure your keyboard. Therefore, X ignores keyboard entries in xorg.conf.

To get the keyboard layout and options you want, create /etc/hal/fdi/policy/10-keymap.fdi with the following content:

<?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>
      <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,ar</merge>
      <merge key="input.xkb.options" type="string">grp:switch,grp:alt_shift_toggle,grp_led:scroll</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>

Restart hal (also possibly X) and you should be good to go!

HTH

Offline

#3 2009-05-15 14:27:30

mhh91
Member
From: Cairo,Egypt
Registered: 2009-05-14
Posts: 21

Re: XKB problem

i did what you said, restarted the system and all worked well smile


thanks a lot

Offline

#4 2009-05-15 15:29:20

yasen
Member
From: Bulgaria
Registered: 2009-03-05
Posts: 39

Re: XKB problem

Or you could have put that command in your .xinitrc (if that is your preferred way of launching X).

I hate all that HAL XML crap, you should too. It's ugly and unintuitive. xorg.conf options look much cleaner smile

Offline

Board footer

Powered by FluxBB