title: Does `screen`'s `stuff` command use `stdin`?
body: <p><a href="https://mpv.io/" rel="nofollow noreferrer">mpv</a> is a media player that can be used interactively from the commmand line. This starts it in the terminal:</p>
  
  <pre><code>mpv path/to/playlist_file.m3u --no-audio-display
  </code></pre>
  
  <p>I can then press <code>&gt;</code> to go to the next track and use <a href="https://mpv.io/manual/master/#interactive-control" rel="nofollow noreferrer">other interactive commands</a>.</p>
  
  <p>I can control it using <code>screen</code> as follows:</p>
  
  <pre><code># start a screen session called "my_player"
  screen -d -m -S my_player mpv path/to/playlist_file.m3u --no-audio-display
  # next track
  screen -S my_player -p 0 -X stuff "&gt;"
  # prev track
  screen -S my_player -p 0 -X stuff "&lt;"
  # "end of text character" = control + c = terminate
  screen -S my_player -p 0 -X stuff $'\003'
  </code></pre>
  
  <p>But what is screen's <code>stuff</code> command doing here? I would have guessed "sending input to standard in", but <code>echo "&gt;" | mpv path/to/playlist_file.m3u</code> does not cause it to start up and immediately skip a track.</p>
  
  <p><code>man screen</code> says:</p>
  
  <blockquote>
    <p>Stuff the string string in the input buffer of the current  window. This  is like  the "paste" command but with much less overhead. You cannot paste large buffers with the "stuff" command. It is most useful for key bindings. See also "bindkey".</p>
  </blockquote>
  
  <p><strong>By "the input buffer", does it mean standard input, or something else?</strong></p>
  
  <p>(I ask because I want to control this program from Elixir via <a href="https://hexdocs.pm/elixir/Port.html" rel="nofollow noreferrer"><code>Port</code></a>, which uses standard input and output, but so far my input seems to be ignored.)</p>