[userscript] [mobile] KanaMatrix keyboard for Reviews and Lessons

ONLY USE THIS ON TOUCH-ENABLED BROWSERS.
NOT YET SUPPORTED FOR MOUSE CURSORS

Hello, I haven’t been here for a while, but I’m back and trying out some new things.

If you have a mobile that can run userscripts (I use an Android and Kiwi Browser with the Tampermonkey extension)

The idea behind this is that you can get used to using a kana keyboard without having the words pop up while you’re typing them (which gives away whether you were right).

It might be a little rough around the edges, but let me know any troubles that come up and I’ll do my best to address them.

As with all of my scripts there are no guarantees express or implied, use at your own discretion.

It’s been a while since I coded anything and I’m just getting back into it. Anyway here it is:

https://greasyfork.org/en/scripts/390719-wk-kanamatrix

And a screenshot:

Aims to prevent this kind of thing:
Screenshot_2019-10-23-00-49-55-04%5B1%5D

6 Likes

This looks neat! Can you also use it with a mouse by dragging?

Not at the moment (unless you are in dev mode and simulating a mobile device)
The mouse events are a little rough to handle as they fire with touch events, so they fire twice and it’s a hassle.

But I can sort if out if that’s something you want. It just wasn’t high on my list of fixes as I didn’t see an urgent need for it.

Design wise I think I should make some room on the left for dragging space.
い, ち, and み are a little frustrating at times.

Question: Can’t you disable predictions by adding some kind of attribute on the input element? That way you could use a native flick keyboard

I don’t know, can you?

And I know it’s just one button but I like not having to manually switch anyway.

1 Like

Looks like you can.

https://www.w3schools.com/tags/att_autocomplete.asp

I try not to review on mobile either way, so you do what works for you 230185602321088514

1 Like

I don’t think that’s the same.
That seems to be a setting for turning autocomplete on, ie. predicting what words you’re typing by what you’ve typed before, at least in English, don’t know about other languages.

The problem with the native Japanese keyboard is it is designed to type Japanese, including Kanji of course, and I don’t think it has any sort of mode that stops it suggesting which Kanji words you want to type.

The reason I brought it up is because I thought I saw @ejplugge mention it in the Flaming Durtles thread. I don’t know if it can be done with HTML, but it seems it’s possible somehow.

4 Likes

If @ejplugge wants to enlighten me as to what, if any, input attribute prevents the Kanji coming up, I am willing to learn.

Mind sharing what keyboard you are using there?

Gboard I think?

Unfortunately, as far as I know, stopping an IME from suggesting kanji on kana input is not generally possible programmatically, in HTML or otherwise. Maybe on desktop (Windows, Mac, Linux, …) there are some sneaky ways to interact with the native IME somehow, but I’ve yet to see it done. If you want to stop all kanji suggestions, something like what you’ve done in this userscript is probably the only feasible way to go.

Essentially, the difference between auto-suggest/auto-complete and kana -> kanji suggestions is: who is providing the functionality? Auto-suggest/auto-complete is a service offered by the operating system, and most platforms will give you a method to enable/disable it for one input field. In HTML that’s the autocomplete attribute as mentioned above. On Android native, it’s setInputType() on EditText.

The kana -> kanji suggestions are offered by the IME or soft-keyboard implementation, not the operating system, and as far as I know, this particular feature is not exposed through HTML, Android native, and probably other systems as well. I am guessing our use case for this is so obscure that no platform has bothered to create an access path to this feature.

1 Like

I suspected it was a native apk command, thank you for the confirmation.

1 Like

Hang on, did you say it’s not exposed through native android? How did you disable it in Flaming Durtles?

I am using Swiftkey

1 Like

I didn’t, I only disabled the auto-suggest/auto-correct.

Why would anyone use a kana keyboard… That is what should be in question here lol

You’ve never looked up anything in Japanese on a mobile phone have you?
Wanakana won’t always be there to help you.

1 Like

I have, I just enabled the japanese language… I can switch up between english and japanese and it works the same way an IME does in a computer

I tend to want to use japanese more on my phone even, since tapping the language icon on the keyboard is easier than changing it on my computer

Because once you get get used to it it’s much faster