[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.

The problem has already been described here, however it still persists in the newest version of Anki: forums ankiweb net/t/bug-field-loses-focus-when-switching-to-katakana-input-mode/47767

When typing answers into a text field during studying, switching to katakana using alt + capslock unfocuses the input field and quits the IME session, making it impossible to correctly type in answers that consist of hiragana and katakana.

Additionally, clicking “Show answer” during an active IME session causes the buttons 1-4 for grading a card to stop working. I need to click them manually with my mouse.

Anki version: 25.09.2
Python 3.13.5 Qt 6.9.1 Chromium 122
Windows 10 21H2 LTSC

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