You are not logged in.

#1 2008-12-03 04:03:52

koro
Member
From: Japan
Registered: 2007-04-16
Posts: 34

[SOLVED] xorg 1.5 + japanese keyboard key

I am using ThinkPad T61 and my desktop dnvironment is GNOME.

I tried to make configuration for japanese 106-keyboard with new xorg.

My solution is following:

(1)Copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi  to /etc/hal/policy.

sudo cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/policy/

(2)Edit /etc/hal/policy/10-keymap.fdi
    Referenced page: http://cgit.freedesktop.org/xorg/xserve … -input.fdi

<?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.x11_options.XkbRules" type="string">evdev</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.x11_driver" type="string">kbd</merge>
      <merge key="input.x11_XkbModel" type="string">jp106</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
        <merge key="input.x11_XkbModel" type="string">jp106</merge>
      </match>

      <merge key="input.x11_XkbLayout" type="string">jp</merge>
      <merge key="input.x11_XkbVariant" type="string" />
    </match>
  </device>
</deviceinfo>

(3) Reboot.(or restart hal)

(4) Open the gnome keyboard panel, and select keyboard model and layout.
     keyboard model : Japanese 106-key
     Layout  : Japan

Now ']' and '}' keys became available.

(5) Option.

setxkbmap -print

xkb_keymap {
    xkb_keycodes  { include "evdev(jp106)+aliases(qwerty)"    };
    xkb_types     { include "complete"    };
    xkb_compat    { include "complete+japan+ledscroll(group_lock)"    };
    xkb_symbols   { include "pc+jp+inet(evdev)+altwin(super_win)+group(alts_toggle)+level3(menu_switch)+ctrl(swapcaps)"    };
    xkb_geometry  { include "pc(jp106)"    };
};

That's all.

Best regards.

Offline

#2 2008-12-07 13:35:11

naoki
Member
Registered: 2008-12-07
Posts: 3

Re: [SOLVED] xorg 1.5 + japanese keyboard key

I also have a Thinkpad, T60 with jp106 keyboard and am running Openbox. Using evdev-2.1.0
from the testing branch instead of evdev-2.0.7 with X's hotplugging got me jp106 keyboard layout by only modifying /etc/hal/fdi/policy/10-keymap.fdi as follwing

$ cat /etc/hal/fdi/policy/10-keymap.fdi
<?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">jp106</merge>
        </match>
      <merge key="input.xkb.layout" type="string">jp</merge>
    </match>

  </device>
</deviceinfo>

According to the wiki (http://wiki.archlinux.org/index.php/Xor … otplugging) this is how changing the keyboard layout via hal policy files in xorg-server 1.5 series is supposed to work but for me it didn't with evdev-2.0.7 so I assume some fixes have been made in evdev-2.1.0.
I haven't had any issues by using the testing branch evdev and with this I can get all keys except the yen key, which has never woked by default for me, working without farther configuration.

Last edited by naoki (2008-12-07 13:36:51)

Offline

#3 2008-12-07 15:52:07

koro
Member
From: Japan
Registered: 2007-04-16
Posts: 34

Re: [SOLVED] xorg 1.5 + japanese keyboard key

Hi, naoki.
Thank you for your reply.

According to the wiki (http://wiki.archlinux.org/index.php/Xor … otplugging) this is how changing the keyboard layout via hal policy files in xorg-server 1.5 series is supposed to work but for me it didn't with evdev-2.0.7 so I assume some fixes have been made in evdev-2.1.0.
I haven't had any issues by using the testing branch evdev and with this I can get all keys except the yen key, which has never woked by default for me, working without farther configuration.

In my case, the arrow-keys did not work with xf86-input-evdev 2.0.7-1.
Then I tried to use "evdev" for "input.xkb.rules" in 10-keymap.fdi, and that maked me happy.:D

I will try to configure with your advice when x86-input-edev is updated.
But I hope japanese-106 keymap will work without additional settings.


Best, regards.

Offline

Board footer

Powered by FluxBB