-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mixal_bl4
committed
Sep 25, 2016
0 parents
commit c24f667
Showing
9 changed files
with
1,257 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### JetBrains template | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea | ||
|
||
# Sensitive or high-churn files: | ||
.idea/dataSources.ids | ||
.idea/dataSources.xml | ||
.idea/dataSources.local.xml | ||
.idea/sqlDataSources.xml | ||
.idea/dynamic.xml | ||
.idea/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/gradle.xml | ||
.idea/libraries | ||
|
||
# Mongo Explorer plugin: | ||
.idea/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
### Node template | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Typings directory | ||
typings |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# xinput-mouse-key-logger | ||
Node keyboard and mouse activity detector without root! | ||
|
||
# Methods | ||
|
||
## xinput_get_all_devices_id ( callback ) | ||
Get list of all xinput devices | ||
### attributes | ||
* callback - function - callback function | ||
|
||
## new xinput_listener ( good_devices_id_list, callback, [optional] response_interval = 3000 ) | ||
Create new listener for devices | ||
### attributes | ||
* good_devices_id_list - array of numbers - list of devices id (you can get it from xinput_get_all_devices_id) | ||
* callback - function - callback function | ||
* response_interval - number - time interval for send events list to callback. **If set 0 - live mode** | ||
|
||
## destroy ( ) | ||
Destroy all streams and clear class | ||
|
||
# Info | ||
|
||
## standard mode (if response_interval > 0 ) | ||
Every N seconds calls callback with events list | ||
|
||
## live mode (if response_interval === 0 ) | ||
When any event triggered it create new event list with this event and immediately call callback, for every event make new call | ||
|
||
|
||
# Installing | ||
`npm install xinput-mouse-key-logger` | ||
|
||
# Using | ||
|
||
## Static mode | ||
### TypeScript | ||
```typescript | ||
import {xinput_events_list, xinput_get_all_devices_id, xinput_listener} from 'xinput-mouse-key-logger'; | ||
|
||
xinput_get_all_devices_id((devices_id_list: number[])=> { | ||
var listener = new xinput_listener(devices_id_list, (xinput_events_list: xinput_events_list)=> { | ||
console.log('events!', xinput_events_list); | ||
}); | ||
// Destroy after 10 sec | ||
setTimeout(function () { | ||
listener.destroy(); | ||
}, 10000); | ||
}); | ||
``` | ||
### JavaScript | ||
```javascript | ||
const xmkl = require('xinput-mouse-key-logger'); | ||
xmkl.xinput_get_all_devices_id(function (devices_id_list) { | ||
console.log('all', devices_id_list); | ||
var listener = new xmkl.xinput_listener(devices_id_list, function (xinput_events_list) { | ||
console.log('events!', xinput_events_list); | ||
}); | ||
// Destroy after 10 sec | ||
setTimeout(function () { | ||
listener.destroy(); | ||
}, 10000); | ||
}); | ||
``` | ||
|
||
## LIVE mode | ||
### TypeScript | ||
```typescript | ||
import {xinput_events_list, xinput_get_all_devices_id, xinput_listener} from 'xinput-mouse-key-logger'; | ||
|
||
xinput_get_all_devices_id((devices_id_list: number[])=> { | ||
var listener = new xinput_listener(devices_id_list, (xinput_events_list: xinput_events_list)=> { | ||
console.log('events!', xinput_events_list); | ||
}, 0); // <- 0 is live mode! | ||
}); | ||
``` | ||
### JavaScript | ||
```javascript | ||
const xmkl = require('xinput-mouse-key-logger'); | ||
xmkl.xinput_get_all_devices_id(function (devices_id_list) { | ||
console.log('all', devices_id_list); | ||
var listener = new xmkl.xinput_listener(devices_id_list, function (xinput_events_list) { | ||
console.log('events!', xinput_events_list); | ||
}, 0); // <- 0 is live mode! | ||
}); | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.