Way faster non-blocking input implementation.