title: What signal is emitted when pressing CTRL+D in node:readline?
body: <p>I've been trying to intercept <code>CTRL+D</code> so I can use it to represent 'document' for a CLI I am building. I have been unsuccessful identifying how to intercept it when using readline with keypress.</p>
  <p>Is there a specific signal event I can listen for and override the default <code>readline</code> behavior to exit the application when CTRL+D is pressed?</p>
  <p>It's also notable that <code>CTRL+D</code> does not exit the application if other keys have been pressed. But this is untenable as a solution.</p>
  <p>Any help would be appreciated!</p>
  <pre class="lang-js prettyprint-override"><code>import readline from'node:readline'
  
  const stdin = process.stdin
  stdin.setEncoding('utf8')
  const stdout = process.stdout
  stdout.setEncoding('utf8')
  
  const rl = readline.createInterface( stdin, stdout )
  
  readline.emitKeypressEvents(stdin)
  stdin.setRawMode(true)
  
  rl.on('line', line =&gt; {
    console.log(line)
  })
  
  stdin.on('keypress', async (str, key) =&gt; {  
    if(key.name === 'd' &amp;&amp; key.ctrl === true){
      console.log('CTRL-D')
    }
  })
  
  process.on('SIGINT', ()=&gt;{
    console.log('CTRL+D??')
  })
  </code></pre>