SDL does kbd->console_fd = open("/dev/tty", O_RDONLY | O_CLOEXEC); ioctl(kbd->console_fd, KDSKBMODE, K_OFF); but that's different device from /dev/tty0 And kbd_mode -fu /dev/tty0 seems to undo it.