added helper function ungetch

This commit is contained in:
R. Eric Wheeler 2021-01-07 13:58:46 -08:00
parent c909fa19f1
commit 47a4525b60
1 changed files with 9 additions and 0 deletions

View File

@ -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);
}
}