terminal-kit
Advanced tools
+23
-2
@@ -181,6 +181,13 @@ | ||
| # Input management with `grabInput()` | ||
| # Input management with `grabInput(options)` | ||
| * grabInput(options): turn input grabbing on, keyboard entries will not be echoed, every input will generate an event | ||
| * options: false/true/Object, *false* disable input grabbing, if it is *true* or an Object, then turn on input grabbing, if it is an Object, | ||
| then those properties are supported: | ||
| * mouse: if defined, it activate mouse event, those values are supported for 'mouse': | ||
| * 'button': report only button-event | ||
| * 'drag': report button-event, report motion-event only when a button is pressed (i.e. it is a mouse drag) | ||
| * 'motion': report button-event & all motion-event, use it only when needed, many escape sequences are sent from the terminal | ||
| (for example, one may consider this for script running over SSH) | ||
| This function turns input grabbing on, keyboard entries will not be echoed, and every input will generate an event on the `term` object. | ||
@@ -252,3 +259,13 @@ Quick example: | ||
| Also notice that some terminal will support less keys. For example, the Linux Console does not support SHIFT/CTRL/ALT + Arrows keys, | ||
| it will produce a normal arrow key. | ||
| There is no workaround here, the underlying keyboard driver simply does not support this. | ||
| KP_* keys needs `applicationKeypad()`, e.g. without it KP_1 will report '1' or END. | ||
| Some terminal does not support `applicationKeypad()` very well, and it is nearly impossible to differenciate (for example) a KP_1 from | ||
| an END, or a KP_7 from a HOME, since most X terminal will be reported as xterm or xterm-256color happily, but still does not report key | ||
| the same way... | ||
| ## 'terminal' event | ||
@@ -275,2 +292,3 @@ * name: string, the name of the subtype of event | ||
| ## 'mouse' event | ||
@@ -293,4 +311,7 @@ * name: string, the name of the subtype of event | ||
| * MOUSE_WHEEL_UP, MOUSE_WHEEL_DOWN: self explanatory | ||
| * MOUSE_OTHER_BUTTON_PRESSED, MOUSE_OTHER_BUTTON_RELEASED: a fourth mouse button is sometime supported | ||
| * MOUSE_MOTION: if the options `{ mouse: 'motion' }` is given to grabInput(), every move of the mouse will fire this event, | ||
| if `{ mouse: 'drag' }` is given, it will be fired if the mouse move while a button is pressed | ||
+1
-1
| { | ||
| "name": "terminal-kit", | ||
| "version": "0.1.7", | ||
| "version": "0.1.8", | ||
| "description": "Terminal utilities with supports for colors, styles, inputs, mouse and many more...", | ||
@@ -5,0 +5,0 @@ "main": "lib/terminal.js", |
+23
-2
@@ -181,6 +181,13 @@ | ||
| # Input management with `grabInput()` | ||
| # Input management with `grabInput(options)` | ||
| * grabInput(options): turn input grabbing on, keyboard entries will not be echoed, every input will generate an event | ||
| * options: false/true/Object, *false* disable input grabbing, if it is *true* or an Object, then turn on input grabbing, if it is an Object, | ||
| then those properties are supported: | ||
| * mouse: if defined, it activate mouse event, those values are supported for 'mouse': | ||
| * 'button': report only button-event | ||
| * 'drag': report button-event, report motion-event only when a button is pressed (i.e. it is a mouse drag) | ||
| * 'motion': report button-event & all motion-event, use it only when needed, many escape sequences are sent from the terminal | ||
| (for example, one may consider this for script running over SSH) | ||
| This function turns input grabbing on, keyboard entries will not be echoed, and every input will generate an event on the `term` object. | ||
@@ -252,3 +259,13 @@ Quick example: | ||
| Also notice that some terminal will support less keys. For example, the Linux Console does not support SHIFT/CTRL/ALT + Arrows keys, | ||
| it will produce a normal arrow key. | ||
| There is no workaround here, the underlying keyboard driver simply does not support this. | ||
| KP_* keys needs `applicationKeypad()`, e.g. without it KP_1 will report '1' or END. | ||
| Some terminal does not support `applicationKeypad()` very well, and it is nearly impossible to differenciate (for example) a KP_1 from | ||
| an END, or a KP_7 from a HOME, since most X terminal will be reported as xterm or xterm-256color happily, but still does not report key | ||
| the same way... | ||
| ## 'terminal' event | ||
@@ -275,2 +292,3 @@ * name: string, the name of the subtype of event | ||
| ## 'mouse' event | ||
@@ -293,4 +311,7 @@ * name: string, the name of the subtype of event | ||
| * MOUSE_WHEEL_UP, MOUSE_WHEEL_DOWN: self explanatory | ||
| * MOUSE_OTHER_BUTTON_PRESSED, MOUSE_OTHER_BUTTON_RELEASED: a fourth mouse button is sometime supported | ||
| * MOUSE_MOTION: if the options `{ mouse: 'motion' }` is given to grabInput(), every move of the mouse will fire this event, | ||
| if `{ mouse: 'drag' }` is given, it will be fired if the mouse move while a button is pressed | ||
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
333141
0.83%314
7.17%