[Bug] Field loses focus when switching to katakana input mode

I’m using Anki to learn Japanese. I’ve installed Japanese language support into Windows, and I find that when I use a shortcut key to switch to katakana input mode, the field loses focus. I have to click into it again to get it to work. This doesn’t happen in other apps like Notepad++. It continues to happen if I start Anki without shortcuts.

Here’s the steps I can use to duplicate:

  1. In Anki, select Add.
  2. Select the field to put the focus there.
  3. Press Windows-Space. (This changes my keyboard input from English to Japanese, romaji. Everything is fine at this point. I can type and characters appear.)
  4. Press Alt-Capslock. (This changes my keyboard input from romaji to katakana.)
  5. Try to type the character “a” (ア).

I expect the ア character to appear in the field. What actually happens is nothing, because the field has lost focus. If I click into it and press “a”, I get アas expected.

This doesn’t happen when I switch to hiragana (Ctrl-Capslock). I suspect the alt key is the culprit. In fact, I can also reproduce the issue with these steps:

  1. Add a card.
  2. Put your cursor in a field.
  3. Press the alt key.

The field will lose focus from simply hitting the alt key and nothing else.

@abdo I presume this relates to alt activating accelerator keys, even though we don’t have a menubar on that screen. Same behaviour in 2.1.66. Any ideas on if there’s anything we can do?

2 Likes

This is a pretty frustrating issue.

1 Like

Sent a fix that appears to work:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.