diff --git a/src/Console/function.php b/src/Console/function.php index 52a5747..35f68b4 100644 --- a/src/Console/function.php +++ b/src/Console/function.php @@ -19,3 +19,12 @@ if (!function_exists('getch')) { return $g->getch(); } } + +if(!function_exists('ungetch')) { + + function ungetch(string $char, string $linuxLibrary = null): int + { + $g = new Getch($linuxLibrary); + return $g->ungetch($char); + } +}