任何人都可以告诉我什么属性可以检查以确定活动输入法(即手写,键盘等)? 基本上,我希望有像一些逻辑: if (inputMethod === "handwriting") {
//do this
} else {
//do that
}
或 if (handwriting.active) {
//do this
} else {
//do that
我试图写一个虚拟键盘PyQt5代码。这是我的代码。 from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class InputState:
LOWER = 0
CAPITAL = 1
class KeyButton(QPushButton):
sigKeyButtonClicked = pyq