[evdev] Japanese keyboard missing keys

Bug #258595 reported by Iñaki García Etxebarria
42
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Japanese Kaizen Project
Invalid
Undecided
Unassigned
xkeyboard-config (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xkeyboard-config

Since the last upgrades (the ones that caused bug #255008 and bug #255372) my japanese keyboard is not behaving properly, there are some missing keys in the layout.

The symbols that do not work and used to work before the latest upgrades are ']' and '}' (which in the japanese keyboard are in the same key), and the key for '\' and '_' (underscore, one key again).

It still works fine in the console, and it used to work fine in hardy with the appropriate xorg.conf. (The yen key has always been kind of borken too, but that's a different bug, and not a regression like this).

The relevant section of xorg.conf that used to work fine before:
 Option "XkbRules" "xorg"
 Option "XkbModel" "jp106"
 Option "XkbLayout" "jp,jp"
 Option "XkbVariant" "106,"
 Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"

A simple way to see that something is broken (some keys are missing) is when I try to add a japanese layout, attached goes a screenshot of that.

Notice that there is no key for ']', '}', which in the japanese keyboard are on the same key (you use shift to select '}'), and take half of the space assigned to 'Return' in the attached layout. Similarly for '\', '_', this key should be taking half of the space assigned to 'Shift_R'.

Revision history for this message
Iñaki García Etxebarria (inaki-garetxe) wrote :
Revision history for this message
Iñaki García Etxebarria (inaki-garetxe) wrote :

Attaching the output of 'xkbcomp :0 -'

Revision history for this message
Iñaki García Etxebarria (inaki-garetxe) wrote :

'setxkbmap -print' says the following:

xkb_keymap {
 xkb_keycodes { include "evdev+aliases(qwerty)" };
 xkb_types { include "complete" };
 xkb_compat { include "complete+ledscroll(group_lock)" };
 xkb_symbols { include "pc+jp(106)+inet(evdev)+es:2+group(alt_shift_toggle)" };
 xkb_geometry { include "pc(pc104)" };
};

Revision history for this message
keisangi (anarchic-teapot) wrote :

hi there,
i was having the same problem
(bad layout on japanese keyboard) and
i've just found a solution while waiting for update/fix.

here's relevant parts of my xorg.conf:

Section "ServerLayout"
 Identifier "Default Layout"
 Option "AutoAddDevices" "false"
 screen 0 "Screen0" 0 0
EndSection

Section "InputDevice"
 Identifier "Generic Keyboard"
        Driver "kbd"
 Option "XkbRules" "xorg"
 Option "XkbModel" "jp106"
 Option "XkbLayout" "jp,jp"
 Option "XkbVariant" "106"
 Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection

Revision history for this message
keisangi (anarchic-teapot) wrote :

i forgot to say, setxkbmap now return this:

setxkbmap -print
xkb_keymap {
 xkb_keycodes { include "xfree86(jp106)+aliases(qwerty)" };
 xkb_types { include "complete" };
 xkb_compat { include "complete+japan+ledscroll(group_lock)" };
 xkb_symbols { include "pc+jp+group(alt_shift_toggle)" };
 xkb_geometry { include "pc(jp106)" };

Revision history for this message
KUmo (shiragumo) wrote :

I don't know, when this will get fixed, but this is quite annoying.
So to get at least hankaku/zenkaku and the ']', '}'-key working, I changed the /usr/share/X11/xkb/keycodes/evdev file.

added
<AC12> = 51; // for the ']', '}'-key

changed
<HZTG> = 93; // Hankaku/Zenkakau toggle
to
alias <HZTG> = <TLDE>;

changing
<AB11> = 211; // backslash/underscore
to
<AB11> = 97;
as reported by the xev-command did only work partially, I still don't get the backslash but the underscore.

If there is a better solution, please let me know.

Revision history for this message
KUmo (shiragumo) wrote :

After the latest update "xkeyboard-config (1.3-2ubuntu2)" I did the following, to get the japanese keyboard-layout to work as expected:

in /usr/share/X11/xkb/symbols/inet
comment out the <AB11> entry like so:
// key <AB11> { [ XF86Launch4 ] };

in /usr/share/X11/xkb/keycodes/evdev the new jp106 part looks like this
// For japanese 106 keyboard.
xkb_keycodes "jp106" {
    include "evdev(evdev)"
    <HZTG> = 49;
    <AC12> = 51;
    <AB11> = 97;
};

In the gnome-keyboard-settings I changed the keyboard-type to 日本語(japanese) 106-key with japanese and german layout, now reported as:
setxkbmap -print
xkb_keymap {
 xkb_keycodes { include "evdev(jp106)+aliases(qwerty)" };
 xkb_types { include "complete" };
 xkb_compat { include "complete+ledscroll(group_lock)" };
 xkb_symbols { include "pc+jp(106)+de:2+inet(evdev)+group(alt_shift_toggle)+level3(menu_switch)" };
 xkb_geometry { include "pc(jp106)" };
};

This got me Hankaku/Zenkaku, the ']','}'-key and the '\','_'-key working.

Revision history for this message
Iñaki García Etxebarria (inaki-garetxe) wrote :

KUmo: Thank you very much, the changes you suggest also make my keyboard useful again. Thanks! :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xkeyboard-config - 1.3-2ubuntu3

---------------
xkeyboard-config (1.3-2ubuntu3) intrepid; urgency=low

  * 100_abnt2_jp106.diff: Fix keycodes/evdev to better support ABNT2 and
    JP106. (LP: #255372, #258595)

 -- Timo Aaltonen <email address hidden> Tue, 16 Sep 2008 16:47:08 +0300

Changed in xkeyboard-config:
status: New → Fix Released
Revision history for this message
KUmo (shiragumo) wrote :

Thanks for the new version (xkb-data 1.3-2ubuntu3), it partially fixed the issue. Unfortunately I still need to comment out the <AB11> part in /usr/share/X11/xkb/symbols/inet to get a fully functional '\','_'-key.

otherwise still the same setup
$ setxkbmap -print
xkb_keymap {
 xkb_keycodes { include "evdev(jp106)+aliases(qwerty)" };
 xkb_types { include "complete" };
 xkb_compat { include "complete+ledscroll(group_lock)" };
 xkb_symbols { include "pc+jp(106)+de:2+inet(evdev)+group(alt_shift_toggle)+level3(menu_switch)" };
 xkb_geometry { include "pc(jp106)" };
};

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I've uploaded -2ubuntu4, which should fix this.

Revision history for this message
Iñaki García Etxebarria (inaki-garetxe) wrote :

I just tested -2ubuntu4, and it fixes the problem for me. Thanks!

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

Even after update to -2ubuntu4, I still have this problem
My system is Kubuntu 8.10
Do I have to upgrade xserver-xorg (and -core) for the fix to work? I'm using the latest in Hardy, and cannot afford to upgrade due to a problem with Fujitsu P series touchscreen driver.

$setxkbmap -print
xkb_keymap {
        xkb_keycodes { include "evdev+aliases(qwerty)" };
        xkb_types { include "complete" };
        xkb_compat { include "complete+japan+ledscroll(group_lock)" };
        xkb_symbols { include "pc+jp+inet(evdev)+group(alt_shift_toggle)" };
        xkb_geometry { include "pc(pc104)" };
};

Currently, my xorg.conf has Option "XkbRules" "evdev"
Is the keyboard layout manager in KDE4 faulty? Might try installing gnome-keyboard-settings then

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

By the way, it seems the keyboard layout manager in KDE4 is working after all. Programs launched after the settings are applied now can use arrow keys. Still,
* right bracket unusable
* Hankaku_Zenkaku still not working
* anything else on the desktop still do not have the keyboard settings applied, even after a restart

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

I upgraded to latest xorg (breaking touchscreen support on the way), and the problem is resolved. However, the yen mark/pipe key is unmapped, causing inconvenience when doing console commands.
For extra information, all keys are correctly mapped on tty (regardless of xorg updates).

My question here would be: can I have xorg use whatever tty's using instead of its own rules?

Revision history for this message
Emmet Hikory (persia) wrote :

I've encountered this bug several times before. I believe it to be a bug with GNOME, rather than a bug with X. Try opening gconf-editor, and clearing all the settings in /desktop/gnome/peripherals/keyboard/kbd. This does not require any changes to xorg.conf.

Revision history for this message
Nil (nicolas-limare) wrote :

I had exactly the same problem as Iñaki described, even with -2ubuntu4. The method suggested by Emmet worked just fine. Great. Thanks.

Nazo (lovesyao)
Changed in ubuntu-jp-improvement:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.