lepikevents
Advanced tools
Comparing version 1.6.0 to 1.6.1
17
index.js
@@ -1,2 +0,2 @@ | ||
const process = require( 'node:process'); | ||
const EventEmitter2 = require('eventemitter2').EventEmitter2; | ||
@@ -22,2 +22,17 @@ const { spawn } = require('child_process'); | ||
function cleanExit(){ | ||
if (!python.killed){ | ||
python.kill(); | ||
} | ||
process.exit(); | ||
} | ||
process.on('SIGINT',cleanExit); | ||
process.on('SIGTERM',cleanExit); | ||
process.on('exit',()=>{ | ||
if(!python.killed) | ||
python.kill(); | ||
}); | ||
module.exports = { events }; |
{ | ||
"name": "lepikevents", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Global mouse and keyboard events Listener", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
8290450
61