use ioctl if lcurses isn't included