Configuring a keyboard in HAL

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
emil_pavlov
Level 2
Level 2
Posts: 61
Joined: Sun Feb 03, 2008 11:06 am

Configuring a keyboard in HAL

Postby emil_pavlov » Sun Mar 29, 2009 8:23 pm

It is really detailed howto, but i still couldn't understand something. How can I customize the keyboard layout? Is there any easy way to convert the old conf file with the layout, so that hal can understand it?

Husse
Level 23
Level 23
Posts: 19593
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to configure input devices from Felica onwards

Postby Husse » Mon Mar 30, 2009 6:21 am

I don't have some readymade scripts for this - sorry
It would be nice if I had the time to write such script(s)
This section helps I think - it shows how you transfer your old xorg.conf sections for mouse and keyboard
The I in this quote is not me :)
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
}}

I will need to match the mouse device in the hal output and configure it to respond like it did in my xorg. I created the following fdi file to accomplish this.
{{{
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
<merge key="input.x11_driver" type="string">mouse</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">no</merge>
<merge key="input.x11_options.ZAxisMapping" type="integer">4 5</merge>
</match>
</device>
</deviceinfo>

As you can see, the translation from xorg configuration to fdi is fairly trivial. A simple script could easy accomplish this task. I then repeated the same method for my keyboard configuration.

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_driver" type="string">kbd</merge>
</match>
</device>
</deviceinfo>
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

emil_pavlov
Level 2
Level 2
Posts: 61
Joined: Sun Feb 03, 2008 11:06 am

Re: How to configure input devices from Felica onwards

Postby emil_pavlov » Tue Mar 31, 2009 12:42 pm

Actually, I didn't need any scripts. I just modified the xorg file as I used to and created and a .fdi file in

Code: Select all

/etc/hal/fdi/policy/
with the following contents:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_driver" type="string">kbd</merge>
</match>
</device>
</deviceinfo>


Naturally, I had to restart hal with

Code: Select all

/etc/init.d/hal restart


Thank you,
Husse

emil_pavlov
Level 2
Level 2
Posts: 61
Joined: Sun Feb 03, 2008 11:06 am

Re: How to configure input devices from Felica onwards

Postby emil_pavlov » Wed Apr 01, 2009 6:43 pm

Well bad news are it didn't fix my problem. It's all perfect until I restart the computer. Then my mouse goes crazy and I cannot type my login details because the keyboard goes crazy, too. I have to go to console mode and delete the fdi file I made and restart the computer (restarting hal doesn't work).

Husse
Level 23
Level 23
Posts: 19593
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to configure input devices from Felica onwards

Postby Husse » Thu Apr 02, 2009 12:35 pm

I'm lost
Try to remove what yo just added
I'll split this off as it now is a support matter and move to Hardware support
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

emil_pavlov
Level 2
Level 2
Posts: 61
Joined: Sun Feb 03, 2008 11:06 am

Re: Coniguring a keyboard in HAL

Postby emil_pavlov » Thu Apr 02, 2009 3:59 pm

I removed the file that I created and it's all ok now. But the question is how to make it read keyboard layouts from the old file. It's obvious that it is included as an option, but i don't how to activate it without breaking the system.

Husse
Level 23
Level 23
Posts: 19593
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Configuring a keyboard in HAL

Postby Husse » Sat Apr 04, 2009 11:55 am

As I understand it configs for mouse and keyboard in xorg.conf are ignored while configs for video are not
Image
Don't fix it if it ain't broken, don't break it if you can't fix it


Return to “Hardware Support”

Who is online

Users browsing this forum: Bing [Bot] and 10 guests