Input/Keyboard.php
/**
     * Blocks execution and reads one char from the keyboard. Only returs when
     * a key matching the masks are pressed.
     *
     * @param string $charset A charset to match. Accepts regex charsets, eg
     *                        \d for number, a-z for a to z, \S for all non whitespace etc.
     * @param array  $keys    An array of key identifiers. Use class constants from Keys\Base.
     *                        Useful when you want to read arrow keys, pgup etc.
     * @access public
     * @return string
     */
Blocks execution and reads one char from the keyboard. Only returs when
a key matching the masks are pressed.

@param string $charset A charset to match. Accepts regex charsets, eg
\d for number, a-z for a to z, \S for all non whitespace etc.
@param array  $keys    An array of key identifiers. Use class constants from Keys\Base.
Useful when you want to read arrow keys, pgup etc.
@access public
@return string
Blocks execution and reads one char from the keyboard . Only returs when a key matching the masks are pressed . @param string $charset A charset to match . Accepts regex charsets eg \ d for number a - z for a to z \ S for all non whitespace etc . @param array $keys An array of key identifiers . Use class constants from Keys \ Base . Useful when you want to read arrow keys pgup etc . @access public @return string
public function readChar($charset = null, array $keys = null)
    {
        $this->_clear();
        while (true) {
            $char = $this->_getc();
            if (!$charset && !$keys) {
                break;
            }
            if (is_array($keys) && in_array($char, $keys)) {
                break;
            }
            if (is_string($charset) && preg_match("/^[{$charset}]$/u", $char)) {
                break;
            }
        }
        return $char;
    }
public function readChar ( $ charset = null , array $ keys = null ) { $ this -> _clear ( ) ; while ( true ) { $ char = $ this -> _getc ( ) ; if ( ! $ charset && ! $ keys ) { break ; } if ( is_array ( $ keys ) && in_array ( $ char , $ keys ) ) { break ; } if ( is_string ( $ charset ) && preg_match ( " /^[ { $ charset } ]$/u " , $ char ) ) { break ; } } return $ char ; }
Blocks execution and reads one char from the keyboard.
Blocks execution and reads one char from the keyboard .