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

How to use xkb keycode for position for hiragana-katakana key? #51

Open
noctuid opened this issue Nov 17, 2022 · 2 comments
Open

How to use xkb keycode for position for hiragana-katakana key? #51

noctuid opened this issue Nov 17, 2022 · 2 comments

Comments

@noctuid
Copy link

noctuid commented Nov 17, 2022

I want to remap my hiragana-katakana key. According to the documentation, I should be able to use the xkb keycode w/o the brackets. If I understand correctly, I can get this from the evdev file:

» grep 101 /usr/share/X11/xkb/keycodes/evdev
        <HKTG> = 101;   // Hiragana/Katakana toggle

But If I have [ "HKTG", "PrintScreen" ] as a permutation, I get the error Error in $.mods[1].permutation[0]: ‘HKTG’ is not a valid position

What is the correct way to do this?

@39aldo39
Copy link
Owner

I looked at the Japanese keys before once, but I am not certain what all the different keys do. In the xkb keycodes file there are all these keys:

// Keys that are generated on Japanese keyboards

//<HZTG> =  93; // Hankaku/Zenkakau toggle - not actually used
alias <HZTG> = <TLDE>;
<HKTG> = 101;   // Hiragana/Katakana toggle
<AB11> = 97;    // backslash/underscore
<HENK> = 100;   // Henkan
<MUHE> = 102;   // Muhenkan
<AE13> = 132;   // Yen
<KATA> =  98;   // Katakana
<HIRA> =  99;   // Hiragana
<JPCM> = 103;   // KPJPComma

But I am not sure what they all mean and I thought I also looked at a different source which had conflicting keycodes for them (don't know where). Do you an overview of the keys? Or should I just copy the xkb names and keycodes?

@noctuid
Copy link
Author

noctuid commented Jan 11, 2023

That looks the same as for me. Allowing HKTG and also "KatakanaHiragana" and "HiraganaKatakana" as names would be nice.

I'm unsure about other keyboards or if this information is helpful, but my thinkpad keyboard has the bottom row as fn, control, win, alt, muhenkan (keycode 102), space, henkan (keycode 100), katakana/hiragana (HKTG keycode 101), alt, printscreen, control. AE13/Yen is also keycode 132 for me (left of backspace), and AB11/Ro/backslash (left of right shift) is also keycode 97. Mapping Muhenkan, Henkan, Yen, and Ro already works as expected for me. The only thing missing is the Hiragana/Katakan toggle key.

The Japanese keyboards I've seen normally just have a hiragana/katakana/romaji toggle key rather than dedicated hiragana and katakana keys. I don't have KATA, HIRA, and JPCM keys, but those keycodes do match the ones listed in my evdev file.

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

No branches or pull requests

2 participants