Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please mention the Japanese 英数 and かな keys where appropriate. #1355

Open
charles-plessy opened this issue Oct 13, 2024 · 9 comments
Open
Labels
enhancement New feature or request

Comments

@charles-plessy
Copy link

Hello,

thank you so much for developping and selling your keyboards. My order just arrived today and it is a wonderful piece of hardware.

To use it as Japanese keyboard with a Macintosh, I made a bit of research. It took a lot of time but the answer is very simple. Maybe you can display it somewhere in the documentation or the user interface, for instance if the user selects Japanese keyboard layout in the preferences? Here is the key information:

  • The japanese_eisuu key (英数) is Lang2, key code 145.
  • The japanese_kana key (かな) is Lang1, key code 144.

That's all! With just this information in hand Japanese users can configure their Keyboardio to place these keys as they please and enjoy these wonderful keyboards on their Macs.

Have a nice day,

Charles

@charles-plessy charles-plessy added the enhancement New feature or request label Oct 13, 2024
@obra
Copy link
Member

obra commented Oct 15, 2024 via email

@charles-plessy
Copy link
Author

Both can be true: Muhenkan is on the PC keyboards (which have more special Japanese keys). Eisu/Kana are on the Mac Japanese keyboards (which only have these two).

@obra
Copy link
Member

obra commented Oct 16, 2024 via email

@charles-plessy
Copy link
Author

I also could not find online documentation but I checked directly the keycodes on my Japanese Mac with https://karabiner-elements.pqrs.org/.

@charles-plessy
Copy link
Author

Oh, sorry there was. https://bsakatu.net/doc/usb-hid-to-scancode/

@obra
Copy link
Member

obra commented Oct 17, 2024 via email

@charles-plessy
Copy link
Author

charles-plessy commented Oct 17, 2024

I have a JIS PC keyboard that I plugged on a Mac: Here are the results:

  • Muhenkan (無変換) -> japanese_pc_nfer 139
  • Henkan (変換) ->japanese_pc_xfer 138
  • Katakana Hiragana Romaji (カタカナ ひらがな ローマ字) -> japanese_pc_katakana 136

The Hankaku/Zenkaku Kanji (半角/全角・漢字) key did not produce japanese-specific code, just the grave_accent_and_tilde expected for its position (next to 1). Also, the Eisuu (英数) command of the JIS PC keyboard, which should be shift-capsLock, just gave... shift-capsLock. Maybe this is because the Mac does not care about these keys anyway.

There are two more keys not on the standard US keyboard. When plugged on a Mac, the backslash key of the PC keyboard produces an underscore. Indeed, the Mac Japanese keyboard has an underscore next to Right Shift.

  • ¥, next to Backspace -> international3 137
  • \, next to Right Shift -> international1 135

I have not found yet a way to find this information on Windows (which I do not use) or Linux (my main platform). On Linux, xev gives keycodes that I do not know how to translate in scancodes (see below).

@charles-plessy
Copy link
Author

charles-plessy commented Oct 17, 2024

Simplified output of xev on Linux with the same JIS keyboad, when selecting OADG 109A layout.

  • Muhenkan (無変換)
    state 0x4000, keycode 102 (keysym 0xff22, Muhenkan), same_screen YES,
  • Henkan (変換)
    state 0x4000, keycode 100 (keysym 0xff23, Henkan_Mode), same_screen YES,
  • Katakana Hiragana Romaji (カタカナ ひらがな ローマ字)
    state 0x4000, keycode 101 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
  • Hankaku/Zenkaku Kanji (半角/全角・漢字)
    state 0x4000, keycode 49 (keysym 0xff2a, Zenkaku_Hankaku), same_screen YES,
  • Eisuu (英数)
    state 0x4000, keycode 66 (keysym 0xff30, Eisu_toggle), same_screen YES,
  • Eisuu (英数) (shift-capsLock)
    state 0x4001, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,
  • ¥
    state 0x4000, keycode 132 (keysym 0xa5, yen), same_screen YES,
  • \
    state 0x4000, keycode 97 (keysym 0x5c, backslash), same_screen YES,

@charles-plessy
Copy link
Author

OK, for Windows, from Wikipedia I found a link to a Microsoft document that specifies:

  • \ usage index 136
  • かな usage index 136
  • ¥ usage index 137
  • 変換 (XFER) usage index 138
  • 無変換 (NFER) usage index 139
    I could not find Eisuu (英数) in this document…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants