allow non-ttys to call kbhit/cbreak/raw

along with related testcases and more keyboard coverage