Block windows key wxPython

北慕城南 提交于 2019-12-11 04:16:01

问题


I am creating an application with wxpython for writing tests in schools, and it needs to be able to block the windows key, alt-tab and so on to prevent cheating. Is this possible and if it is, how do you do it?

I know that you can't block ctrl + alt + del, but is it possible to detect when it is pressed?


回答1:


I came across this in a similar discussion, http://timgolden.me.uk/python/win32_how_do_i/track-session-events.html

Which provides an outline of tracking user events such as those triggered by a ctrl + alt + del press.

It may provide a workaround to having to block the keypresses.




回答2:


The simple answer is No, unless this is a touchscreen application with no access to the computer hardware. That would probably work. Otherwise you'll have to look into how to lockdown your PC with Microsoft Policies etc. Or you might be able to do it with a locked down Linux install. Regardless, it's not really something you can manage with wxPython. It's something you have to manage at the OS level.



来源:https://stackoverflow.com/questions/12210976/block-windows-key-wxpython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!