我有一个openglwxpython应用程序,我正试图在Ubuntu中运行。它是由其他人在macosx上开发的,在那里工作得很好。在
最后一个突出的问题是键盘事件没有被捕获。在
代码如下所示:
^{1}$我已经为Bind调用修改了整个代码库,其他代码都没有使用EVT_CHAR、EVT_KET_DOWN或EVT_KEY_UP。我也尝试过EVT_KEY_DOWN和EVT_KEY_UP,但都不起作用。在
我也尝试过从
^{pr2}$到
self.Bind(...)
这会中断EVT_运动,并且EVT_CHAR回调仍然不会被调用。在
在到达GLFrame之前是否有可能捕获键盘事件的调用?我是wxpython的新手,虽然这对我来说很有意义,但我肯定有一些我不知道的“陷阱”。在
根据wxpython Google集团的调查,无论wx.框架接收键盘事件取决于实现。Ubuntu实现不接收它们。在
发件人:https://groups.google.com/d/msg/wxpython-users/dF2gf5KvFhE/M_-aRuG3aWUJ
结果是,GLCanvas可以很好地接收键盘事件。不管是什么原因,它没有引起人们的注意。呼叫
解决了这个问题。在
尝试绑定到框架而不是画布。。在
相关问题 更多 >
编程相关推荐