Low level hotkey kext to kill WindowServer?
I need to make a kext which does a very simple function. Whenever a key combination is pressed the kext should kill a proces开发者_开发技巧s which happens to be "WindowServer"
It has to be a kext due to the nature of the problem. It has to be independent from system's UI so if it hangs up, I can press this combination and restart it.
Can someone provide a starting point? Like how to make a key handler?
I'm not convinced it needs to be a kext. An application that asked you to authenticate for admin powers and then used them (like sudo) to run a command-line tool that killed the WindowServer should do the job just as well. As a bonus, the authentication check prior to running the tool would double as a confirmation dialog.
精彩评论