Kext low-level hotkey to kill WindowServer?

I need to make a kext that performs a very simple function. Whenever a key combination is pressed, kext must kill the process, which turns out to be "WindowServer"

This should be kext due to the nature of the problem. It should be independent of the system interface, so if it freezes, I can click this combination and restart it.

Can anyone give a starting point? How to make a key handler?

+3
source share
1 answer

I am not sure if this should be kext. An application that asked you to authenticate administrator privileges and then used them (for example, sudo) to run the command-line tool that killed WindowServer should also do the job. As a bonus, authentication before starting the tool will be double as a confirmation dialog.

0
source

Source: https://habr.com/ru/post/1758013/


All Articles