Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Two keyboards, two layouts: udev likely part of the solution



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Josh Glover wrote:
>2009/4/28 Stu Bouyer <stubouyer@example.com>:
>
>> Would evdev and hal along with xorg 1.5.3 be of any use here?
>
>Potentially, and I use evdev, HAL, and xorg 1.5.x, so all of this
>should work for me.
>
>--
>Cheers,
>Josh

Well this actually turned out to be easier than I thought it would be.

So far I only have this working in Xorg, but here is what I did.

Firstly I have a PS/2 jp106 keyboard which I configure via the following
hal policy file /etc/hal/fdi/policy/10-xinput-configuration.fdi

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
   <match key="info.capabilities" contains="input.keys">
      <merge key="input.x11_driver" type="string">evdev</merge>
      <merge key="input.x11_options.XkbRules" type="string">evdev</merge>
      <merge key="input.x11_XkbModel" type="string">jp106</merge>
      <merge key="input.x11_options.XkbLayout" type="string">jp</merge>
      <merge key="input.x11_options.XkbModel" type="string">jp106</merge>
     </match>
</deviceinfo>

This gives the following in the Xorg.0.log

(**) 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" "jp106"
(**) Option "xkb_layout" "jp"

When I plugged my US USB keyboard in the first time I got the following
in Xorg.0.log

(II) config/hal: Adding input device Chicony Compaq Internet Keyboard
(**) Chicony Compaq Internet Keyboard: always reports core events
(**) Chicony Compaq Internet Keyboard: Device: "/dev/input/event5"
(II) Chicony Compaq Internet Keyboard: Found keys
(II) Chicony Compaq Internet Keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "Chicony Compaq Internet
Keyboard" (ty
pe: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "jp106"
(**) Option "xkb_layout" "jp"

but the USB keyboard was using jp106 layout.

I edited /etc/hal/fdi/policy/10-xinput-configuration.fdi to include and
extra <match> for the product string and restarted hald
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
   <match key="info.capabilities" contains="input.keys">
     <match key="info.product" string="AT Translated Set 2 keyboard">
      <merge key="input.x11_driver" type="string">evdev</merge>
      <merge key="input.x11_options.XkbRules" type="string">evdev</merge>
      <merge key="input.x11_XkbModel" type="string">jp106</merge>
      <merge key="input.x11_options.XkbLayout" type="string">jp</merge>
      <merge key="input.x11_options.XkbModel" type="string">jp106</merge>
     </match>
   </match>
</deviceinfo>

uplugged the usb keyboard, plugged it back in and got the following in
Xorg.0.log

(II) config/hal: Adding input device Chicony Compaq Internet Keyboard
(**) Chicony Compaq Internet Keyboard: always reports core events
(**) Chicony Compaq Internet Keyboard: Device: "/dev/input/event5"
(II) Chicony Compaq Internet Keyboard: Found keys
(II) Chicony Compaq Internet Keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "Chicony Compaq Internet
Keyboard" (ty
pe: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us"

On the USB keyboard shift+[1-0] gives:
!@example.com&*()
While on the PS/2 keyboard it gives
!"#$%&'()~

I'll play around with /etc/hal/fdi/policy/10-xinput-configuration.fdi to
see how I would go about having 2 non-US layouts and get back if works.

Cheers

Stu


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkn26vMACgkQ7gEZPRYH5/fc6QCfYpPfdg6Jdjc5eK76RsuJ8HJC
teMAoLLLQ1THZ3BDonhbtUD4LzwCwDgs
=jseI
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links