Implement CTRL-D