-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Here is my proof-of-principle New Stickney support on macOS via Karabiner Elements, should anyone be willing to test it?
Karabiner Elements is a popular free and open source keyboard customizer for macOS, capable of remapping keys with special effects including input-mode specificity, and ISO/ANSI/JIS virtual keyboard modes.
This is enough to implement New Stickney support working with the default macOS IME software in "Japanese - Kana" mode. This works detecting by intercepting q so that rather than the IME turning this into た as per the JIS layout, Karabiner elements replaces it with f to that the IME turns this into け as per the New Stickney layout.
I have based this work on https://esrille.github.io/ibus-hiragana/en/layouts.html#new_stickney (revision 17 as per discussion on #2).
The kogaki support using the L key as a suffix works by sending backspace to delete the large vowel kana (from "あいうえおやゆよ") and then sending the JIS kana key combination for the small version ("ぁぃぅぇぉゃゅょ"). This delete trick is one of the suggested ways to implement a dead-key like behaviour on Karabiner Elements, and is also how Esrille handles ten-ten and maru in their keyboard firmware. If not being used as a small vowel modifier, the L key is mapped to the JIS ゛ key instead allowing the IME to apply the dakuten modifier.
Because New Stickney does not use the number row, but the JIS kana row does, those keys also must be remapped. Currently this uses the option+shift+number or option+fn+number keys to access the wide ASCII characters. This means it follows the base JIS/ANSI/ISO for the shifted digits as implied for the NEw Stickney layout (I have made assumptions for ISO keyboards here). Potentially this could use the number pad digits which in macOS kana mode give half-width (1 2 3) rather than full-width (1 2 3).
There is a caveat in that currently this does not support the 『double-quote』 characters because I have not found a key-combination in macOS Kana mode to generate both on macOS. I can get 『 via shift+option+open_bracket, but not 』.
Likewise, I have not found a key-combination in macOS Kana to generate the ellipsis (…). Also there does not seem to be a wide unicode version of this character. I have mapped to the back-tick in the interim (reflecting ANSI/ISO defaults on this key).
I have not (yet) implemented the sticky shift behaviour with the space bar (likely best done as a separate rule to make it easier for people using other rules on their space bar), nor anything for the "変換" key (semi-colon) which currently maps to wide-space. The best behaviour for the IME keys is likely tied to the IME being used (e.g. macOS default or something like the one from Google).
The layout has had only minimal testing with a Japanese MacBook laptop keyboard, and an external UK (GB) layout ISO keyboard.
The code generating this Karabiner Elements New Stickney rule sets is also currently very messy (the number of ANSI/ISO/JIS differences was more than I expected!).