Karabiner-elements: JIS external keyboard recognized as US (ASCII) keyboard after v0.90.47

Created on 11 Oct 2016  ·  14Comments  ·  Source: pqrs-org/Karabiner-Elements

connect RealForce Compact JIS keyboard (details below), but recognized as US (ASCII) keyboard. after quit Karabiner Elements, works well.

trials

  • re-install: does not resolve
  • reboot macOS: does not resolve
  • plug off keyboard then plug on: does not resolve
  • use v0.90.47 or v0.90.48: does not resolve
  • open Keyboard.prefpane and change keyboard types: does not resolve
  • quit Karabiner Elements: resolve!
  • use v0.90.46: resolve!

environments

  • macOS Sierra 10.12
  • OS Locale: Japanese
  • MacBook Pro (Retina, 13-inch, Early 2015), with JIS keyboard
  • external keyboard: Topre Corporation (0x853) / RealForce Compact (0x200), location: 0x4011000, registry_entry_id: 4294968358

Most helpful comment

Please upgrade Karabiner-Elements to the latest version and set keyboard type in Devices tab.
https://github.com/tekezo/Karabiner-Elements/tree/master/usage#set-keyboard-type

All 14 comments

It also happens on MacBook 12" + Sierra Internal JIS keyboard. Reinstall and restarting did not resolve the problem. I try old version. Thanks.

Takezo-san, thanks for a good software.

I have the same issue with 0.90.48 and RealForce.

I got the following error during build of 0.90.48. I cannot move to 0.90.46.

https://github.com/tekezo/Karabiner-Elements/issues/284

@HIRANO-Satoshi

you can download previous pre-built binary from here.
https://pqrs.org/osx/karabiner/files/Karabiner-Elements-0.90.46.dmg

enjoy :-)

That's what I needed. It seems working.

Thanks so much, @shao1555.

@tekezo, thanks again for a great tool.

Making a small donation made me happy. Everyone, how about you?

https://pqrs.org/osx/karabiner/donation.html.en

I downgraded to 0.90.46, and once it seems work. but a few days after, it happened again (without upgrading newer version). I tried uninstalliing and deleting setting file, but no success.
0.90.50 also does not solve the problem.

305 and may be #311 are duplicate?

I think I got the same issue as @do-gugan 's with 0.90.46 ...

  • Downgraded to 0.90.46 -> keyboard recognized as JIS
  • Rebooted -> Key remapping happens (including XFER and NFER), but keyboard recognized as US (Shift+2 gives @ instead of ", same for other symbols)
  • Quit Karabiner-Elements, then restart Karabiner-Elements -> now keyboard is recognized as JIS

Hi all,

I experienced same symptom on macOS Sierra, Mac Pro 2009, HHKB pro type S (JIS). In my case, I cannot remember exact version number though, it occurs regardless of the Karabiner-Elements's version including current version. So, I guess that some state of MacOS may be related to this problem, such as external keyboard connected or not at boot time or you have connected an ASCII keyboard or not and so on.

Anyway, I looked at Karabiner-Element and Karabiner's source code, and I managed to avoid this problem in a very ugly manner. If you don't mind it, try this! I believe this is almost equivalent to Karabiner's __SetKeyboardType__ KeyboardType::JIS_MACBOOK_2008.

  1. Apply attached patch to Karabiner-Element's source tree.
  2. make
  3. Overwrite karabiner_event_dispatcher with newly compiled one.

    • sudo cp BUILD_ROOT/Karabiner-Elements/pkgroot/Library/Application\ Support/org.pqrs/Karabiner-Elements/bin/karabiner_event_dispatcher /Library/Application Support/org.pqrs/Karabiner-Elements/bin

  4. Kill karabiner_event_dispatcher process. (Karabiner automatically reboot it)

    • Quit Karabiner and restart it is not enough. It looks karabiner_event_dispatcher is still running after quit Karabiner.

patch.txt

Thank you,

@dato, I tried and it is working. Thanks much.

As you instructed, I changed src/share/hid_system_client.hpp like this, and run _make_, then installed the newly generated app. It is working without doing step 3 and step 4 in your list.

  void post_key(uint8_t key_code, krbn::event_type event_type, IOOptionBits flags, bool repeat) {
    NXEventData event{};
    event.key.origCharCode = 0;
    event.key.repeat = repeat;
    event.key.charSet = NX_ASCIISET;
    event.key.charCode = 0;
    event.key.keyCode = key_code;
    event.key.origCharSet = NX_ASCIISET;
    // event.key.keyboardType = 0
    event.key.keyboardType = 42; // JIS_PC_USB_KEYBOARD

I chose 42 for my PC keyboard from a list of keyboard types.

Please upgrade Karabiner-Elements to the latest version and set keyboard type in Devices tab.
https://github.com/tekezo/Karabiner-Elements/tree/master/usage#set-keyboard-type

thank you so much!

It' working for me, too. Thank you!

Thanks! All the keys work now, but FYI Karabiner-EventViewer is showing the wrong (US) keys.

I also suffered this issue in the latest version(12.1.0), any advice?

Was this page helpful?
0 / 5 - 0 ratings