开发者

Low level hotkey kext to kill WindowServer?

开发者 https://www.devze.com 2023-01-10 00:01 出处:网络
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\"

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号