MacOS 14.3 (23D56), M3 Chip. Node 20.2.0
Just install node-global-key-listener and touch index.js, paste demo code.
The node process exited after console.log out a keyboard/mouse event.
In the Activity Monitor, the Mac Key Server is disappeared after click mouse or tap any key.
But there no problem or crash when running the key server from command line.