[GH-ISSUE #248] No character shows when type non-latin keys. #209

Closed
opened 2026-05-05 05:06:45 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @arafune on GitHub (Oct 18, 2022).
Original GitHub issue: https://github.com/keycastr/keycastr/issues/248

I'm Japanese and use Japanese keyboard normally. While I enjoy using this app, but I have one request. Even when I type "Eisu" (to change "Kana" mode to ascii mode") key or "Kana" (vice versa) key in Japanese keyborad. no character appear appear in the window. Just a space (but not under bar like character) shows.

As I have not check the code, I don't know if this app accepts non-latin key board. But I believe you can fix the problem.

You may wander what is the appropriate symbol for "Eisu" key and "Kana" key, but if any character not just a space is really nice.

Please think about it.

Originally created by @arafune on GitHub (Oct 18, 2022). Original GitHub issue: https://github.com/keycastr/keycastr/issues/248 I'm Japanese and use Japanese keyboard normally. While I enjoy using this app, but I have one request. Even when I type "Eisu" (to change "Kana" mode to ascii mode") key or "Kana" (vice versa) key in Japanese keyborad. no character appear appear in the window. Just a space (but not under bar like character) shows. As I have not check the code, I don't know if this app accepts non-latin key board. But I believe you can fix the problem. You may wander what is the appropriate symbol for "Eisu" key and "Kana" key, but if any character not just a space is really nice. Please think about it.
gitea-mirror 2026-05-05 05:06:45 -06:00
Author
Owner

@akitchen commented on GitHub (Nov 8, 2022):

Hello, thank you for opening an issue.

The app should work with non-latin keyboards, but I would like to better understand the problem you are having. It sounds like the Japanese-specific language keys are not properly supported. I'm not surprised, since we hard-code glyphs for certain other special keys. If we want to display a special character when these keys are typed, we may need to special-case their key mappings.

Separately, I understand that these keys are used to change the language input modes. If you switch to that input mode before starting keycastr, does it work correctly otherwise? The app may need to do a better job of supporting changes to the keyboard layout after it has started.

<!-- gh-comment-id:1306499647 --> @akitchen commented on GitHub (Nov 8, 2022): Hello, thank you for opening an issue. The app should work with non-latin keyboards, but I would like to better understand the problem you are having. It sounds like the Japanese-specific language keys are not properly supported. I'm not surprised, since we hard-code glyphs for certain other special keys. If we want to display a special character when these keys are typed, we may need to special-case their key mappings. Separately, I understand that these keys are used to change the language input modes. If you switch to that input mode before starting keycastr, does it work correctly otherwise? The app may need to do a better job of supporting changes to the keyboard layout after it has started.
Author
Owner

@arafune commented on GitHub (Nov 9, 2022):

Thank you for your reply. If the special characters are hard-coded, it is reasonable those keys are not displayed. I'm really happy if you treat these keys as the special key.

Yes, your guess is right. These keys are used to change the language input mode.
And the app works well excepting the problem I met (not-display the character for some key such as "Eisu" and "Kana".). And the input mode change does not affect when the app starts, it always works well.

<!-- gh-comment-id:1307999515 --> @arafune commented on GitHub (Nov 9, 2022): Thank you for your reply. If the special characters are hard-coded, it is reasonable those keys are not displayed. I'm really happy if you treat these keys as the special key. Yes, your guess is right. These keys are used to change the language input mode. And the app works well excepting the problem I met (not-display the character for some key such as "Eisu" and "Kana".). And the input mode change does not affect when the app starts, it always works well.
Author
Owner

@arafune commented on GitHub (Nov 10, 2022):

By using Keycode (https://apps.apple.com/jp/app/key-codes/id414568915?mt=12), I have checked the key code of the corresponding keys.

Note that this app shows the following when I press down key "a":
Characters: a
Unicode: 97/0x61
Keys: A
Key code : 0/0x0

I believe this key code is same as yours.

When I press "Eisuu" key, the output is:
Characters:
Unicode: 32/0x20
Keys:
Key Code: 102/0x66

When I press "Kana" key, the output is:
Characters:
Unicode: 32 / 0x20
Keys: 104 / 0x68

I hope this information helps you.

Sincerely,

<!-- gh-comment-id:1309575382 --> @arafune commented on GitHub (Nov 10, 2022): By using Keycode (https://apps.apple.com/jp/app/key-codes/id414568915?mt=12), I have checked the key code of the corresponding keys. Note that this app shows the following when I press down key "a": Characters: a Unicode: 97/0x61 Keys: A Key code : 0/0x0 I believe this key code is same as yours. When I press "Eisuu" key, the output is: Characters: Unicode: 32/0x20 Keys: Key Code: 102/0x66 When I press "Kana" key, the output is: Characters: Unicode: 32 / 0x20 Keys: 104 / 0x68 I hope this information helps you. Sincerely,
Author
Owner

@akitchen commented on GitHub (Nov 10, 2022):

Hello and thank you for looking further into this. This information is also available in some of the headers for Apple's ancient Carbon framework:

/* JIS keyboards only*/
enum {
  kVK_JIS_Yen                   = 0x5D,
  kVK_JIS_Underscore            = 0x5E,
  kVK_JIS_KeypadComma           = 0x5F,
  kVK_JIS_Eisu                  = 0x66,
  kVK_JIS_Kana                  = 0x68
};

I am planning on adding the following code to the hardcoded mappings in the keystroke transformer class:

            @"英数", @0x66, // eisū key, JIS keyboards only
            @"かな", @0x68, // kana key, JIS keyboards only

Could you please validate these strings for representing Eisuu and Kana keys, and also comment on whether the other keys listed above currently work correctly with a JIS keyboard? It doesn't look like I can test them using a virtual keyboard in macOS.

In particular, do the Japanese vs. English/Roman comma keys display correctly? I believe it should be vs , or . Of course the Yen key should also work, and I am unfamiliar with the special JIS underscore key.

Thanks again

<!-- gh-comment-id:1310508540 --> @akitchen commented on GitHub (Nov 10, 2022): Hello and thank you for looking further into this. This information is also available in some of the headers for Apple's ancient Carbon framework: ``` /* JIS keyboards only*/ enum { kVK_JIS_Yen = 0x5D, kVK_JIS_Underscore = 0x5E, kVK_JIS_KeypadComma = 0x5F, kVK_JIS_Eisu = 0x66, kVK_JIS_Kana = 0x68 }; ``` I am planning on adding the following code to the hardcoded mappings in the keystroke transformer class: ``` @"英数", @0x66, // eisū key, JIS keyboards only @"かな", @0x68, // kana key, JIS keyboards only ``` Could you please validate these strings for representing Eisuu and Kana keys, and also comment on whether the other keys listed above currently work correctly with a JIS keyboard? It doesn't look like I can test them using a virtual keyboard in macOS. In particular, do the Japanese vs. English/Roman comma keys display correctly? I believe it should be `、` vs `,` or `,`. Of course the Yen key should also work, and I am unfamiliar with the special JIS underscore key. Thanks again
Author
Owner

@arafune commented on GitHub (Nov 11, 2022):

Thank you for your reply:

/* JIS keyboards only*/
enum {
kVK_JIS_Yen = 0x5D,
kVK_JIS_Underscore = 0x5E,
kVK_JIS_KeypadComma = 0x5F,
kVK_JIS_Eisu = 0x66,
kVK_JIS_Kana = 0x68
};

The above is consistent with my key code.

And I should say that

        @"英数", @0x66, // eisū key, JIS keyboards only
        @"かな", @0x68, // kana key, JIS keyboards only

is ok, because "英数" is read as "Eisuu" or "Eisū" and "かな" is read as "Kana".

Yen character has already appeared in the App.

  1. About Japanese/English(Roman) comma.
    Regardless of the imput modes, the roman type comma "," is shown. I believe this is not the problem. The role of this app is showing what key I press. While I press "shift" and "1", the app shows the "upper arrow" and "1", not "!". Thus I think it is consistent that roman comma shows everytime.

On the other hand, the problem I met is that no character is shown while I press "Eisuu" / "Kana". I feel this is inconsistent behavior which we have expected.

Sincerely,

<!-- gh-comment-id:1311063713 --> @arafune commented on GitHub (Nov 11, 2022): Thank you for your reply: 1) /* JIS keyboards only*/ enum { kVK_JIS_Yen = 0x5D, kVK_JIS_Underscore = 0x5E, kVK_JIS_KeypadComma = 0x5F, kVK_JIS_Eisu = 0x66, kVK_JIS_Kana = 0x68 }; The above is consistent with my key code. And I should say that @"英数", @0x66, // eisū key, JIS keyboards only @"かな", @0x68, // kana key, JIS keyboards only is ok, because "英数" is read as "Eisuu" or "Eisū" and "かな" is read as "Kana". 2) Yen character has already appeared in the App. 3) About Japanese/English(Roman) comma. Regardless of the imput modes, the roman type comma "," is shown. I believe this is not the problem. The role of this app is showing what key I press. While I press "shift" and "1", the app shows the "upper arrow" and "1", not "!". Thus I think it is consistent that roman comma shows everytime. On the other hand, the problem I met is that no character is shown while I press "Eisuu" / "Kana". I feel this is inconsistent behavior which we have expected. Sincerely,
Author
Owner

@akitchen commented on GitHub (Nov 14, 2022):

OK the above fix is available on the main branch and will be included in the next release.

<!-- gh-comment-id:1313059194 --> @akitchen commented on GitHub (Nov 14, 2022): OK the above fix is available on the main branch and will be included in the next release.
Author
Owner

@arafune commented on GitHub (Nov 14, 2022):

Thank you very much for your quick response.

I cannot have built the app, (probably) becasue I'm not familiar with XCode. Whie I try to build, some errors (Some frameworks are missed.) occur. I believe that this problem occurs because I don't know how to use xocde, not because of the code. Anyway I expect the new release version works well.

<!-- gh-comment-id:1313555718 --> @arafune commented on GitHub (Nov 14, 2022): Thank you very much for your quick response. I cannot have built the app, (probably) becasue I'm not familiar with XCode. Whie I try to build, some errors (Some frameworks are missed.) occur. I believe that this problem occurs because I don't know how to use xocde, not because of the code. Anyway I expect the new release version works well.
Author
Owner

@arafune commented on GitHub (Nov 20, 2022):

0.9.13 Works completely well. Thank you very much.

<!-- gh-comment-id:1321277660 --> @arafune commented on GitHub (Nov 20, 2022): 0.9.13 Works completely well. Thank you very much.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/keycastr#209
No description provided.