Solutions for typing backslash on MacOS with Japanese keyboard in specific app

japanesekeyboard

This is an obscure issue so I don't expect anyone to know a solution specific to my app. Rather I'm wondering if maybe there is some OS level option I can set.

In any case, a Japanese keyboard does not have a backslash character. Back in the 80s the yen character occupied the same codepoint as the yen ¥ symbol so you'd just type that instead. Now of course with unicode both symbols exist and the yen key inserts ¥ by default.

Apple's Japanese IME has an option to insert backslash instead of yen

Apple Japanese IME settings

And so does Google's Japanese IME

Google Japanese IME Settings

And this works everywhere except my text editing program. I've reported the issue but of course it could take them a while to fix it. As a short term solution they suggested recording a macro in the app that inserts a backslash and assigning it to the yen key which worked for editing text. Unfortunately it doesn't work for various dialogs in the app like the search and replace form where I type regular expressions and need to enter backslash often.

In the meantime I wondering is there some other creative solution I can do at an OS level?

Best Answer

You could make a custom keyboard that uses another key for backslash, with

http://scripts.sil.org/ukelele