title: Why doesn't CTRL+C (simulated with Awt.Robot) work properly?
body: <p>I have read a web page frame from a browser with a following routine and gain all time a same result (first time copied part of the page):</p>
  
  <ol>
  <li>Move a mouse to a frame</li>
  <li>Select a text with a triple click </li>
  <li>Copy text with simulated CTRL+C keyboard press event</li>
  <li>Print copied text</li>
  <li>Go to step #1 if mouse is still in the frame</li>
  </ol>
  
  <p>For implementation details see code below:</p>
  
  <pre><code>final static int TIME_CONST = 10;
  final static int STEP_Y = 10;
  int x = 100; 
  int y = 50;
  int count = 0;
  Robot robot = new Robot();
  
  while(y &lt; 600) {
      robot.mouseMove(x, y);
      y += STEP_Y;
      Thread.sleep(TIME_CONST); 
  
      // Select text with triple mouse click
      robot.mousePress( InputEvent.BUTTON1_MASK ); 
      robot.mouseRelease( InputEvent.BUTTON1_MASK ); 
      robot.mousePress( InputEvent.BUTTON1_MASK ); 
      robot.mouseRelease( InputEvent.BUTTON1_MASK );
      robot.mousePress( InputEvent.BUTTON1_MASK ); 
      robot.mouseRelease( InputEvent.BUTTON1_MASK );
      Thread.sleep(TIME_CONST);   
  
      Sequence(robot, 5, KeyEvent.CTRL_MASK, KeyEvent.VK_C);
      Thread.sleep(TIME_CONST); 
  
      Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();             
      Transferable contents = clipboard.getContents(clipboard);           
      boolean hasTransferableText = (contents != null) &amp;&amp; contents.isDataFlavorSupported(DataFlavor.stringFlavor);
  
      String copyResult = "";
      if(hasTransferableText) {
          copyResult = (String) contents.getTransferData(DataFlavor.stringFlavor);
      }
  
      System.out.println("#"+(count++)+": " + copyResult);
  } 
  </code></pre>