title: CGEventRef and CGEventCreateKeyboardEvent issues
body: <p>I have the following code for Objective-c on Mac OS:</p>
  
  <pre><code>@import CoreGraphics;
  
  CGEventRef event1, event2;
  event1 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)56, true);
  event2 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)6, true);
  </code></pre>
  
  <p>It yields the errors:</p>
  
  <pre><code>Redefinition of 'event1' with a different type: 'int' vs 'CGEvenRef' (aka 'struct ++CGEvent *')
  Type specifier missing, defaults to 'int'
  
  Redefinition of 'event2' with a different type: 'int' vs 'CGEvenRef' (aka 'struct ++CGEvent *')
  Type specifier missing, defaults to 'int'
  </code></pre>
  
  <p>I understand some of it and have looked at the documentation, and believe my code should work, but it doesn't. Any suggestions? I'm using Xcode, and my versions of Mac OS and Xcode are up-to-date.</p>
  
  <p>I even pasted the code from this question that's marked correct, but it gives errors as well:</p>
  
  <p><a href="https://stackoverflow.com/questions/19755942/how-to-paste-programatically-on-os-x">How to paste programatically on OS X?</a></p>