Configuring a keyboard in HAL

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
emil_pavlov

Configuring a keyboard in HAL

Post by emil_pavlov »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Re: How to configure input devices from Felica onwards

Post by Husse »

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>
emil_pavlov

Re: How to configure input devices from Felica onwards

Post by emil_pavlov »

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

Re: How to configure input devices from Felica onwards

Post by emil_pavlov »

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

Re: How to configure input devices from Felica onwards

Post by Husse »

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
emil_pavlov

Re: Coniguring a keyboard in HAL

Post by emil_pavlov »

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

Re: Configuring a keyboard in HAL

Post by Husse »

As I understand it configs for mouse and keyboard in xorg.conf are ignored while configs for video are not
Locked

Return to “Hardware Support”