The `query` may be string, or may not be (e.g. number, Date, Object, etc.). This is converted to string (i.e. `toString` method is called) before it is displayed.
Display the current prompt (see [setPrompt](#setprompt) method) to the user, and then return the user's response after it has been typed and Enter key was pressed.
Display the `query` to the user, and then return the character as the pressed key by the user, **without pressing the Enter key**.
You can specify `options` (see [Options](#options)).
Note that the user has no chance to change the input.
The `query` may be string, or may not be (e.g. number, Date, Object, etc.). This is converted to string (i.e. `toString` method is called) before it is displayed.
Set the prompt, for example when you run `node` on the command line, you see `> `, which is Node's prompt. The default is `'> '`. (see [prompt](#prompt) method)
The `newPrompt` may be string, or may not be (e.g. number, Date, Object, etc.). This is converted to string (i.e. `toString` method is called) before it is displayed every time.
The specified `callback` Function is called when any outputs are done by [Input Methods](#input-methods). The `callback` is given two arguments, `display` as the output text, and `encoding` (see [setEncoding](#setencoding) method).
* Like `your-script >foo.log`, when the output is redirected to record those into a file, this is used to output the conversation to the file. That is, the conversation isn't outputted to `foo.log` without this code.
Set the mask character that is shown instead of the secret text (e.g. password) when `noEchoBack` option is `true` (see [noEchoBack](#noechoback) option). The default is `'*'`. If you want to show nothing, specify `''`. (But it might be not user friendly in some cases.)
*Note:* In some cases (e.g. when the input is redirected on Windows XP), `'*'` or `''` might be used always.
When readlineSync reads from a console directly (without external program), a size `newBufferSize` buffer is used. Even if the user's response exceeds it, it's usually no problem, because the buffer is used repeatedly. But, some platforms's (e.g. Windows) console might not accept user's response that exceeds it. And set an enough size. The default is `1024`.
If `true` is specified, the secret text (e.g. password) which is typed by user on screen is hidden by the mask characters (see [setMask](#setmask) method).
The method doesn't return until the specified key is pressed.
Specify the characters as the key. All strings or Array of those are decomposed into single characters. For example, `'abcde'` is the same as `['a', 'b', 'c', 'd', 'e']` or `['a', 'bc', ['d', 'e']]`.
For example:
```js
if (readlineSync.keyIn('Are you sure? :', {limit: 'yn'}) === 'y') { // Accept 'y' or 'n'
By default, the matching is case-insensitive when `limit` option (see [limit](#limit) option) is specified (i.e. `a` equals `A`). If `true` is specified, the matching is case-sensitive (i.e. `a` and `A` are different).
By default, the leading and trailing white spaces are removed from the typed text that is returned by [Input Methods](#input-methods) except `keyIn` method. If `true` is specified, those are not removed.
If you want to control the flow of task runner (e.g. [Grunt](http://gruntjs.com/)), call readlineSync in a task callback that is called by task runner. Then the flow of tasks is paused and it is controlled by user.
readlineSync tries to read from a console by using the external program if it is needed (e.g. when the input is redirected on Windows XP). And if the running Node doesn't support the [Synchronous Process Execution](http://nodejs.org/api/child_process.html#child_process_synchronous_process_creation) (i.e. Node v0.10-), readlineSync uses "piping via files" for synchronous running.
+ I think that the security is important more than the speed. Some modules have problem about security. (Those don't protect data.) I think that the speed is not needed usually, because readlineSync is used while user types keys.