Japanese Typed Response

Windows10
v2022.2.4
Standalone

What are you trying to achieve?:
I am presenting a stimulus and want participates to type the meaning of it in Japanese. I have a textbox working where they can type, but it recognizes the keys as English.

I found this thread where they can set up a dictionary to translate keypresses into hebrew and Japanese unicode. Obtain written text in Hebrew/Japanese

However, it seems to only take one letter for one character. In Japanese for example, I can have them type “a” for あ. However, for some characters like は generally it is a two-key string of “h” and then “a” so I do not think this dictionary style system will work.

Is there another way to have a textbox where participants can type in Japanese as they would normally on a keyboard using one or two keys per hiragana character?

Also, I am hoping to run it on pavlovia so hopefully a javascript friendly solution is not too difficult…

Thank you in advance for your help.