更新时间:2023-12-03 08:58:16
我认为您需要跟踪有关按键和释放键的事件(保持自己的当前按下"键集) )–我相信Tk不会为您跟踪(Tkinter确实在Tk的基础上添加了很少的东西,主要是它的直接接口).
I think you need to keep track of events about keys getting pressed and released (maintaining your own set of "currently pressed" keys) -- I believe Tk doesn't keep track of that for you (and Tkinter really adds little on top of Tk, it's mostly a direct interface to it).