# Class: Tty

## vertx-shell-js/tty~ Tty

#### new Tty()

  Provide interactions with the Shell TTY.
  Source:
    - tty.js, line 30

### Methods

#### eventHandler(eventType, handler) → {Tty}

  Set an event handler to be notified by Shell events.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `eventType` | Object | the event type
  `handler` | function |

  Source:
    - tty.js, line 105

  ##### Returns:

  Type
    Tty

#### height() → {number}

  Source:
    - tty.js, line 56

  ##### Returns:

  - the current height, i.e the number of columns or if unknown
  - Type
      number

#### setStdin(stdin) → {Tty}

  Set an handler the standard input to read the data in String format.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `stdin` | function | the standard input

  Source:
    - tty.js, line 70

  ##### Returns:

  this object
  Type
    Tty

#### stdout() → {Stream}

  Source:
    - tty.js, line 90

  ##### Returns:

  - the standard output for emitting data
  - Type
      Stream

#### width() → {number}

  Source:
    - tty.js, line 42

  ##### Returns:

  - the current width, i.e the number of rows or if unknown
  - Type
      number