[Bug] Shortcut keys do not work on macOS (Intel) Qt6 version

Shortcut keys work in Qt5 version, but in Qt6 version, all shortcut keys do not work.

Version: Anki for macOS 10.14.4+ (intel, 2.1.61 Qt6)
Environment: MacBook Pro 15-inch, 2018. Ventura 13.3.1.

I searched Twitter and found several people who seemed to have encountered a similar bug.

mac版のankiでキーボードショートカットが機能しない問題、いつになったら改善してくれるんだ ttps://twitter.com/t7m_k/status/1617054663391551488


Mac版のAnkiがキーボードショートカットを受け入れなくなった…と思ったらカード編集もできない 全般的にキーボード入力を受け入れていない可能性がある

I presume this is only a problem when you have the Japanese IME active. Can you give some examples of shortcut keys that are not working?

For example, SPACE, 1, 2, 3, 4, E, M, D, A, B, T, Y, etc. On the other hand, ENTER works.
As you guessed, I use Google Japanese IME (ttps://www.google.co.jp/ime/), and by turning off the IME, the shortcut keys now work! But I would like to use shortcut keys in Google IME. Most applications support shortcut keys using Google IME, and Anki is the first one where I could not use shortcut keys. Thank you.

The good news is that it should work correctly if you use the standard macOS IME. The bad news is that because this only happens with a third-party IME, chances are not high that the graphics toolkit company will prioritize fixing this.

So you’re saying the root cause of this issue is on Qt side? In the source code, I see QShortcut is used, for example in ttps://github.com/ankitects/anki/blob/main/qt/aqt/main.py#L1102. If this is a problem with QShortcut, there isn’t anything that can be fixed on Anki, right? I’ll use the standard IME!

Yes, I believe this is a Qt issue.

1 Like

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