Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terminal-kit

Package Overview
Dependencies
Maintainers
1
Versions
638
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terminal-kit - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

25

documentation.md

@@ -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

2

package.json
{
"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",

@@ -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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc