I don't know how to use TextEntered properly to let the user enter the name of a file after pressing a key. What I did is that when the user presses a specific key (the C key), it activate a flag so event handler starts keeping user input in a buffer until the user presses 'Enter'. But this key ('C') is added to the buffer.