getch() implementation