现在,我正在尝试使用 npyscreen 在 Python 中制作 stylophone 应用程序。我想要实现的是检测何时选择但未按下按钮。如果你不太明白我的目标,也许这个例子会更多地描述它。
class Button(npyscreen.ButtonPress):
def whenPressed(self):
#Some code...
def whenSelected(self): #Thats exactly what I am trying to do
#Some other code...
我尝试搜索类似/相同的问题,但没有找到任何对我有帮助的东西。
有任何想法吗?