ibus / ibus

Intelligent Input Bus for Linux/Unix
https://github.com/ibus/ibus/wiki
GNU Lesser General Public License v2.1
868 stars 180 forks source link

Wrong key map for Apple Magic Keyboard with Numeric Keypad - Japanese #2681

Open sukeya opened 1 week ago

sukeya commented 1 week ago

Hi,

I have a trouble that the key map of my keyboard "Apple Magic Keyboard with Numeric Keypad - Japanese" is wrong.

Which distribution and version?: Ubuntu 24.04

Which desktop environment and version?: GNOME 46.0

Which session type?: X11

Which application and version?: gedit, leafpad, kate and xterm are not installed.

IBus version?: 1.5.29-rc2

Issue description: The maps of keys "Kana", "Eisu" and "CapsLock" are wrong. The output of xev is following:

Kana
KeyRelease event, serial 38, synthetic NO, window 0x2800001,
    root 0x1fe, subw 0x0, time 12970293, (440,-271), root:(1752,450),
    state 0x0, keycode 130 (keysym 0xff31, Hangul), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Eisu
KeyRelease event, serial 38, synthetic NO, window 0x2800001,
    root 0x1fe, subw 0x0, time 13056428, (56,-14), root:(1368,707),
    state 0x0, keycode 131 (keysym 0xff34, Hangul_Hanja), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

CapsLock
KeyRelease event, serial 38, synthetic NO, window 0x2800001,
    root 0x1fe, subw 0x0, time 13079628, (55,-27), root:(1367,694),
    state 0x2, keycode 66 (keysym 0xff30, Eisu_toggle), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Steps to reproduce:

  1. sudo dpkg-reconfigure keyboard-configuration
  2. Select Apple Aluminium (JIS)
  3. Select Japanese
  4. Select Japanese - Japanese (Macintosh)
  5. Select No toggling
  6. Select No temporary switch
  7. Select The default for the keyboard layout
  8. Select No compose key
  9. Select No

Can you reproduce your problem when you restart ibus-daemon? (yes / no): yes

Do you see any errors when you run ibus-daemon with the verbose option?: no

Can you reproduce your problem with a new user account instead of the current your account? (yes / no): maybe yes

fujiwarat commented 3 days ago

I guess your issue would be in Ubuntu desktop.

  1. Select Apple Aluminium (JIS)

Neither GNOME and IBus settings does not have the XKB models but layouts, variants, optoins so probably I think an Ubuntu UI can configure it.

How about Japanese 106 or 109 keyboards? Do you have the hardwares?

I don'T have "Apple Magic Keyboard" hardware but I tried Japanese - Japanese (Macintosh) in GNOME Xorg in Fedora 40 without Select Apple Aluminium (JIS).

The maps of keys "Kana", "Eisu" and "CapsLock" are wrong. The output of xev is following:

I confirmed Eisu_toggle and Caps_Lock work fine with xev. I'm not sure what you mean in "Kana" but Hiragana_Katakana, kana_A, kana_I et el works fine.

sukeya commented 2 days ago

I have a Japanese 109 keyboard, but I would like to use Apple's one because switching the input mode between hiragana and hankaku-eisu is easier.

Kana means the right key of space, which switches the input mode from hankaku-eisu to hiragana.

It seems that this problem is not caused by ibus.

fujiwarat commented 2 days ago

I have a Japanese 109 keyboard, but I would like to use Apple's one because switching the input mode between hiragana and hankaku-eisu is easier.

I'd ask if you can reproduce your issue with the 109 keyboard using Japanese - Japanese (Macintosh) without Apple Aluminium (JIS) to understand your issue.

Kana means the right key of space

And then, you mean Hiragana_Katakana keysym and it works with Japanese - Japanese (Macintosh).

It seems that this problem is not caused by ibus.

No, ibus keymap is not used in GNOME desktop at least.

sukeya commented 22 hours ago

I see.

I'd ask if you can reproduce your issue with the 109 keyboard using Japanese - Japanese (Macintosh) without Apple Aluminium (JIS) to understand your issue.

I couldn't reproduce my issue with my 109 keyboard replaced the right windows key with a function key.