Small function that reads from standard input to char * is not pressed ctrl + x